Skip to content

Commit

Permalink
Fix test patterns for parallel_test (#35)
Browse files Browse the repository at this point in the history
* Fix test patterns for parallel_test

* Fix test command for parallel_test
  • Loading branch information
sivaprasadreddy authored Feb 16, 2023
1 parent b0663ca commit 7e9eaac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/jobs/parallel_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ steps:
name: Enable Test Splitting
environment:
PARAM_TEST_DIR: << parameters.test_directory >>
PARAM_PATTERN: << parameters.parallel_it_pattern >>
PARAM_TEST_PATTERN: << parameters.parallel_test_pattern >>
PARAM_IT_PATTERN: << parameters.parallel_it_pattern >>
command: << include(scripts/enable-test-splitting.sh) >>
- store_artifacts:
path: .circleci/tests/
Expand All @@ -78,7 +79,7 @@ steps:
working_directory: << parameters.app_src_directory >>
environment:
PARAM_MVN_COMMAND: << parameters.maven_command >>
PARAM_COMMAND: << parameters.maven_command >>
PARAM_COMMAND: << parameters.command >>
PARAM_SETTINGS_FILE: << parameters.settings_file >>
command: << include(scripts/run-parallel-tests.sh) >>
- process_test_results:
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/enable-test-splitting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ echo -e "\033[31m\033[4mOrb Notes on Test Splitting\033[0m
"
mkdir -p .circleci/tests/
# generate excluded surefire tests using provided pattern
circleci tests glob "$PARAM_TEST_DIR"/"$PARAM_PATTERN" | \
circleci tests glob "$PARAM_TEST_DIR"/"$PARAM_TEST_PATTERN" | \
sed -e "s#^$PARAM_TEST_DIR/\(.*\)\.(java|kt)#\1#" | \
tr "/" "." > .circleci/tests/surefire_classnames
circleci tests split --split-by=timings --timings-type=classname < .circleci/tests/surefire_classnames > /tmp/this_node_tests
grep -xvf /tmp/this_node_tests < .circleci/tests/surefire_classnames > .circleci/tests/surefire_classnames_ignore_list
# generate excluded failsafe tests using provided pattern
circleci tests glob "$PARAM_TEST_DIR"/"$PARAM_PATTERN" | \
circleci tests glob "$PARAM_TEST_DIR"/"$PARAM_IT_PATTERN" | \
sed -e "s#^$PARAM_TEST_DIR/\(.*\)\.(java|kt)#\1#" | \
tr "/" "." > .circleci/tests/failsafe_classnames
circleci tests split --split-by=timings --timings-type=classname < .circleci/tests/failsafe_classnames > /tmp/this_node_it_tests
Expand Down

0 comments on commit 7e9eaac

Please sign in to comment.