Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 7 additions & 7 deletions .github/scripts/iccdev-classify-fromxml-logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,11 @@ expected_parse_fail=0
unclassified=0
hard_fail=0

shopt -s nullglob
for logf in "$LOGDIR"/*.log; do
while IFS= read -r -d '' logf; do
total=$((total + 1))
base="$(basename "$logf" .log)"
relative_log="${logf#"$LOGDIR/"}"
base="${relative_log%.log}"
manifest_base="$(basename "$base")"
status="$(classify_status "$logf")"
iccout="$RTDIR/${base}_rt.icc"

Expand All @@ -98,7 +99,7 @@ for logf in "$LOGDIR"/*.log; do
if [ ! -s "$iccout" ]; then
unclassified=$((unclassified + 1))
echo " [UNCLASSIFIED_MISSING_INVALID_OUTPUT] $base"
elif matches_manifest "$base" "$status" "$logf"; then
elif matches_manifest "$manifest_base" "$status" "$logf"; then
expected_invalid=$((expected_invalid + 1))
echo " [EXPECTED_INVALID] $base -- $expected_reason"
else
Expand All @@ -110,7 +111,7 @@ for logf in "$LOGDIR"/*.log; do
if [ -s "$iccout" ]; then
unclassified=$((unclassified + 1))
echo " [UNCLASSIFIED_PARSE_WITH_OUTPUT] $base"
elif matches_manifest "$base" "$status" "$logf"; then
elif matches_manifest "$manifest_base" "$status" "$logf"; then
expected_parse_fail=$((expected_parse_fail + 1))
echo " [EXPECTED_PARSE_FAIL] $base -- $expected_reason"
else
Expand All @@ -127,8 +128,7 @@ for logf in "$LOGDIR"/*.log; do
echo " [UNCLASSIFIED_STATUS] $base -- $status"
;;
esac
done
shopt -u nullglob
done < <(find "$LOGDIR" -type f -name '*.log' -print0 | sort -z)

echo ""
echo "iccFromXml classification: $total logs, $valid valid-saved, $expected_invalid expected-invalid-saved, $expected_parse_fail expected-parse-fail, $unclassified unclassified, $hard_fail hard-fail"
Expand Down
31 changes: 22 additions & 9 deletions .github/workflows/_build-test-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,10 @@ jobs:
PASS=0; FAIL=0; TOTAL=0
while IFS= read -r icc; do
TOTAL=$((TOTAL + 1))
base="$(basename "$icc" .icc)"
base="${icc#"${WORKSPACE_DIR}/Testing/"}"
base="${base%.icc}"
logf="$LOGDIR/${base}.log"
mkdir -p "$(dirname "$logf")"
timeout 30 "$DUMP" "$icc" ALL > "$logf" 2>&1 && rc=0 || rc=$?
if [ "$rc" -ge 128 ]; then
FAIL=$((FAIL + 1))
Expand Down Expand Up @@ -409,9 +411,11 @@ jobs:
PASS=0; FAIL=0; READ_FAIL=0; TOTAL=0
while IFS= read -r icc; do
TOTAL=$((TOTAL + 1))
base="$(basename "$icc" .icc)"
base="${icc#"${WORKSPACE_DIR}/Testing/"}"
base="${base%.icc}"
xmlout="$XMLDIR/${base}.xml"
logf="$LOGDIR/${base}.log"
mkdir -p "$(dirname "$xmlout")" "$(dirname "$logf")"
timeout 30 "$TOXML" "$icc" "$xmlout" > "$logf" 2>&1 && rc=0 || rc=$?
if [ "$rc" -ge 128 ]; then
FAIL=$((FAIL + 1))
Expand All @@ -433,6 +437,11 @@ jobs:

echo ""
echo "iccToXml: $TOTAL tested, $PASS pass, $FAIL fail (READ_FAIL=$READ_FAIL)"
XML_COUNT="$(find "$XMLDIR" -type f -name '*.xml' | wc -l)"
if [ "$XML_COUNT" -ne "$PASS" ]; then
echo "[FAIL] iccToXml output count mismatch: $PASS successful conversions, $XML_COUNT XML files"
exit 1
fi
if [ "$FAIL" -gt 0 ]; then
echo "[FAIL] iccToXml sweep produced failures"
exit 1
Expand Down Expand Up @@ -463,13 +472,13 @@ jobs:
}

PASS=0; FAIL=0; HARD_FAIL=0; TOTAL=0
for xmlf in "$XMLDIR"/*.xml; do
[ -f "$xmlf" ] || continue
[ -s "$xmlf" ] || continue
while IFS= read -r xmlf; do
TOTAL=$((TOTAL + 1))
base="$(basename "$xmlf" .xml)"
base="${xmlf#"$XMLDIR/"}"
base="${base%.xml}"
iccout="$RTDIR/${base}_rt.icc"
logf="$LOGDIR/${base}.log"
mkdir -p "$(dirname "$iccout")" "$(dirname "$logf")"
timeout 30 "$FROMXML" "$xmlf" "$iccout" > "$logf" 2>&1 && rc=0 || rc=$?
if is_hard_exit "$rc"; then
FAIL=$((FAIL + 1))
Expand All @@ -485,7 +494,7 @@ jobs:
else
PASS=$((PASS + 1))
fi
done
done < <(find "$XMLDIR" -type f -name '*.xml' -size +0c | sort)

echo ""
echo "iccFromXml RT: $TOTAL tested, $PASS reconstructed, $FAIL not reconstructed"
Expand Down Expand Up @@ -942,8 +951,12 @@ jobs:
# Per-tool subdirectory logs
for subdir in dump toxml fromxml roundtrip parity; do
if [ -d "$LOGDIR/$subdir" ]; then
mkdir -p "$OUTDIR/$subdir"
cp "$LOGDIR/$subdir"/*.log "$OUTDIR/$subdir/" 2>/dev/null || true
while IFS= read -r -d '' logf; do
relative_log="${logf#"$LOGDIR/"}"
destination="$OUTDIR/$(dirname "$relative_log")"
mkdir -p "$destination"
cp "$logf" "$destination/"
done < <(find "$LOGDIR/$subdir" -type f -name '*.log' -print0)
fi
done

Expand Down