tests/core: Give an order to core tests

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2015-12-11 11:01:02 -05:00
parent bc0437b3fe
commit 5d251365fd
1 changed files with 6 additions and 2 deletions

View File

@ -1,19 +1,23 @@
#!/usr/bin/python
import os
Import("env", "UnitTest")
Import("env", "UnitTest", "testing_group")
res = []
core_objs = []
def CoreTest(name, source):
global core_objs
if os.path.exists("../../core/%s" % source):
core_objs += [ env.Object("../../core/%s" % source) ]
run = UnitTest("core/%s" % name, [ source ] + core_objs)
Alias("tests/core", run)
if len(res) > 0 and testing_group(["tests/core"]):
Depends(run, res[-1])
return run
Export("core_objs")
res = [ CoreTest("version", "version.c") ]
res += [ CoreTest("version", "version.c") ]
res += [ CoreTest("string", "string.c") ]
res += [ CoreTest("random", "random.c") ]
res += [ CoreTest("file", "file.c") ]