This is an automated email from the ASF dual-hosted git repository.
englefly pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 5fb500df369 [opt](regression) ./run-regression.sh -d parameter accept
"regression-test/suites/" as prefix (#37942)
5fb500df369 is described below
commit 5fb500df3694f93294c9f10d50e203a3c7c29b7d
Author: minghong <[email protected]>
AuthorDate: Thu Jul 18 19:47:47 2024 +0800
[opt](regression) ./run-regression.sh -d parameter accept
"regression-test/suites/" as prefix (#37942)
## Proposed changes
./run-regression.sh accept -d parameter with "./regression-test/suites/"
or “regression-test/suites/" prefix
for example:
./run-regression-test.sh --run -d
regression-test/suites/nereids_tpch_shape_sf1000_p0/shape -s q1
with the prefix, we could use command completion (supported by shell) to
indicate with directory to run
Issue Number: close #xxx
<!--Describe your changes.-->
---
.../org/apache/doris/regression/Config.groovy | 15 +++++++++++++-
.../apache/doris/regression/RegressionTest.groovy | 1 +
run-regression-test.sh | 23 +++++++++++-----------
3 files changed, 27 insertions(+), 12 deletions(-)
diff --git
a/regression-test/framework/src/main/groovy/org/apache/doris/regression/Config.groovy
b/regression-test/framework/src/main/groovy/org/apache/doris/regression/Config.groovy
index c6711184c01..b901095eac1 100644
---
a/regression-test/framework/src/main/groovy/org/apache/doris/regression/Config.groovy
+++
b/regression-test/framework/src/main/groovy/org/apache/doris/regression/Config.groovy
@@ -253,6 +253,17 @@ class Config {
this.cloudVersion = cloudVersion
}
+ static String removeDirectoryPrefix(String str) {
+ def prefixes = ["./regression-test/suites/", "regression-test/suites/"]
+
+ def prefix = prefixes.find { str.startsWith(it) }
+ if (prefix) {
+ return str.substring(prefix.length())
+ }
+
+ return str
+ }
+
static Config fromCommandLine(CommandLine cmd) {
String confFilePath = cmd.getOptionValue(confFileOpt, "")
File confFile = new File(confFilePath)
@@ -295,7 +306,9 @@ class Config {
.toSet()
config.directories = cmd.getOptionValue(directoriesOpt,
config.testDirectories)
.split(",")
- .collect({d -> d.trim()})
+ .collect({d ->
+ d.trim()
+ removeDirectoryPrefix(d)})
.findAll({d -> d != null && d.length() > 0})
.toSet()
config.excludeSuiteWildcard = cmd.getOptionValue(excludeSuiteOpt,
config.excludeSuites)
diff --git
a/regression-test/framework/src/main/groovy/org/apache/doris/regression/RegressionTest.groovy
b/regression-test/framework/src/main/groovy/org/apache/doris/regression/RegressionTest.groovy
index 20ae8f0e675..332772271c6 100644
---
a/regression-test/framework/src/main/groovy/org/apache/doris/regression/RegressionTest.groovy
+++
b/regression-test/framework/src/main/groovy/org/apache/doris/regression/RegressionTest.groovy
@@ -279,6 +279,7 @@ class RegressionTest {
static Recorder runScripts(Config config) {
def recorder = new Recorder()
def directoryFilter = config.getDirectoryFilter()
+ log.info("run scripts in directories: " + config.directories)
if (!config.withOutLoadData) {
log.info('Start to run load scripts')
runScripts(config, recorder, directoryFilter,
diff --git a/run-regression-test.sh b/run-regression-test.sh
index f38d99cef29..ea7ced8be94 100755
--- a/run-regression-test.sh
+++ b/run-regression-test.sh
@@ -48,17 +48,18 @@ Usage: $0 <shell_options> <framework_options>
-times rum tests {times} times
Eg.
- $0 build regression test framework and run
all suite which in default group
- $0 --run test_select run a suite which named as test_select
- $0 --compile only compile regression framework
- $0 --run -s test_select run a suite which named as test_select
- $0 --run test_select -genOut generate output file for test_select if
not exist
- $0 --run -g default run all suite in the group which named
as default
- $0 --run -d demo,correctness/tmp run all suite in the directories which
named as demo and correctness/tmp
- $0 --clean clean output of regression test
framework
- $0 --clean --run test_select clean output and build regression test
framework and run a suite which named as test_select
- $0 --run -h print framework options
- $0 --teamcity --run test_select print teamcity service messages and
build regression test framework and run test_select
+ $0 build regression test framework
and run all suite which in default group
+ $0 --run test_select run a suite which named as
test_select
+ $0 --compile only compile regression framework
+ $0 --run -s test_select run a suite which named as
test_select
+ $0 --run test_select -genOut generate output file for
test_select if not exist
+ $0 --run -g default run all suite in the group which
named as default
+ $0 --run -d demo,correctness/tmp run all suite in the directories
which named as demo and correctness/tmp
+ $0 --run -d regression-test/suites/demo specify the suite directories
path from repo root
+ $0 --clean clean output of regression test
framework
+ $0 --clean --run test_select clean output and build
regression test framework and run a suite which named as test_select
+ $0 --run -h print framework options
+ $0 --teamcity --run test_select print teamcity service messages
and build regression test framework and run test_select
Log path: \${DORIS_HOME}/output/regression-test/log
Default config file: \${DORIS_HOME}/regression-test/conf/regression-conf.groovy
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]