From 5b921e7277c9d86b27dee3e341a7f045a820afa8 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Fri, 11 Dec 2015 11:33:39 -0500 Subject: [PATCH] tests/core/tags: Give an order to tag tests Signed-off-by: Anna Schumaker --- tests/core/Sconscript | 6 +++++- tests/core/tags/Sconscript | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/core/Sconscript b/tests/core/Sconscript index ed56c35b..37f3a4fb 100644 --- a/tests/core/Sconscript +++ b/tests/core/Sconscript @@ -31,7 +31,11 @@ res += tmp res += [ CoreTest("filter", "filter.c") ] res += [ CoreTest("idle", "idle.c") ] -res += SConscript("tags/Sconscript") +tmp = SConscript("tags/Sconscript") +if testing_group(["tests/core"]): + Depends(tmp[0], res[-1]) +res += tmp + res += [ CoreTest("queue", "queue.c") ] res += [ CoreTest("playlist", "playlist.c") ] res += [ CoreTest("collection", "collection.c") ] diff --git a/tests/core/tags/Sconscript b/tests/core/tags/Sconscript index 461dceaf..56a07c8d 100644 --- a/tests/core/tags/Sconscript +++ b/tests/core/tags/Sconscript @@ -1,6 +1,8 @@ #!/usr/bin/python import os -Import("env", "UnitTest", "core_objs") +Import("env", "UnitTest", "core_objs", "testing_group") + +res = [] def TagTest(name, source): global core_objs @@ -9,9 +11,11 @@ def TagTest(name, source): run = UnitTest("core/tags/%s" % name, [ source ] + core_objs) Alias("tests/core", run) Alias("tests/core/tags", run) + if len(res) > 0 and testing_group(["tests/core", "tests/core/tags"]): + Depends(run, res[-1]) return run -res = [ TagTest("album", "album.c") ] +res += [ TagTest("album", "album.c") ] res += [ TagTest("artist", "artist.c") ] res += [ TagTest("genre", "genre.c") ] res += [ TagTest("library", "library.c") ]