2014-06-14 10:50:18 -04:00
|
|
|
#!/usr/bin/python
|
2015-08-21 00:48:23 -04:00
|
|
|
import os
|
2015-08-25 09:27:01 -04:00
|
|
|
Import("env", "UnitTest")
|
2014-06-14 10:50:18 -04:00
|
|
|
|
2015-08-27 09:04:21 -04:00
|
|
|
core_objs = []
|
2015-08-21 00:48:23 -04:00
|
|
|
def CoreTest(name, source):
|
2015-08-27 09:04:21 -04:00
|
|
|
global core_objs
|
2015-08-21 00:48:23 -04:00
|
|
|
if os.path.exists("../../core/%s" % source):
|
2015-08-27 09:04:21 -04:00
|
|
|
core_objs += [ env.Object("../../core/%s" % source) ]
|
|
|
|
run = UnitTest("core/%s" % name, [ source ] + core_objs)
|
2015-08-21 00:48:23 -04:00
|
|
|
Alias("tests/core", run)
|
|
|
|
return run
|
2015-08-27 09:04:21 -04:00
|
|
|
Export("core_objs")
|
2014-06-14 10:50:18 -04:00
|
|
|
|
2014-11-01 13:13:31 -04:00
|
|
|
|
2015-08-25 09:27:01 -04:00
|
|
|
res = [ CoreTest("version", "version.c") ]
|
|
|
|
res += [ CoreTest("string", "string.cpp") ]
|
|
|
|
res += [ CoreTest("file", "file.cpp") ]
|
|
|
|
res += [ CoreTest("database", "database.cpp") ]
|
2015-08-26 08:49:30 -04:00
|
|
|
res += [ CoreTest("index", "index.cpp") ]
|
2015-08-27 08:11:59 -04:00
|
|
|
res += [ CoreTest("filter", "filter.cpp") ]
|
2015-08-27 08:29:39 -04:00
|
|
|
res += [ CoreTest("idle", "idle.cpp") ]
|
2015-08-27 09:04:21 -04:00
|
|
|
|
|
|
|
res += SConscript("tags/Sconscript")
|
2015-08-21 00:48:23 -04:00
|
|
|
Return("res")
|
2014-11-01 13:13:31 -04:00
|
|
|
|
2015-08-21 00:48:23 -04:00
|
|
|
#test( "tags/artist" )
|
|
|
|
#test( "tags/album" )
|
|
|
|
#test( "tags/genre" )
|
|
|
|
#test( "tags/library" )
|
|
|
|
#test( "tags/track" )
|
|
|
|
#
|
|
|
|
#test( "random" )
|
|
|
|
#
|
|
|
|
#objs += [ get_test_obj("tags/tags", "core") ]
|
|
|
|
#test( "queue" )
|
|
|
|
#test_env.UsePackage("taglib")
|
|
|
|
#test( "library" )
|
|
|
|
#test( "playlist" )
|
|
|
|
#test( "deck" )
|
|
|
|
#test( "audio" )
|