tests/core/tags: Give an order to tag tests

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2015-12-11 11:33:39 -05:00
parent 8a59485cbc
commit 5b921e7277
2 changed files with 11 additions and 3 deletions

View File

@ -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") ]

View File

@ -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") ]