ocarina/tests/gui/Sconscript

42 lines
1.0 KiB
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("view") ]
res += [ GuiTest("queue") ]
res += [ GuiTest("window") ]
res += [ GuiTest("idle") ]
res += [ GuiTest("sidebar") ]
res += [ GuiTest("playlist") ]
gui_objs += [ env.Object("../../gui/collection.c") ]
gui_objs += [ env.Object("../../gui/artwork.c") ]
res += [ GuiTest("audio") ]
ignore.close()
Return("res")