Skip to content

Commit

Permalink
Trying to make tests work with different build types
Browse files Browse the repository at this point in the history
  • Loading branch information
jbendes committed Nov 26, 2024
1 parent 9c5151b commit 020b21d
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions test/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,32 +29,35 @@ export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")
tmpdir=$(mktemp -d)
tmpdirAsan=$(mktemp -d)

cd $ROOTDIR

build_examples() {
set +u +o pipefail
trap - ERR
source $ROOTDIR/examples/env $1
source ./examples/env $1
set -u -o pipefail
trap command_failed ERR
$ROOTDIR/waf build_examples$2
$ROOTDIR/waf build_tests$2
$ROOTDIR/test/run-tests.sh "$2"
./waf build_examples$2
./waf build_tests$2
if [ -n "$2" ]; then ln -sf $ROOTDIR/build/tests"$2" ./build/tests; fi
./test/run-tests.sh "$2"
}

# Basic build
$ROOTDIR/waf distclean configure build
./waf distclean configure build

# Full build
$ROOTDIR/waf distclean
$ROOTDIR/waf configure --use-all --use-third-party --use-dev \
--track-traffic-topology=true --prefix=$tmpdir
$ROOTDIR/waf build
$ROOTDIR/waf install
./waf distclean
./waf configure --use-all --use-third-party --use-dev \
--track-traffic-topology=true --prefix=$tmpdir
./waf build
./waf install
(build_examples $tmpdir "")

# Full build asan
$ROOTDIR/waf distclean
$ROOTDIR/waf configure --use-all --use-third-party --use-dev \
--track-traffic-topology=true --prefix=$tmpdirAsan
$ROOTDIR/waf build_asan
$ROOTDIR/waf install_asan
./waf distclean
./waf configure --use-all --use-third-party --use-dev \
--track-traffic-topology=true --prefix=$tmpdirAsan
./waf build_asan
./waf install_asan
(build_examples $tmpdirAsan "_asan")

0 comments on commit 020b21d

Please sign in to comment.