[PATCH lkp-tests] tests/submit-cci: auto-submit testcase for other libraries

[why] the file(testcase, job.yaml) of customer warehouse needs to be dragged to the lkp-tests to automatically submit the task. Signed-off-by: Hu XueJiao <1034502035@qq.com> --- tests/submit-cci | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 tests/submit-cci diff --git a/tests/submit-cci b/tests/submit-cci new file mode 100755 index 00000000..bfec6624 --- /dev/null +++ b/tests/submit-cci @@ -0,0 +1,44 @@ +#!/bin/bash + +gem install activesupport git rest-client elasticsearch + +config_variable() +{ + mkdir -p /etc/compass-ci/defaults + cat <<-EOF > /etc/compass-ci/defaults/$lab.yaml + SCHED_HOST: $SCHED_HOST + SCHED_PORT: $SCHED_PORT + my_email: $my_email + testbox: $testbox + EOF + + cat <<-EOF > /etc/profile.d/compass.sh + export PATH="$PATH:$LKP_SRC/sbin:$LKP_SRC/bin" + EOF + + . /etc/profile.d/compass.sh +} + +download_repo() +{ + if [ -n "$repo_path" ]; then + git clone git://"$LKP_SERVER"/"$repo_path" || exit 1 + git clone git://"$LKP_SERVER"/gitee.com/wu_fengguang/compass-ci.git + fi + + test_code=${repo##*/} + ruby compass-ci/sbin/build-my-info.rb -e "$my_email" -n "$USER" -l "$lab" + + cp -r "$test_code"/"$testcase" $LKP_SRC/tests + cp -r "$test_code"/"$job_yaml" $LKP_SRC/jobs +} + +submit_job() +{ + yaml=${job_yaml##*/} + submit "$yaml" +} + +config_variable +download_repo +submit_job -- 2.23.0

On Tue, Jan 19, 2021 at 11:19:49AM +0800, Hu Xuejiao wrote:
[why] the file(testcase, job.yaml) of customer warehouse needs to be dragged to the lkp-tests to automatically submit the task.
Signed-off-by: Hu XueJiao <1034502035@qq.com> --- tests/submit-cci | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 tests/submit-cci
diff --git a/tests/submit-cci b/tests/submit-cci new file mode 100755 index 00000000..bfec6624 --- /dev/null +++ b/tests/submit-cci @@ -0,0 +1,44 @@ +#!/bin/bash + +gem install activesupport git rest-client elasticsearch + +config_variable() +{ + mkdir -p /etc/compass-ci/defaults + cat <<-EOF > /etc/compass-ci/defaults/$lab.yaml + SCHED_HOST: $SCHED_HOST + SCHED_PORT: $SCHED_PORT + my_email: $my_email + testbox: $testbox + EOF + + cat <<-EOF > /etc/profile.d/compass.sh + export PATH="$PATH:$LKP_SRC/sbin:$LKP_SRC/bin" + EOF + + . /etc/profile.d/compass.sh +} + +download_repo() +{ + if [ -n "$repo_path" ]; then + git clone git://"$LKP_SERVER"/"$repo_path" || exit 1 + git clone git://"$LKP_SERVER"/gitee.com/wu_fengguang/compass-ci.git
^^ if you download fail add || exit 1 Thanks, Baijing
+ fi + + test_code=${repo##*/} + ruby compass-ci/sbin/build-my-info.rb -e "$my_email" -n "$USER" -l "$lab" + + cp -r "$test_code"/"$testcase" $LKP_SRC/tests + cp -r "$test_code"/"$job_yaml" $LKP_SRC/jobs +} + +submit_job() +{ + yaml=${job_yaml##*/} + submit "$yaml" +} + +config_variable +download_repo +submit_job -- 2.23.0
participants (2)
-
Bai Jing
-
Hu Xuejiao