Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/scripts/check-workflow-result.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ if [ "$WOLFPROV_FORCE_FAIL" = "WOLFPROV_FORCE_FAIL=1" ]; then
ACTUAL_SORTED="${TEMP_DIR}/actual_sorted.txt"
EXPECTED_SORTED="${TEMP_DIR}/expected_sorted.txt"
OPTIONAL_SORTED="${TEMP_DIR}/optional_sorted.txt"
EXTRA_SORTED="${TEMP_DIR}/extra_sorted.txt"

# Clean and sort both lists
echo "$ACTUAL_FAILS" | tr ' ' '\n' | grep -v '^$' | sort > "$ACTUAL_SORTED"
Expand All @@ -121,11 +122,11 @@ if [ "$WOLFPROV_FORCE_FAIL" = "WOLFPROV_FORCE_FAIL=1" ]; then
# Find missing in actual (in expected but not in actual)
MISSING=$(comm -23 "$EXPECTED_SORTED" "$ACTUAL_SORTED" | tr '\n' ' ')
# Find extra in actual (in actual but not in expected)
EXTRA=$(comm -13 "$EXPECTED_SORTED" "$ACTUAL_SORTED" | tr '\n' ' ')
comm -13 "$EXPECTED_SORTED" "$ACTUAL_SORTED" > "$EXTRA_SORTED"
# Strip out optional failures
EXTRA=$(comm -23 "$EXTRA" "$OPTIONAL_SORTED" | tr '\n' ' ')
# List the optional failures
OPTIONAL_FAILS=$(comm -13 "$EXPECTED_SORTED" "$OPTIONAL_SORTED" | tr '\n' ' ')
EXTRA=$(comm -23 "$EXTRA_SORTED" "$OPTIONAL_SORTED" | tr '\n' ' ')
# List the optional failures that occurred
OPTIONAL_FAILS=$(comm -12 "$EXTRA_SORTED" "$OPTIONAL_SORTED" | tr '\n' ' ')

# Clean up temporary files
rm -rf "$TEMP_DIR"
Expand Down
Loading