Skip to content

Commit 9f757c8

Browse files
authored
Update tests.sh
1 parent a1ad28a commit 9f757c8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,18 @@ run_test() {
126126

127127
log_info "$iteration 次运行 $test_name 测试..."
128128

129+
# 先执行clean
130+
log_info "执行clean操作..."
131+
local clean_output=$(./gradlew clean 2>&1)
132+
local clean_exit_code=$?
133+
134+
if [ $clean_exit_code -ne 0 ]; then
135+
log_error "Clean操作失败"
136+
echo "Clean错误输出:" >> "$LOG_FILE"
137+
echo "$clean_output" >> "$LOG_FILE"
138+
return 1
139+
fi
140+
129141
local start_time=$(date +%s)
130142
local test_output
131143

0 commit comments

Comments
 (0)