mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Fix script_opt/cpp test scripts to work correctly on all platforms
This commit is contained in:
parent
c9f6b3463f
commit
067bbf82fb
4 changed files with 6 additions and 6 deletions
|
@ -6,7 +6,7 @@ gen_out=CPP-test/gen.$abbr
|
||||||
|
|
||||||
(
|
(
|
||||||
/bin/echo -n $1" "
|
/bin/echo -n $1" "
|
||||||
if ! src/zeek -O gen-C++ --optimize-files=testing/btest $1 >&$gen_out 2>&1; then
|
if ! src/zeek -O gen-C++ --optimize-files=testing/btest $1 >$gen_out 2>&1; then
|
||||||
echo "fail"
|
echo "fail"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
/bin/echo -n $1" "
|
/bin/echo -n $1" "
|
||||||
(src/zeek --parse-only $1 >&/dev/null && echo "success") || echo "fail"
|
(src/zeek --parse-only $1 >/dev/null 2>&1 && echo "success") || echo "fail"
|
||||||
|
|
|
@ -7,10 +7,10 @@ cp zeek.HOLD src/zeek || (
|
||||||
exit 1
|
exit 1
|
||||||
) || exit 1
|
) || exit 1
|
||||||
|
|
||||||
if [ "$1" == "-U" ]; then
|
if [ "$1" = "-U" ]; then
|
||||||
btest_opt=-U
|
btest_opt=-U
|
||||||
shift
|
shift
|
||||||
elif [ "$1" == "-d" ]; then
|
elif [ "$1" = "-d" ]; then
|
||||||
btest_opt=-d
|
btest_opt=-d
|
||||||
shift
|
shift
|
||||||
else
|
else
|
||||||
|
@ -32,7 +32,7 @@ export ZEEK_OPT_FILES="testing/btest"
|
||||||
)
|
)
|
||||||
|
|
||||||
# export -n ZEEK_GEN_CPP ZEEK_CPP_DIR ZEEK_OPT_FUNCS ZEEK_OPT_FILES
|
# export -n ZEEK_GEN_CPP ZEEK_CPP_DIR ZEEK_OPT_FUNCS ZEEK_OPT_FILES
|
||||||
export -n ZEEK_GEN_CPP ZEEK_REPORT_UNCOMPILABLE ZEEK_CPP_DIR ZEEK_OPT_FILES
|
unset ZEEK_GEN_CPP ZEEK_REPORT_UNCOMPILABLE ZEEK_CPP_DIR ZEEK_OPT_FILES
|
||||||
|
|
||||||
ninja
|
ninja
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,6 @@ find ../testing/btest -type f |
|
||||||
grep -E '\.(zeek|test)$' |
|
grep -E '\.(zeek|test)$' |
|
||||||
sort |
|
sort |
|
||||||
xargs grep -E -l '^[ ]*(event|print)' |
|
xargs grep -E -l '^[ ]*(event|print)' |
|
||||||
xargs grep -E -lc 'REQUIRES.*CPP.*((!=.*1)|(==.*0))' |
|
xargs grep -E -c 'REQUIRES.*CPP.*((!=.*1)|(==.*0))' |
|
||||||
grep ':0$' |
|
grep ':0$' |
|
||||||
sed 's,:0,,'
|
sed 's,:0,,'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue