This is an automated email from the ASF dual-hosted git repository.
ruifengz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 7e53ce8c3647 [SPARK-54450][FOLLOWUP] Relax the restriction of run-tests
7e53ce8c3647 is described below
commit 7e53ce8c36473eea209f1188d26de3e01c071a43
Author: Tian Gao <[email protected]>
AuthorDate: Fri Dec 5 11:46:23 2025 +0800
[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]>
---
python/run-tests.py | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/python/run-tests.py b/python/run-tests.py
index 83b7d86c11da..5de4b6fb00d3 100755
--- a/python/run-tests.py
+++ b/python/run-tests.py
@@ -237,11 +237,8 @@ def split_and_validate_testnames(testnames):
for testname in testnames.split(','):
if " " in testname:
# "{module} {class.testcase_name}"
- module, testcase = testname.split(" ")
- if not module_exists(module):
- print(f"Error: Can't find module '{module}'.")
- sys.exit(-1)
- testnames_to_test.append(f"{module} {testcase}")
+ # Just add the testname as is
+ testnames_to_test.append(testname)
else:
if module_exists(testname):
# "{module}"
@@ -255,8 +252,8 @@ def split_and_validate_testnames(testnames):
testnames_to_test.append(f"{module} {testcase}")
break
else:
- print(f"Error: Invalid testname '{testname}'.")
- sys.exit(-1)
+ # "Can't find the module, the users must know what they
are doing"
+ testnames_to_test.append(testname)
return testnames_to_test
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]