diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-05-29 14:05:21 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-05-29 14:05:21 +0200 |
commit | f69a53d0b83f6b6448aeacb98442b90e938696f3 (patch) | |
tree | edfd544ed849eacbdc2d23f16aef6e27f34ad13c /tests/common.test | |
parent | d2d15fd4f70da8959d8222229c4e12c85ead8db3 (diff) |
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.
Diffstat (limited to 'tests/common.test')
-rw-r--r-- | tests/common.test | 21 |
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 |