@@ -68,13 +68,16 @@ def parse_metadata(file_path):
68
68
if match is None :
69
69
break
70
70
71
+ if match .group (1 ) == 'IGNORE' and match .group (2 ) == 'true' :
72
+ return { 'ignored' : True }
73
+
71
74
steps .append ({ 'name' : match .group (1 ), 'command' : match .group (2 ) })
72
75
73
76
74
77
if len (steps ) == 0 :
75
- return { 'failed' : True , 'reason' : 'no steps defined!' }
78
+ return { 'ignored' : False , ' failed' : True , 'reason' : 'no steps defined!' }
76
79
77
- return { 'steps' : steps , 'failed' : False }
80
+ return { 'ignored' : False , ' steps' : steps , 'failed' : False }
78
81
79
82
80
83
def test_file (file_path , test_dir ):
@@ -89,11 +92,15 @@ def test_file(file_path, test_dir):
89
92
90
93
name = os .path .splitext (os .path .basename (file_path ))[0 ]
91
94
95
+ test_info = parse_metadata (file_path )
96
+
97
+ if test_info ['ignored' ]:
98
+ return 0
99
+
92
100
if pt :
93
101
print ("##teamcity[testStarted name='%s' captureStandardOutput='true']" % name )
94
102
print_if (ps , '-- Testing %s ' % os .path .relpath (file_path , test_dir ), end = '' , flush = True )
95
103
96
- test_info = parse_metadata (file_path )
97
104
if test_info ['failed' ]:
98
105
failed_tests .append (os .path .relpath (file_path , test_dir ))
99
106
print ('\n %s%s-- Failed: %s:%s' % (bcolors .FAIL , bcolors .BOLD , os .path .relpath (file_path , test_dir ), bcolors .ENDC ))
0 commit comments