From f69a53d0b83f6b6448aeacb98442b90e938696f3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 29 May 2017 14:05:21 +0200 Subject: Add ability to limit amount of preprocessing done on source The cc.preprocessed variable can be 'none' (not preprocessed), 'includes' (no depends on preprocessor, e.g., #ifdef, etc), and 'all' (the source is fully preprocessed). Note that for 'all' the source can still contain comments and line continuations. --- tests/common.test | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'tests/common.test') 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 <=build/bootstrap.build project = test -- cgit v1.1