From 6e394c634eb38050c2709f28fc3423bfb5dacdb7 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Mon, 25 Nov 2024 17:05:21 +0800 Subject: [PATCH] ci: set test step in ci when tdgpt file changed --- Jenkinsfile2 | 18 +++++++++++++++++- tests/parallel_test/tdgpt_cases.task | 6 ++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 tests/parallel_test/tdgpt_cases.task diff --git a/Jenkinsfile2 b/Jenkinsfile2 index f44339c8c1..b431deb1cf 100644 --- a/Jenkinsfile2 +++ b/Jenkinsfile2 @@ -465,6 +465,9 @@ pipeline { steps { catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { timeout(time: 126, unit: 'MINUTES'){ + if (file_no_doc_changed =~ /forecastoperator.c|anomalywindowoperator.c/) { + echo "skip windows test because of forecastoperator.c or anomalywindowoperator.c" + } else { pre_test_win() pre_test_build_win() run_win_ctest() @@ -478,6 +481,9 @@ pipeline { steps { catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { timeout(time: 60, unit: 'MINUTES'){ + if (file_no_doc_changed =~ /forecastoperator.c|anomalywindowoperator.c/) { + echo "skip mac test because of forecastoperator.c or anomalywindowoperator.c" + } else { pre_test() pre_test_build_mac() } @@ -550,12 +556,22 @@ pipeline { cd ${WKC}/tests/parallel_test ./run_scan_container.sh -d ${WKDIR} -b ${BRANCH_NAME}_${BUILD_ID} -f ${WKDIR}/tmp/${BRANCH_NAME}_${BUILD_ID}/docs_changed.txt ''' + extra_param + ''' ''' - sh ''' + if ( file_no_doc_changed =~ /forecastoperator.c|anomalywindowoperator.c/) { +] sh ''' + cd ${WKC}/tests/parallel_test + export DEFAULT_RETRY_TIME=2 + date + ''' + timeout_cmd + ''' time ./run.sh -e -m /home/m.json -t tdgpt_cases.task -b ${BRANCH_NAME}_${BUILD_ID} -l ${WKDIR}/log -o 1200 ''' + extra_param + ''' + ''' + } else { + sh ''' cd ${WKC}/tests/parallel_test export DEFAULT_RETRY_TIME=2 date ''' + timeout_cmd + ''' time ./run.sh -e -m /home/m.json -t cases.task -b ${BRANCH_NAME}_${BUILD_ID} -l ${WKDIR}/log -o 1200 ''' + extra_param + ''' ''' + } + } } } diff --git a/tests/parallel_test/tdgpt_cases.task b/tests/parallel_test/tdgpt_cases.task new file mode 100644 index 0000000000..e028d13fb8 --- /dev/null +++ b/tests/parallel_test/tdgpt_cases.task @@ -0,0 +1,6 @@ +#Column Define +#caseID,rerunTimes,Run with Sanitizer,casePath,caseCommand +#NA,NA,y or n,script,./test.sh -f tsim/user/basic.sim + +#tdgpt-test +,,y,script,./test.sh -f tsim/query/timeline.sim