Skip to content

Commit 7e53ce8

Browse files
gaogaotiantianzhengruifeng
authored andcommitted
[SPARK-54450][FOLLOWUP] Relax the restriction of run-tests
### What changes were proposed in this pull request? Relax the restriction on `run-tests.py`. Ultimately the tests are executed using a potentially different python under different environment. If we can't find anything, just pass it as it is, instead of stopping users from running it. ### Why are the changes needed? It might break users' workflow when they have some weird setup. (Completely different python for `run-tests.py` and `bin/pyspark`) ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Maually tested that a non-exist module will be passed to `bin/pyspark`. ### Was this patch authored or co-authored using generative AI tooling? No Closes #53292 from gaogaotiantian/relax-run-tests. Authored-by: Tian Gao <[email protected]> Signed-off-by: Ruifeng Zheng <[email protected]>
1 parent f552989 commit 7e53ce8

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

python/run-tests.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,8 @@ def module_exists(module):
237237
for testname in testnames.split(','):
238238
if " " in testname:
239239
# "{module} {class.testcase_name}"
240-
module, testcase = testname.split(" ")
241-
if not module_exists(module):
242-
print(f"Error: Can't find module '{module}'.")
243-
sys.exit(-1)
244-
testnames_to_test.append(f"{module} {testcase}")
240+
# Just add the testname as is
241+
testnames_to_test.append(testname)
245242
else:
246243
if module_exists(testname):
247244
# "{module}"
@@ -255,8 +252,8 @@ def module_exists(module):
255252
testnames_to_test.append(f"{module} {testcase}")
256253
break
257254
else:
258-
print(f"Error: Invalid testname '{testname}'.")
259-
sys.exit(-1)
255+
# "Can't find the module, the users must know what they are doing"
256+
testnames_to_test.append(testname)
260257

261258
return testnames_to_test
262259

0 commit comments

Comments
 (0)