diff options
author | Ross Burton <ross.burton@intel.com> | 2019-10-04 11:54:47 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-10-15 23:46:35 +0300 |
commit | a1a8772034aef90e8d58230d8bcfce54ab27bf6a (patch) | |
tree | 7209cf26e6da0abe3d0b8e556cdf778d7c090da1 /test cases/unit/71 cross | |
parent | bd42cb965a1f2ef2927692bd75070404b951ea39 (diff) | |
download | meson-a1a8772034aef90e8d58230d8bcfce54ab27bf6a.zip meson-a1a8772034aef90e8d58230d8bcfce54ab27bf6a.tar.gz meson-a1a8772034aef90e8d58230d8bcfce54ab27bf6a.tar.bz2 |
Add test case to verify identity cross builds
A build with a cross file should always be identified as a cross build, even if
the host and build machine are identical. This was the case in 0.50, regressed
in 0.51, and is fixed again in 0.52, so add a test case to ensure it doesn't
regress again.
Diffstat (limited to 'test cases/unit/71 cross')
-rw-r--r-- | test cases/unit/71 cross/crossfile.in | 5 | ||||
-rw-r--r-- | test cases/unit/71 cross/meson.build | 16 | ||||
-rw-r--r-- | test cases/unit/71 cross/meson_options.txt | 1 |
3 files changed, 22 insertions, 0 deletions
diff --git a/test cases/unit/71 cross/crossfile.in b/test cases/unit/71 cross/crossfile.in new file mode 100644 index 0000000..678e8d3 --- /dev/null +++ b/test cases/unit/71 cross/crossfile.in @@ -0,0 +1,5 @@ +[host_machine] +system = '@system@' +cpu_family = '@cpu_family@' +cpu = '@cpu@' +endian = '@endian@' diff --git a/test cases/unit/71 cross/meson.build b/test cases/unit/71 cross/meson.build new file mode 100644 index 0000000..6c85cf7 --- /dev/null +++ b/test cases/unit/71 cross/meson.build @@ -0,0 +1,16 @@ +project('crosstest') + +if get_option('generate') + conf_data = configuration_data() + conf_data.set('system', build_machine.system()) + conf_data.set('cpu', build_machine.cpu()) + conf_data.set('cpu_family', build_machine.cpu_family()) + conf_data.set('endian', build_machine.endian()) + + configure_file(input: 'crossfile.in', + output: 'crossfile', + configuration: conf_data) + message('Written cross file') +else + assert(meson.is_cross_build(), 'not setup as cross build') +endif diff --git a/test cases/unit/71 cross/meson_options.txt b/test cases/unit/71 cross/meson_options.txt new file mode 100644 index 0000000..5896d63 --- /dev/null +++ b/test cases/unit/71 cross/meson_options.txt @@ -0,0 +1 @@ +option('generate', type : 'boolean', value : false) |