File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ DEFAULT_QUALITY="release"
30
30
31
31
# Function to show help
32
32
show_help () {
33
- cat << ' EOF '
33
+ cat << EOF
34
34
Aspire CLI Download Script
35
35
36
36
DESCRIPTION:
Original file line number Diff line number Diff line change @@ -80,7 +80,12 @@ initialize_test_framework() {
80
80
# Create a top-level temporary directory for all test operations
81
81
local test_id
82
82
test_id=$( date +%s%N | cut -b1-13) # Use timestamp for uniqueness
83
- TOP_LEVEL_TEST_DIR=$( mktemp -d -t " aspire-cli-tests-${test_id} " )
83
+ # Use a cross-platform mktemp pattern:
84
+ # macOS: mktemp -d -t prefix (suffix with random chars automatically)
85
+ # GNU coreutils: requires at least 3 X's in the template. The form -t expects a template
86
+ # that includes the X's (it does NOT auto-append like BSD). So we append -XXXXXX to satisfy GNU.
87
+ # Using a unified pattern works on both platforms.
88
+ TOP_LEVEL_TEST_DIR=$( mktemp -d -t " aspire-cli-tests-${test_id} -XXXXXX" )
84
89
85
90
if [[ " $TEST_VERBOSE " == " true" ]]; then
86
91
write_colored_output " Test framework initialized with verbose output" " BLUE"
@@ -122,13 +127,14 @@ write_test_result() {
122
127
local status=" $2 "
123
128
local details=" ${3:- } "
124
129
125
- (( TESTS_TOTAL++ ))
130
+ # Use prefix increment so arithmetic command exits with status 0 under set -e
131
+ (( ++ TESTS_TOTAL))
126
132
127
133
if [[ " $status " == " PASS" ]]; then
128
- (( TESTS_PASSED ++ ))
134
+ (( ++ TESTS_PASSED ))
129
135
write_colored_output " ✓ PASS: $test_name " " GREEN"
130
136
else
131
- (( TESTS_FAILED ++ ))
137
+ (( ++ TESTS_FAILED ))
132
138
write_colored_output " ✗ FAIL: $test_name " " RED"
133
139
fi
134
140
You can’t perform that action at this time.
0 commit comments