aboutsummaryrefslogtreecommitdiff
path: root/tests/common.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/common.test')
-rw-r--r--tests/common.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/common.test b/tests/common.test
index b8d6148..0e8ce52 100644
--- a/tests/common.test
+++ b/tests/common.test
@@ -5,6 +5,27 @@
# Commonly-used build system test project setup and driver command line.
#
+# If the includer indicated that no cross-testing should be supported, then
+# use the build system driver that is building, not the one being built.
+#
+# In many cases expecting a cross-compiled driver to perform a native build
+# under emulation is pushing things a bit too far. Plus, we have no way of
+# knowing the native compiler name/path.
+#
+# So the idea here is to test cross-compilation with the understanding that
+# the build system driver we are testing is not the one being cross-compiled
+# but rather the one doing the cross-compilation.
+#
+if ($null($crosstest))
+ crosstest = false
+end
+
+if (!$crosstest && $test.target != $build.host)
+ test = $recall($build.path)
+end
+
+# Common bootstrap.build.
+#
+mkdir build
+cat <<EOI >=build/bootstrap.build
project = test