You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by da...@apache.org on 2022/10/31 14:49:14 UTC

[doris] branch master updated: [feature](regression) add custom config file for Regression: regression-conf-custom.groovy (#13783)

This is an automated email from the ASF dual-hosted git repository.

dataroaring 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 d2c5c1af3b [feature](regression) add custom config file for Regression: regression-conf-custom.groovy (#13783)
d2c5c1af3b is described below

commit d2c5c1af3b84fe8474c059ce2a0627e530bd9d2d
Author: minghong <en...@gmail.com>
AuthorDate: Mon Oct 31 22:49:06 2022 +0800

    [feature](regression) add custom config file for Regression: regression-conf-custom.groovy (#13783)
---
 .gitignore                                                    |  2 ++
 .../src/main/groovy/org/apache/doris/regression/Config.groovy | 11 ++++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index de72017c38..2636059bc2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -56,6 +56,8 @@ fs_brokers/apache_hdfs_broker/src/main/thrift/
 # regression-test
 regression-test/framework/dependency-reduced-pom.xml
 regression-test/realdata/*
+regression-test/cacheData/*
+regression-test/conf/regression-conf-custom.groovy
 
 samples/doris-demo/remote-udf-python-demo/*_pb2.py
 samples/doris-demo/remote-udf-python-demo/*_pb2_grpc.py
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 8564e22c2e..06656fff54 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
@@ -125,7 +125,16 @@ class Config {
             ConfigObject configObj = configSlurper.parse(new File(confFilePath).toURI().toURL())
             config = Config.fromConfigObject(configObj)
         }
-
+        String customConfFilePath = confFile.getParentFile().getPath() + "/regression-conf-custom.groovy"
+        File custFile = new File(customConfFilePath)
+        if (custFile.exists() && custFile.isFile()) {
+            log.info("Load custom config file ${customConfFilePath}".toString())
+            def configSlurper = new ConfigSlurper()
+            def systemProperties = Maps.newLinkedHashMap(System.getProperties())
+            configSlurper.setBinding(systemProperties)
+            ConfigObject configObj = configSlurper.parse(new File(customConfFilePath).toURI().toURL())
+            config = Config.fromConfigObject(configObj)
+        }
         fillDefaultConfig(config)
 
         config.suitePath = FileUtils.getCanonicalPath(cmd.getOptionValue(pathOpt, config.suitePath))


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org