Skip to content

Commit 86dcc4e

Browse files
[Rodinia] Fix artifact paths
1 parent 804ce88 commit 86dcc4e

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

rodinia_suite/02-test.sh

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4-
xml_escape() { sed -e 's/&/\&amp;/g' -e 's/</\&lt;/g' -e 's/>/\&gt;/g'; }
54
compare_files() {
65
local f1="$1" f2="$2" log="${3:-diff_log.txt}"
76
: >"$log" # ensure the log file exists
@@ -11,7 +10,19 @@ compare_files() {
1110

1211
source "$(dirname "$0")"/../util/args.sh "$@"
1312

14-
cd "${OUT_DIR}/rodinia_suite/rodinia_suite/cuda"
13+
REPO_ROOT="$PWD"
14+
if OUT_ABS="$(readlink -f "$OUT_DIR" 2>/dev/null)"; then :; \
15+
elif OUT_ABS="$(realpath "$OUT_DIR" 2>/dev/null)"; then :; \
16+
else OUT_ABS="$REPO_ROOT/$OUT_DIR"; fi
17+
18+
RESULTS_DIR="$OUT_ABS/rodinia_suite"
19+
mkdir -p "$RESULTS_DIR"
20+
JUNIT="$RESULTS_DIR/rodinia.xml"
21+
TMPCASE="$RESULTS_DIR/.cases.tmp"
22+
: >"$TMPCASE"
23+
echo "Writing JUnit to: $JUNIT"
24+
25+
cd "$OUT_ABS/rodinia_suite/rodinia_suite/cuda"
1526

1627
export SCALE_EXCEPTIONS=2
1728

@@ -20,13 +31,6 @@ benchmarks=(backprop bfs b+tree cfd dwt2d gaussian heartwall hotspot hotspot3D h
2031
total=${#benchmarks[@]}
2132
passed=0 failed=0 skipped=0
2233

23-
# Results/JUnit output
24-
RESULTS_DIR="${OUT_DIR}/rodinia_suite"
25-
mkdir -p "$RESULTS_DIR"
26-
JUNIT="$RESULTS_DIR/rodinia.xml"
27-
TMPCASE="$RESULTS_DIR/.cases.tmp"
28-
: >"$TMPCASE"
29-
3034
echo "[===================]"
3135

3236
for b in "${benchmarks[@]}"; do
@@ -53,13 +57,13 @@ for b in "${benchmarks[@]}"; do
5357
compare_files "$FILE1" "$FILE2" "$DIFFLOG" || rc=$?
5458
if (( rc == 0 )); then
5559
((++passed))
56-
printf ' <testcase classname="rodinia" name="%s" time="%s sec"/>\n' \
60+
printf ' <testcase classname="rodinia" name="%s" time(sec)="%s"/>\n' \
5761
"$b" "$sec" >>"$TMPCASE"
5862
else
5963
((++failed))
6064
short_ms=$(awk -v ms="${ms:-0}" 'BEGIN{printf "%.2f", ms+0}')
6165
# No embedded diff; just a short message pointing to the diff file
62-
printf ' <testcase classname="rodinia" name="%s" time="%s sec"><failure message="Output mismatch (see %s; avg %s ms)"/></testcase>\n' \
66+
printf ' <testcase classname="rodinia" name="%s" time(sec)="%s"><failure message="Output mismatch (see %s; avg %s ms)"/></testcase>\n' \
6367
"$b" "$sec" "$(basename "$DIFFLOG")" "$short_ms" >>"$TMPCASE"
6468
fi
6569
echo "[ AVG GPU time ] ${ms:-0} ms"

0 commit comments

Comments
 (0)