aboutsummaryrefslogtreecommitdiff
path: root/tools/tool.sh
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-10-04 08:58:47 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-10-04 08:58:47 +0200
commit32009294d2de3e197c8d4dc950559ff948ea2fc9 (patch)
treeac297be7b6e218ee8ae21367c94c8b65297fe2ca /tools/tool.sh
parent757a732336ee5f0f4b0ba44ac138210c2c1ef805 (diff)
downloadnissy-core-32009294d2de3e197c8d4dc950559ff948ea2fc9.tar.gz
nissy-core-32009294d2de3e197c8d4dc950559ff948ea2fc9.zip
Clean up tool output
Diffstat (limited to 'tools/tool.sh')
-rwxr-xr-xtools/tool.sh29
1 files changed, 25 insertions, 4 deletions
diff --git a/tools/tool.sh b/tools/tool.sh
index 64bfd89..23d781d 100755
--- a/tools/tool.sh
+++ b/tools/tool.sh
@@ -8,15 +8,36 @@ fi
8CC="$CC -D_POSIX_C_SOURCE=199309L" # For timer 8CC="$CC -D_POSIX_C_SOURCE=199309L" # For timer
9 9
10BIN="tools/run" 10BIN="tools/run"
11d="$(date +'%Y-%m-%d-%H-%M-%S')" 11RESULTS="tools/results"
12LAST="$RESULTS/last.out"
13date="$(date +'%Y-%m-%d-%H-%M-%S')"
12 14
13for t in tools/*; do 15for t in tools/*; do
14 if [ ! -d "$t" ] || ! (echo "$t" | grep -q "$TOOL"); then 16 if [ ! -d "$t" ] || ! (echo "$t" | grep -q "$TOOL"); then
15 continue 17 continue
16 fi 18 fi
17 toolname="$(basename "$t" .c)" 19 toolname="$(basename "$t" .c)"
18 $CC -o $BIN "$t"/*.c "$OBJ" || exit 1;
19 $BIN $TOOLARGS \
20 | tee "tools/results/$toolname-$d.txt" "tools/results/last.out"
21 break 20 break
22done 21done
22
23file="$RESULTS/$toolname-$date.txt"
24
25$CC -o $BIN "$t"/*.c "$OBJ" || exit 1;
26
27(
28date +'%Y-%m-%d %H:%M'
29echo ""
30echo "======== config.mk ========"
31cat config.mk
32echo "==========================="
33echo ""
34echo "=== tool configuration ===="
35echo "TOOL=$toolname"
36echo "TOOLARGS=$TOOLARGS"
37echo "CC=$CC"
38echo "==========================="
39echo ""
40echo "======= tool output ======="
41$BIN $TOOLARGS
42echo "==========================="
43) | tee "$file" "$LAST"

Generated with cgit - Back to sebastiano.tronto.net