2014-06-14 10:50:18 -04:00
|
|
|
#!/usr/bin/python
|
2015-08-21 00:48:23 -04:00
|
|
|
import os
|
2015-12-11 11:01:02 -05:00
|
|
|
Import("env", "UnitTest", "testing_group")
|
2014-06-14 10:50:18 -04:00
|
|
|
|
2015-12-11 11:01:02 -05:00
|
|
|
res = []
|
2015-08-27 09:04:21 -04:00
|
|
|
core_objs = []
|
2015-12-11 11:01:02 -05:00
|
|
|
|
2015-08-21 00:48:23 -04:00
|
|
|
def CoreTest(name, source):
|
2015-08-27 09:04:21 -04:00
|
|
|
global core_objs
|
2015-12-11 14:12:54 -05:00
|
|
|
|
|
|
|
test = os.path.abspath(source)
|
|
|
|
core = os.path.sep.join([x for x in test.split("/") if x != "tests"])
|
|
|
|
if os.path.exists(core):
|
|
|
|
core_objs += [ env.Object(core) ]
|
|
|
|
run = UnitTest("core/%s" % name, [ test ] + core_objs)
|
2015-08-21 00:48:23 -04:00
|
|
|
Alias("tests/core", run)
|
2015-12-11 11:01:02 -05:00
|
|
|
if len(res) > 0 and testing_group(["tests/core"]):
|
|
|
|
Depends(run, res[-1])
|
2015-08-21 00:48:23 -04:00
|
|
|
return run
|
2015-12-11 14:12:54 -05:00
|
|
|
Export("core_objs", "CoreTest")
|
2014-06-14 10:50:18 -04:00
|
|
|
|
2014-11-01 13:13:31 -04:00
|
|
|
|
2015-12-11 11:01:02 -05:00
|
|
|
res += [ CoreTest("version", "version.c") ]
|
2015-09-08 09:39:35 -04:00
|
|
|
res += [ CoreTest("string", "string.c") ]
|
2015-09-09 09:00:17 -04:00
|
|
|
res += [ CoreTest("random", "random.c") ]
|
2015-10-09 13:55:34 -04:00
|
|
|
res += [ CoreTest("file", "file.c") ]
|
2015-10-27 18:30:49 -04:00
|
|
|
res += [ CoreTest("date", "date.c") ]
|
2015-11-30 09:39:53 -05:00
|
|
|
|
2015-12-11 14:12:54 -05:00
|
|
|
res += SConscript("containers/Sconscript")
|
2015-11-10 10:19:45 -05:00
|
|
|
res += [ CoreTest("filter", "filter.c") ]
|
2015-11-10 14:18:11 -05:00
|
|
|
res += [ CoreTest("idle", "idle.c") ]
|
2015-08-27 09:04:21 -04:00
|
|
|
|
2015-12-11 14:12:54 -05:00
|
|
|
res += SConscript("tags/Sconscript")
|
2015-12-02 10:22:11 -05:00
|
|
|
res += [ CoreTest("queue", "queue.c") ]
|
2015-12-10 13:59:21 -05:00
|
|
|
res += [ CoreTest("playlist", "playlist.c") ]
|
2015-12-11 09:21:10 -05:00
|
|
|
res += [ CoreTest("collection", "collection.c") ]
|
2015-08-31 08:17:07 -04:00
|
|
|
res += [ CoreTest("deck", "deck.cpp") ]
|
2015-08-31 08:20:11 -04:00
|
|
|
res += [ CoreTest("audio", "audio.cpp") ]
|
2015-08-31 08:11:24 -04:00
|
|
|
|
2015-08-21 00:48:23 -04:00
|
|
|
Return("res")
|