zeek/src/script_opt/CPP/single-full-test.sh
Benjamin Bannier 1f388e3f40 Format shell scripts with shfmt.
All changes in this patch were performed automatically with `shfmt` with
configuration flags specified in `.pre-commit-config.yaml`.

In addition to fixing whitespace the roundtrip through shfmt's AST also
transforms command substitutions

    `cmd`
    # becomes
    $(cmd)

and some redirects

    >&2 echo "msg"
    # becomes
    echo >&2 "msg"
2021-11-24 23:13:02 +01:00

24 lines
480 B
Bash
Executable file

#! /bin/sh
echo $1
base=../../..
test=$base/testing/btest
build=$base/build
gen=CPP-gen.cc
./non-embedded-build >$build/errs 2>&1 || echo non-embedded build failed
export -n ZEEK_USE_CPP
export ZEEK_HASH_DIR=$test ZEEK_GEN_CPP=
cd $test
../../auxil/btest/btest $1 >jbuild-$1.out 2>&1
grep -c '^namespace' $gen
mv $gen $build/
cd $build
ninja >&errs || echo build for $1 failed
export -n ZEEK_GEN_CPP
cd $test
rm -rf .tmp
../../auxil/btest/btest -a cpp -f cpp-test.$1.diag $1