forked from calref/cboe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSConscript
25 lines (19 loc) · 943 Bytes
/
SConscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import subprocess
Import("env platform party_classes common_sources")
test_sources = Glob("""*.cpp""") + Split("""
#build/obj/scenedit/scen.fileio.cpp
""")
if str(platform) == "win32" and 'msvc' in env["TOOLS"]:
test = env.Program("#build/bin/boe_test", party_classes + common_sources + test_sources, LINKFLAGS='/nologo /SUBSYSTEM:CONSOLE /MACHINE:X86')
else:
test = env.Program("#build/bin/boe_test", party_classes + common_sources + test_sources)
def run_tests(env,target,source):
import subprocess
app = str(source[0].abspath)
if not subprocess.call(app):
open(target[0].abspath,'w').write("PASSED\n")
env.Install("#build/test/", test)
env.AlwaysBuild(env.Install("#build/test/", Dir("#test/files")))
env.AlwaysBuild(env.Install("#build/rsrc/", Dir("#rsrc/strings")))
env.Command("#build/test/junk/", '', 'mkdir "' + Dir("#build/test/junk").path + '"')
env.Command("#build/test/passed", test, run_tests, chdir=True)