aboutsummaryrefslogtreecommitdiff
path: root/ld/run-tests
diff options
context:
space:
mode:
Diffstat (limited to 'ld/run-tests')
-rwxr-xr-xld/run-tests25
1 files changed, 25 insertions, 0 deletions
diff --git a/ld/run-tests b/ld/run-tests
new file mode 100755
index 0000000..e3f5d25
--- /dev/null
+++ b/ld/run-tests
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+elf=$1; shift
+
+report=../report.`date`.tmp.txt
+summary=../report.`date`.summary.tmp.txt
+
+find $@ -name \*.ld | sort 2>/dev/null | while read ld
+do
+ echo "$ld"
+ echo "L $ld" >> "$report"
+ (./elfinfo -f $elf -l $ld 2>&1; if [[ $? = 0 ]]; then echo "S pass" >> "$report"; else echo "S fail" >> "$report"; fi) | while read line
+ do
+ echo "O $line" >> "$report"
+ done
+done
+
+cat "$report" | sed -n 's,^[LS] \(.*\),\1,p' | while read ld
+do
+ read status
+ echo $status $ld >> "$summary"
+done
+cat "$report" | sed -n 's,^S \(.*\),\1,p' | sort | uniq -c >> "$summary"
+
+cat "$summary"