Skip to content

Commit 631e9c9

Browse files
author
Tomasz Wojcikowski
committed
Refactor CircleCI suite selection to improve input handling and remove debug output
1 parent dfff33a commit 631e9c9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tools/test.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,11 @@ select_circleci_suites() {
8686
local glob_pattern="$1"
8787
local output_file="$2"
8888

89-
echo "DEBUG: select_circleci_suites glob_pattern='$glob_pattern' output_file='$output_file'"
9089
rm -f "$output_file"
9190
# Use xargs to normalize input to newlines, then sed to process
9291
# This follows CircleCI docs recommendation to use xargs for input handling
9392
if ! circleci tests glob "$glob_pattern" | \
94-
circleci tests run --command="tee /dev/stderr | xargs -n1 echo | sed 's|.*/||; s|\.erl$||' >>$output_file" --verbose
93+
circleci tests run --command="xargs -n1 echo | sed 's|.*/||; s|\.erl$||' >>$output_file" --verbose
9594
then
9695
echo "circleci tests run failed for pattern $glob_pattern"
9796
return 1
@@ -101,8 +100,6 @@ select_circleci_suites() {
101100
echo "circleci tests run returned no suites for pattern $glob_pattern"
102101
return 1
103102
fi
104-
echo "DEBUG: Content of $output_file:"
105-
cat "$output_file"
106103
}
107104

108105
maybe_select_small_test_suites() {
@@ -200,7 +197,7 @@ run_test_preset() {
200197
}
201198

202199
maybe_select_suites() {
203-
if circleci_tests_available && select_circleci_suites tests/*_SUITE.erl selected_suites; then
200+
if circleci_tests_available && select_circleci_suites "tests/*_SUITE.erl" selected_suites; then
204201
if [ -s selected_suites ]; then
205202
escript ../tools/select_suites_to_run.erl $TESTSPEC $(<selected_suites)
206203
else

0 commit comments

Comments
 (0)