forked from BinaryAnalysisPlatform/bap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·30 lines (26 loc) · 723 Bytes
/
test.sh
File metadata and controls
executable file
·30 lines (26 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
TARGETS="arm x86 x86_64"
TEST_FILES=".*\(ls\|cp\|rm\|tr\|wc\)$"
LOADERS="llvm bap-elf"
if [ "x$1" != "x" ]; then
TEST_FILES=$1
fi
echo "Updating signatures"
bap-byteweight update
echo "done"
for target in $TARGETS; do
git clone --depth=1 https://github.com/BinaryAnalysisPlatform/$target-binaries.git
files=`find "$target-binaries" -regex $TEST_FILES -type f`
for loader in $LOADERS; do
for file in $files; do
printf '%s:%-70s ' $loader $file;
bap $file --loader=$loader -d > /dev/null;
if [ $? -eq 0 ]; then
echo 'ok';
else
echo 'fail';
exit 1
fi
done
done
done