@@ -17,9 +17,9 @@ test -z "" 2>/dev/null || { echo Error: test command not found ; exit 1 ; }
17
17
GREP=` type grep > /dev/null 2>&1 && echo OK`
18
18
test " $GREP " = OK || { echo Error: grep command not found ; exit 1 ; }
19
19
echo foobar | grep -qE ' asd|oob' 2> /dev/null || { echo Error: grep command does not support -q and/or -E option ; exit 1 ; }
20
- test -e ./test-all.sh || cd $( dirname $0 ) || exit 1
20
+ test -e ./test-all.sh || cd $( dirname " $0 " ) || exit 1
21
21
test -e ./test-all.sh || { echo Error: you must be in the test/ directory ; exit 1 ; }
22
- export AFL_PATH=` pwd` /..
22
+ export AFL_PATH=" $( pwd) /.."
23
23
export AFL_TRY_AFFINITY=1 # workaround for travis that fails for no avail cores
24
24
25
25
echo 1 > test.1
@@ -59,7 +59,7 @@ $ECHO \\101 2>&1 | grep -qE '^A' || {
59
59
$ECHO " \\ 101" 2>&1 | grep -qE ' ^A' || ECHO=
60
60
}
61
61
}
62
- test -z " $ECHO " && { printf Error: printf command does not support octal character codes ; exit 1 ; }
62
+ test -z " $ECHO " && { echo Error: printf command does not support octal character codes ; exit 1 ; }
63
63
64
64
export AFL_EXIT_WHEN_DONE=1
65
65
export AFL_EXIT_ON_TIME=60
@@ -109,19 +109,24 @@ test -n "$TRAVIS_OS_NAME" && {
109
109
110
110
# on OpenBSD we need to work with llvm from /usr/local/bin
111
111
test -e /usr/local/bin/opt && {
112
- test ` uname -s` = ' Darwin' || export PATH=" /usr/local/bin:${PATH} "
112
+ test " $( uname -s) " = ' Darwin' || export PATH=" /usr/local/bin:${PATH} "
113
113
}
114
114
AFL_COMPILER=afl-clang-fast
115
115
116
- SYS=` uname -m`
117
-
118
116
GREY=" \\ 033[1;90m"
119
117
BLUE=" \\ 033[1;94m"
120
118
GREEN=" \\ 033[0;32m"
121
119
RED=" \\ 033[0;31m"
122
120
YELLOW=" \\ 033[1;93m"
123
121
RESET=" \\ 033[0m"
124
122
123
+ if test -n " $CPU_TARGET " ; then
124
+ $ECHO " ${RESET}${GREY} [*] Using environment variable CPU_TARGET=$CPU_TARGET for SYS"
125
+ SYS=" $CPU_TARGET "
126
+ else
127
+ SYS=$( uname -m)
128
+ fi
129
+
125
130
MEM_LIMIT=none
126
131
127
132
export PATH=" ${PATH} :/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
0 commit comments