Skip to content

Commit

Permalink
check
Browse files Browse the repository at this point in the history
Signed-off-by: husharp <jinhao.hu@pingcap.com>
  • Loading branch information
HuSharp committed Jan 26, 2024
1 parent d3d0c3a commit d86eb21
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ basic-test: install-tools

ci-test-job: install-tools dashboard-ui
@$(FAILPOINT_ENABLE)
./scripts/ci-subtask.sh $(JOB_COUNT) $(JOB_INDEX) || { $(FAILPOINT_DISABLE); exit 2; }
./scripts/ci-subtask.sh $(JOB_COUNT) $(JOB_INDEX) || { $(FAILPOINT_DISABLE); exit 1; }
@$(FAILPOINT_DISABLE)

TSO_INTEGRATION_TEST_PKGS := $(PD_PKG)/tests/server/tso
Expand Down
35 changes: 19 additions & 16 deletions scripts/ci-subtask.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,25 @@ ROOT_PATH=../../
if [[ $2 -gt 10 ]]; then
integrations_dir=./tests/integrations
integrations_tasks=($(find "$integrations_dir" -mindepth 1 -maxdepth 1 -type d))
# Currently, we only have 3 integration tests, so we can hardcode the task index.
for t in ${integrations_tasks[@]}; do
if [[ "$t" = "$integrations_dir/client" && "$2" = 11 ]]; then
cd ./client && make ci-test-job && cd .. && cat ./client/covprofile >> covprofile
cd $integrations_dir && make ci-test-job test_name=client
cd $ROOT_PATH && cat $integrations_dir/client/covprofile >> covprofile
break
elif [[ "$t" = "$integrations_dir/tso" && "$2" = 12 ]]; then
cd $integrations_dir && make ci-test-job test_name=tso
cd $ROOT_PATH && cat $integrations_dir/tso/covprofile >> covprofile
break
elif [[ "$t" = "$integrations_dir/mcs" && "$2" = 13 ]]; then
cd $integrations_dir && make ci-test-job test_name=mcs
cd $ROOT_PATH && cat $integrations_dir/mcs/covprofile >> covprofile
break
fi
for t in "${integrations_tasks[@]}"; do
case $2 in
11)
if [[ "$t" = "$integrations_dir/client" ]]; then
(cd ./client && make ci-test-job && cd .. && cat ./client/covprofile >> covprofile)
(cd $integrations_dir && make ci-test-job test_name=client && cat ./client/covprofile >> "$ROOT_PATH/covprofile")
fi
;;
12)
if [[ "$t" = "$integrations_dir/tso" ]]; then
(cd $integrations_dir && make ci-test-job test_name=tso && cat ./tso/covprofile >> "$ROOT_PATH/covprofile")
fi
;;
13)
if [[ "$t" = "$integrations_dir/mcs" ]]; then
(cd $integrations_dir && make ci-test-job test_name=mcs && cat ./mcs/covprofile >> "$ROOT_PATH/covprofile")
fi
;;
esac
done
else
# Get package test list.
Expand Down

0 comments on commit d86eb21

Please sign in to comment.