diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2016-07-17 16:00:21 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2016-07-17 16:00:21 +0200 |
commit | c5e53ec8da9b11e351893742096f76e2bceb5730 (patch) | |
tree | 61e0e57536b7ed5996ba9ecfbf41d914e3503d2f | |
parent | 45d74163463cb7bf43e764eab87c7bc3d179bda8 (diff) | |
download | elfinfo-c5e53ec8da9b11e351893742096f76e2bceb5730.tar.gz elfinfo-c5e53ec8da9b11e351893742096f76e2bceb5730.tar.bz2 elfinfo-c5e53ec8da9b11e351893742096f76e2bceb5730.tar.xz elfinfo-c5e53ec8da9b11e351893742096f76e2bceb5730.zip |
o Adding a tool to process a bunch of ld script and summarize the trial.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | ld/.gitignore | 1 | ||||
-rwxr-xr-x | ld/run-tests | 25 |
3 files changed, 27 insertions, 0 deletions
@@ -7,3 +7,4 @@ build /antlr4-build /antlr4-install /target +*.tmp.* diff --git a/ld/.gitignore b/ld/.gitignore new file mode 100644 index 0000000..0135abe --- /dev/null +++ b/ld/.gitignore @@ -0,0 +1 @@ +*.ld 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" |