39 lines
939 B
Python
39 lines
939 B
Python
#!/usr/bin/python
|
|
import os
|
|
Import("env", "UnitTest", "testing_group", "core_objs")
|
|
|
|
res = []
|
|
gui_objs = []
|
|
ignore = open(".gitignore", "w")
|
|
|
|
def GuiTest(name):
|
|
global gui_objs
|
|
|
|
ignore.write("%s\n" % name)
|
|
source = "%s.c" % name
|
|
test = os.path.abspath(source)
|
|
gui = os.path.sep.join([x for x in test.split("/") if x != "tests"])
|
|
if os.path.exists(gui):
|
|
gui_objs += [ env.Object(gui) ]
|
|
|
|
run = UnitTest("gui/%s" % name, [ test ] + gui_objs + core_objs)
|
|
Alias("tests/gui", run)
|
|
if len(res) > 0 and testing_group(["tests/gui"]):
|
|
Depends(run, res[-1])
|
|
return run
|
|
|
|
|
|
env.UsePackage("gmodule-export-2.0")
|
|
res += [ GuiTest("builder") ]
|
|
res += [ GuiTest("settings") ]
|
|
res += [ GuiTest("model") ]
|
|
res += [ GuiTest("queue") ]
|
|
res += [ GuiTest("window") ]
|
|
res += [ GuiTest("sidebar") ]
|
|
res += [ GuiTest("collection") ]
|
|
res += [ GuiTest("playlist") ]
|
|
res += [ GuiTest("audio") ]
|
|
|
|
ignore.close()
|
|
Return("res")
|