ocarina/tests/core/tags/Sconscript

29 lines
802 B
Python

#!/usr/bin/python
import os
Import("env", "UnitTest", "core_objs", "testing_group")
res = []
def TagTest(name, source):
global core_objs
if os.path.exists("../../../core/tags/%s" % source):
core_objs += [ env.Object("../../../core/tags/%s" % 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("artist", "artist.c") ]
res += [ TagTest("genre", "genre.c") ]
res += [ TagTest("library", "library.c") ]
env.UsePackage("taglib_c")
core_objs += [ env.Object("../../../core/tags/tags.c") ]
res += [ TagTest("track", "track.c") ]
Return("res")