34
34
fails_counts = []
35
35
36
36
def single_test (fwding , query , filt_funs , topo_name , topo_args ,
37
- results , pass_fail ):
37
+ results , pass_fail , test_nums ):
38
38
global fails_counts
39
39
cmd = ("sudo python pyretic/tests/test_bucket.py " +
40
40
"--fwding=" + fwding + ' ' +
@@ -43,7 +43,8 @@ def single_test(fwding, query, filt_funs, topo_name, topo_args,
43
43
"--topo_args=" + topo_args + ' ' +
44
44
"--tshark_filter_funs=" + filt_funs + ' ' +
45
45
"--results_folder=" + results + ' ' +
46
- "--success_file=" + pass_fail )
46
+ "--success_file=" + pass_fail + ' ' +
47
+ "--test_nums=" + test_nums )
47
48
test = subprocess .call (shlex .split (cmd ))
48
49
pf_file = os .path .join (results , pass_fail )
49
50
f = open (pf_file , 'r' )
@@ -70,13 +71,22 @@ def generic_topo_tests(topo_name, topo_args, fwding_pols):
70
71
'filt_test5' ,
71
72
'filt_test6' ,
72
73
'filt_test7' ]
74
+ test_nums = ['0' ,
75
+ '1' ,
76
+ '2.b0,2.b1' ,
77
+ '3.b0,3.b1' ,
78
+ '4.b0,4.b1,4.b2' ,
79
+ '5' ,
80
+ '6' ,
81
+ '7' ]
73
82
results = './pyretic/evaluations/results'
74
83
pass_fail = 'pass-fail.txt'
75
84
76
85
for fwding in fwding_pols :
77
86
for i in range (0 , len (query_pols )):
78
87
res = single_test (fwding , query_pols [i ], filt_funs [i ],
79
- topo_name , topo_args , results , pass_fail )
88
+ topo_name , topo_args , results , pass_fail ,
89
+ test_nums [i ])
80
90
test_name = "%s %s on %s" % (query_pols [i ], fwding , topo_name )
81
91
if res :
82
92
print "===== TEST %s PASSED =====" % test_name
0 commit comments