From c6693c6b804a275b7a6e0cbe93b5934b8094f659 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 14 Dec 2022 21:52:06 +0000 Subject: [PATCH] tests: Fix check target Signed-off-by: Ian Jackson --- Makefile | 1 + test/common | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3219c50..98337c0 100644 --- a/Makefile +++ b/Makefile @@ -50,6 +50,7 @@ stamp/cargo-%: $(call rsrcs,.) $(stamp) stamp/t-%: test/t-% stamp/cargo-build $(wildcard test/*[^~]) + TARGET_RELEASE_DIR=$(abspath $(TARGET_RELEASE_DIR)) \ $(NAILING_CARGO_JUST_RUN) \ $(abspath test/capture-log) tmp/t-$*.log \ $(abspath test/go-with-unshare test/t-$*) diff --git a/test/common b/test/common index 14b8d1e..f712514 100644 --- a/test/common +++ b/test/common @@ -9,6 +9,9 @@ ssrc="${0%/*}" src="${ssrc%/*}" test="${ssrc%/*}/test" +target_bin_dir=${TARGET_RELEASE_DIR-target/debug} +target_bin_prefix=${target_bin_dir}${target_bin_dir+/} + fail () { echo >&2 "$0: fail: $*"; exit 1; } test-prep () { @@ -46,11 +49,11 @@ in-ns () { run-client () { in-ns client \ - target/debug/hippotat --config $test/test.cfg -DD "$@" + ${target_bin_prefix}hippotat --config $test/test.cfg -DD "$@" } run-server () { in-ns server \ - target/debug/hippotatd --config $test/test.cfg -DD "$@" + ${target_bin_prefix}hippotatd --config $test/test.cfg -DD "$@" } spawn () { { exec=exec; "$@"; } & -- 2.30.2