Skip to content

Commit 371aa60

Browse files
committed
Add ut/it flags
1 parent 60ba825 commit 371aa60

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

Sconstruct

+29-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,32 @@
11
env = Environment(CPPPATH = ['.'])
2+
3+
4+
5+
26
env.Library('cstl',[Glob('src/*.c')])
3-
env.Program('it',[Glob('test/it/*.c')],
7+
8+
9+
10+
# build test.
11+
test=0
12+
it=0
13+
ut=0
14+
# Get test flag
15+
test = int(ARGUMENTS.get('test',0))
16+
if test == 1:
17+
it = 1
18+
ut = 1
19+
# Get it flag.
20+
if it == 1 or int(ARGUMENTS.get('it',0))==1:
21+
env.Program('it',[Glob('test/it/*.c')],
422
LIBS='cstl',LIBPATH=['.'])
23+
print 'Running interface testing'
24+
import os
25+
os.system('it')
26+
# Get ut flag
27+
if ut == 1 or int(ARGUMENTS.get('ut',0))==1:
28+
env.Program('it',[Glob('test/it/*.c')],
29+
LIBS='cstl',LIBPATH=['.'])
30+
print 'Running unit testing'
31+
import os
32+
os.system('ut')

0 commit comments

Comments
 (0)