It would also be nice to give the users/developers an hint on how to force the use of cross-compilers in the testsuite at runtime; I've thus applied, to the 'testsuite-work' branch, the two attached patches, the first one of which updates `tests/README' appropriately w.r.t. cross compiling issues, and the second one of which introduces a small follow-up consistency change.
Regards, Stefano
From 542a22a1b2f7b6328ce7d9e6892d85f2ae1646b7 Mon Sep 17 00:00:00 2001 Message-Id: <542a22a1b2f7b6328ce7d9e6892d85f2ae1646b7.1305968636.git.stefano.lattar...@gmail.com> From: Stefano Lattarini <stefano.lattar...@gmail.com> Date: Sat, 21 May 2011 10:59:53 +0200 Subject: [PATCH 1/2] tests/README: suggest how to run tests in cross-compile mode * tests/README (Section "User interface" subsection "Running the tests"): Briefly explain how to override 'host_alias' at runtime to force the use of cross-compilers by the testsuite. Give an example. --- ChangeLog | 8 ++++++++ tests/README | 13 +++++++++++++ 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index fd23cb9..587490a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2011-05-21 Stefano Lattarini <stefano.lattar...@gmail.com> + tests/README: suggest how to run tests in cross-compile mode + * tests/README (Section "User interface" subsection "Running the + tests"): Briefly explain how to override 'host_alias' at runtime + to force the use of cross-compilers by the testsuite. Give an + example. + +2011-05-21 Stefano Lattarini <stefano.lattar...@gmail.com> + test defs: better detection of cross-compile mode * configure.ac (AC_CANONICAL_HOST): New, probably not strictly necessary, but useful to complements AC_CANONICAL_BUILD. diff --git a/tests/README b/tests/README index 29c964b..4d6bbf6 100644 --- a/tests/README +++ b/tests/README @@ -32,6 +32,19 @@ Running the tests env TESTS="foo.test bar.test" make -e -k check + To run the tests in cross-compilation mode: + + make -k check host_alias="$host_alias" (GNU make) + env host_alias="$host_alias" make -e -k check (non-GNU make) + + Here `$host_alias' should be defined to a proper value different from + configure-determined `$build_alias', and should refer to a set of + cross-compilers you have available on your system; for example, if + on Linux you have a set of MinGW-targeted cross-compilers named + 'i586-mingw32msvc-cc', 'i586-mingw32msvc-c++', etc., you could use: + + make -k check host_alias='i586-mingw32msvc' + Interpretation -------------- -- 1.7.2.3
From deb4f3b66a082684da7cca051ce32b80abced2ec Mon Sep 17 00:00:00 2001 Message-Id: <deb4f3b66a082684da7cca051ce32b80abced2ec.1305968636.git.stefano.lattar...@gmail.com> In-Reply-To: <542a22a1b2f7b6328ce7d9e6892d85f2ae1646b7.1305968636.git.stefano.lattar...@gmail.com> References: <542a22a1b2f7b6328ce7d9e6892d85f2ae1646b7.1305968636.git.stefano.lattar...@gmail.com> From: Stefano Lattarini <stefano.lattar...@gmail.com> Date: Sat, 21 May 2011 11:03:00 +0200 Subject: [PATCH 2/2] tests/README: small consistency improvement * tests/README (Section "User interface" subsection "Running the tests"): In examples, be more consistent w.r.t. the differences between GNU and non-GNU make. --- ChangeLog | 7 +++++++ tests/README | 11 ++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 587490a..39a2066 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2011-05-21 Stefano Lattarini <stefano.lattar...@gmail.com> + tests/README: small consistency improvement + * tests/README (Section "User interface" subsection "Running the + tests"): In examples, be more consistent w.r.t. the differences + between GNU and non-GNU make. + +2011-05-21 Stefano Lattarini <stefano.lattar...@gmail.com> + tests/README: suggest how to run tests in cross-compile mode * tests/README (Section "User interface" subsection "Running the tests"): Briefly explain how to override 'host_alias' at runtime diff --git a/tests/README b/tests/README index 4d6bbf6..14a128d 100644 --- a/tests/README +++ b/tests/README @@ -26,16 +26,13 @@ Running the tests To run only selected tests: - make -k check TESTS="foo.test bar.test" - - For non-GNU make, you might have to use this instead: - - env TESTS="foo.test bar.test" make -e -k check + make -k check TESTS="foo.test bar.test" (GNU make) + env TESTS="foo.test bar.test" make -e -k check (non-GNU make) To run the tests in cross-compilation mode: - make -k check host_alias="$host_alias" (GNU make) - env host_alias="$host_alias" make -e -k check (non-GNU make) + make -k check host_alias="$host_alias" (GNU make) + env host_alias="$host_alias" make -e -k check (non-GNU make) Here `$host_alias' should be defined to a proper value different from configure-determined `$build_alias', and should refer to a set of -- 1.7.2.3