Skip to content

Commit

Permalink
test: Allow building test binaries with -asan
Browse files Browse the repository at this point in the history
Signed-off-by: Cole Miller <cole.miller@canonical.com>
  • Loading branch information
cole-miller committed Jul 6, 2023
1 parent cb3fab6 commit 76bece9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion test/dqlite-demo-util.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# dqlite-demo test utilities

GO=${GO:-go}
ASAN=${ASAN:-}
VERBOSE=${VERBOSE:-0}
DISK=${DISK:-0}

$GO build -tags libsqlite3 ./cmd/dqlite-demo/
$GO build -tags libsqlite3 $ASAN ./cmd/dqlite-demo/

DIR=$(mktemp -d)

Expand Down
4 changes: 3 additions & 1 deletion test/recover.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
#
# Test the dqlite cluster recovery.

ASAN=${ASAN:-}

BASEDIR=$(dirname "$0")
. "$BASEDIR"/dqlite-demo-util.sh

$GO build -tags libsqlite3 ./cmd/dqlite/
$GO build -tags libsqlite3 $ASAN ./cmd/dqlite/

trap tear_down EXIT
trap sig_handler HUP INT TERM
Expand Down
3 changes: 2 additions & 1 deletion test/roles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
# Test dynamic roles management.

GO=${GO:-go}
ASAN=${ASAN:-}
VERBOSE=${VERBOSE:-0}
DIR=$(mktemp -d)
BINARY=$DIR/main
CLUSTER=127.0.0.1:9001,127.0.0.1:9002,127.0.0.1:9003,127.0.0.1:9004,127.0.0.1:9005,127.0.0.1:9006
N=7
DISK=${DISK:-0}

$GO build -tags libsqlite3 ./cmd/dqlite/
$GO build -tags libsqlite3 $ASAN ./cmd/dqlite/


set_up_binary() {
Expand Down

0 comments on commit 76bece9

Please sign in to comment.