Skip to content

Commit b91479a

Browse files
committed
tests: accommodate testing alternate target-triple
For example: make build-static-i686 make -C t STG_TARGET=i686-unknown-linux-musl STG_PROFILE=for-pkg
1 parent 73c265e commit b91479a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

t/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# STG_PROVE_OPTS = --jobs=9
88
STG_PROVE_OPTS ?=
99
STG_PROFILE ?=
10+
STG_TARGET ?=
1011
SHELL_PATH ?= $(SHELL)
1112
TEST_SHELL_PATH ?= $(SHELL_PATH)
1213
PERL_PATH ?= /usr/bin/perl

t/test-bin/stg

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,9 @@ then
66
else
77
profile_dir="$STG_PROFILE"
88
fi
9-
exec "$STG_ROOT/target/$profile_dir/stg" "$@"
9+
if [ -n "$STG_TARGET" ]
10+
then
11+
exec "$STG_ROOT/target/$STG_TARGET/$profile_dir/stg" "$@"
12+
else
13+
exec "$STG_ROOT/target/$profile_dir/stg" "$@"
14+
fi

0 commit comments

Comments
 (0)