Skip to content

Commit

Permalink
[feature](regression) add custom config file for Regression: regressi…
Browse files Browse the repository at this point in the history
…on-conf-custom.groovy (#13783)
  • Loading branch information
englefly authored Oct 31, 2022
1 parent cc0fa5f commit d2c5c1a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit d2c5c1a

Please sign in to comment.