File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
graalpython/com.oracle.graal.python.test/src/tests Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ def collect_working_tests():
72
72
for tagfile in glob .glob (glob_pattern ):
73
73
test = os .path .splitext (os .path .basename (tagfile ))[0 ]
74
74
working_tests .append ((test , working_selectors (tagfile )))
75
- return working_tests
75
+ return sorted ( working_tests )
76
76
77
77
78
78
def make_test_function (working_test ):
@@ -110,7 +110,17 @@ def make_tests_class():
110
110
class TestTaggedUnittests (unittest .TestCase ):
111
111
pass
112
112
113
- working_tests = collect_working_tests ()
113
+ partial = os .environ .get ('TAGGED_UNITTEST_PARTIAL' )
114
+ if partial :
115
+ selected_str , total_str = partial .split ('/' , 1 )
116
+ selected = int (selected_str ) - 1
117
+ total = int (total_str )
118
+ else :
119
+ selected = 0
120
+ total = 1
121
+ assert selected < total
122
+
123
+ working_tests = collect_working_tests ()[selected ::total ]
114
124
for idx , working_test in enumerate (working_tests ):
115
125
fn = make_test_function (working_test )
116
126
fn .__name__ = "%s[%d/%d]" % (fn .__name__ , idx + 1 , len (working_tests ))
You can’t perform that action at this time.
0 commit comments