File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -355,16 +355,20 @@ jobs:
355
355
356
356
# Otherwise, combine the two, preferring newer results from circle test results
357
357
echo "Found both cached and circle test results, merging"
358
- jq -s 'def meld:
358
+ if jq -s 'def meld:
359
359
reduce .[] as $o
360
360
({}; reduce ($o|keys)[] as $key (.; .[$key] += [$o[$key]] ));
361
361
def grp: map([{key: "\(.source)~\(.classname)", value: .}] | from_entries) | meld;
362
362
((.[0].tests | grp) * (.[1].tests | grp)) | map(values) | flatten | {tests: .}' \
363
363
"$TEST_RESULTS_FILE" \
364
- "$CIRCLE_INTERNAL_TASK_DATA/circle-test-results/results.json " \
364
+ "$CIRCLE_TEST_RESULTS_FILE " \
365
365
> /tmp/new-test-results.json
366
- # Overwrite the previously cached results with the merged file
367
- mv -f /tmp/new-test-results.json "$TEST_RESULTS_FILE"
366
+ then
367
+ # Overwrite the previously cached results with the merged file
368
+ mv -f /tmp/new-test-results.json "$TEST_RESULTS_FILE"
369
+ else
370
+ echo "Failed to merge test results, probably $CIRCLE_TEST_RESULTS_FILE didn't have the expected structure - ignoring it"
371
+ fi
368
372
- save_cache :
369
373
key : v1-test-results-{{ .Branch }}-{{ .BuildNum }}
370
374
paths :
You can’t perform that action at this time.
0 commit comments