aboutsummaryrefslogtreecommitdiff
path: root/tools/tool.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-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