Skip to content

Commit b594dfb

Browse files
dansanduleacrobert3005
authored andcommitted
Don't consider circle-test-results file if empty (apache-spark-on-k8s#356)
1 parent 3bf8055 commit b594dfb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.circleci/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,8 @@ jobs:
340340
name: Merge cached test results with results provided by circle (if any)
341341
command: |
342342
CIRCLE_TEST_RESULTS_FILE="$CIRCLE_INTERNAL_TASK_DATA/circle-test-results/results.json"
343-
[[ -f "$CIRCLE_TEST_RESULTS_FILE" ]] && circle_exists=1
343+
# Using -s (file exists and has positive size) as this file might be empty
344+
[[ -s "$CIRCLE_TEST_RESULTS_FILE" ]] && circle_exists=1
344345
[[ -f "$TEST_RESULTS_FILE" ]] && cached_exists=1
345346
if [[ -z "$circle_exists" ]] || [[ -z "$cached_exists" ]]; then
346347
# Only one exists, CirclePlugin will try to look for both so we're good.

0 commit comments

Comments
 (0)