Skip to content

Commit 4edbd47

Browse files
committed
dedupe test run
1 parent b037cd3 commit 4edbd47

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

scripts/aitest.sh

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -196,24 +196,18 @@ run_tests() {
196196

197197
# Run Go tests if needed
198198
if [[ "$go_tests" == "true" ]]; then
199-
log "Running Go tests..."
200-
if ! go_output=$(make test 2>&1); then
201-
failed=true
202-
output+="=== GO TEST FAILURES ===\n$go_output\n\n"
203-
else
204-
# Get updated coverage profile after tests pass
205-
log "Getting updated coverage profile..."
206-
if get_coverage "$CURRENT_COVERAGE"; then
207-
# Check for coverage decrease
208-
if coverage_diff=$(check_coverage_change "$BASELINE_COVERAGE" "$CURRENT_COVERAGE"); then
209-
log "Coverage maintained or improved"
210-
else
211-
failed=true
212-
output+="=== COVERAGE DECREASED ===\n$coverage_diff\n\n"
213-
fi
199+
log "Running Go tests with coverage..."
200+
if get_coverage "$CURRENT_COVERAGE"; then
201+
# Check for coverage decrease
202+
if coverage_diff=$(check_coverage_change "$BASELINE_COVERAGE" "$CURRENT_COVERAGE"); then
203+
log "Coverage maintained or improved"
214204
else
215-
warn "Failed to get updated coverage profile, but continuing..."
205+
failed=true
206+
output+="=== COVERAGE DECREASED ===\n$coverage_diff\n\n"
216207
fi
208+
else
209+
failed=true
210+
output+="=== GO TEST FAILURES ===\nTests failed during coverage collection\n\n"
217211
fi
218212
fi
219213

0 commit comments

Comments
 (0)