From 5d251365fd5ca11fb1659450c455f6ab14901ac9 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Fri, 11 Dec 2015 11:01:02 -0500 Subject: [PATCH] tests/core: Give an order to core tests Signed-off-by: Anna Schumaker --- tests/core/Sconscript | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/core/Sconscript b/tests/core/Sconscript index cbe84ea3..bd0fceaa 100644 --- a/tests/core/Sconscript +++ b/tests/core/Sconscript @@ -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") ]