From cc1290d07e9bb5662642846c50c97c853d1827b5 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 24 Oct 2012 21:59:01 +0000 Subject: Support cross-testing. --- posix/Makefile | 3 ++- posix/globtest.sh | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'posix') diff --git a/posix/Makefile b/posix/Makefile index add2ca5be6..853152ea99 100644 --- a/posix/Makefile +++ b/posix/Makefile @@ -117,7 +117,8 @@ ifeq ($(run-built-tests),yes) ifeq (yes,$(build-shared)) tests: $(objpfx)globtest.out $(objpfx)wordexp-tst.out $(objpfx)globtest.out: globtest.sh $(objpfx)globtest - $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' + $(SHELL) $< $(common-objpfx) '$(run-via-rtld-prefix)' \ + '$(test-wrapper)' '$(test-wrapper-env)' $(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' endif diff --git a/posix/globtest.sh b/posix/globtest.sh index ea947b855a..121be85961 100755 --- a/posix/globtest.sh +++ b/posix/globtest.sh @@ -20,7 +20,10 @@ set -e common_objpfx=$1; shift -run_program_prefix=$1; shift +run_via_rtld_prefix=$1; shift +test_wrapper=$1; shift +test_wrapper_env=$1; shift +run_program_prefix="${test_wrapper} ${run_via_rtld_prefix}" logfile=$common_objpfx/posix/globtest.out #CMP=cmp @@ -758,8 +761,9 @@ cat <<"EOF" | $CMP - $testout >> $logfile || failed=1 `dir6/file1[ab]' `nondir\/' EOF +${test_wrapper_env} \ HOME="$testdir" \ -${run_program_prefix} \ +${run_via_rtld_prefix} \ ${common_objpfx}posix/globtest -ct "$testdir" \ '~/dir1/file1_1' '~/dir1/file1_9' '~/dir3\*/file1' '~/dir3\*/file2' \ '~\/dir1/file1_2' | -- cgit 1.4.1