ocarina/tests/core/Sconscript
Anna Schumaker 9733b82ae8 core/collection: Remove file
I have replaced everything in this file with the code in
core/playlists/library.c

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-13 08:31:30 -04:00

47 lines
1.1 KiB
Python

#!/usr/bin/python
import os
Import("env", "UnitTest", "testing_group")
res = []
core_objs = []
ignore = open(".gitignore", "w")
def CoreTest(name):
global core_objs
ignore.write("%s\n" % name)
source = "%s.c" % name.split("/")[-1]
test = os.path.abspath(source)
core = os.path.sep.join([x for x in test.split("/") if x != "tests"])
if os.path.exists(core):
core_objs += [ env.Object(core) ]
run = UnitTest("core/%s" % name, [ test ] + core_objs)
Alias("tests/core", run)
if len(res) > 0 and testing_group(["tests/core"]):
Depends(run, res[-1])
return run
Export("core_objs", "CoreTest")
res += [ CoreTest("version") ]
res += [ CoreTest("string") ]
res += [ CoreTest("file") ]
res += [ CoreTest("date") ]
res += [ CoreTest("idle") ]
res += [ CoreTest("database") ]
res += [ CoreTest("filter") ]
res += SConscript("tags/Sconscript")
res += [ CoreTest("queue") ]
res += SConscript("playlists/Sconscript")
res += [ CoreTest("playlist") ]
res += [ CoreTest("tempq") ]
core_objs += [ env.Object("../../core/core.c") ]
res += [ CoreTest("audio") ]
ignore.close()
Return("res")