Allow running single tests
This makes testing easier, since I'll only see the test I need and not everything that runs before it. Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
6ee68397fd
commit
30e12bcb68
|
@ -3,8 +3,14 @@
|
||||||
import sys
|
import sys
|
||||||
Import("env")
|
Import("env")
|
||||||
|
|
||||||
if sys.argv.count("tests") > 0:
|
check_depends = True
|
||||||
env.Append( CCFLAGS = [ "-DCONFIG_TEST" ] )
|
|
||||||
|
for arg in sys.argv:
|
||||||
|
if arg.find("tests") == 0:
|
||||||
|
env.Append( CCFLAGS = [ "-DCONFIG_TEST" ] )
|
||||||
|
if len(arg) > 5:
|
||||||
|
check_depends = False
|
||||||
|
break
|
||||||
|
|
||||||
src = SConscript("src/Sconscript")
|
src = SConscript("src/Sconscript")
|
||||||
|
|
||||||
|
@ -17,8 +23,9 @@ prev = None
|
||||||
for test in tests:
|
for test in tests:
|
||||||
t = Command("%s.out" % test, [], "./tests/%s" % test)
|
t = Command("%s.out" % test, [], "./tests/%s" % test)
|
||||||
|
|
||||||
if prev:
|
if prev and (check_depends == True):
|
||||||
Depends(t, prev)
|
Depends(t, prev)
|
||||||
Depends(t, src)
|
Depends(t, src)
|
||||||
AlwaysBuild(t)
|
AlwaysBuild(t)
|
||||||
|
Alias("tests/%s" % test, t)
|
||||||
prev = t
|
prev = t
|
||||||
|
|
Loading…
Reference in New Issue