diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-06-06 19:19:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-06 19:19:06 +0300 |
commit | 09a722c4bd6bf3014190ecc4d91eee1110affd99 (patch) | |
tree | d90a1df01feb683efa47cb75b87e26ba3eef11c4 /run_unittests.py | |
parent | 27c5d9f16f535b2aacdf009744d4f99d59b9c81f (diff) | |
parent | 82e36a6bfe3c765e81438492bdff81e248f11c53 (diff) | |
download | meson-09a722c4bd6bf3014190ecc4d91eee1110affd99.zip meson-09a722c4bd6bf3014190ecc4d91eee1110affd99.tar.gz meson-09a722c4bd6bf3014190ecc4d91eee1110affd99.tar.bz2 |
Merge pull request #5263 from Ericson2314/per-machine-cli-args
Per machine 'build_' and '' options
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/run_unittests.py b/run_unittests.py index b8f0bf2..0a13174 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -1088,7 +1088,10 @@ class DataTests(unittest.TestCase): found_entries |= arches break - self.assertEqual(found_entries, set(mesonbuild.coredata.builtin_options.keys())) + self.assertEqual(found_entries, set([ + *mesonbuild.coredata.builtin_options.keys(), + *mesonbuild.coredata.builtin_options_per_machine.keys() + ])) def test_cpu_families_documented(self): with open("docs/markdown/Reference-tables.md") as f: @@ -5193,8 +5196,15 @@ endian = 'little' @skipIfNoPkgconfig def test_pkg_config_option(self): testdir = os.path.join(self.unit_test_dir, '55 pkg_config_path option') - self.init(testdir, extra_args=['-Dpkg_config_path=' + os.path.join(testdir, 'extra_path')]) + self.init(testdir, extra_args=['-Dpkg_config_path=' + os.path.join(testdir, 'host_extra_path')]) + def test_std_remains(self): + # C_std defined in project options must be in effect also when native compiling. + testdir = os.path.join(self.unit_test_dir, '50 std remains') + self.init(testdir) + compdb = self.get_compdb() + self.assertRegex(compdb[0]['command'], '-std=c99') + self.build() def should_run_cross_arm_tests(): return shutil.which('arm-linux-gnueabihf-gcc') and not platform.machine().lower().startswith('arm') @@ -5247,6 +5257,14 @@ class LinuxCrossArmTests(BasePlatformTests): return self.assertTrue(False, 'Option libdir not in introspect data.') + def test_std_remains(self): + # C_std defined in project options must be in effect also when cross compiling. + testdir = os.path.join(self.unit_test_dir, '50 std remains') + self.init(testdir) + compdb = self.get_compdb() + self.assertRegex(compdb[0]['command'], '-std=c99') + self.build() + def should_run_cross_mingw_tests(): return shutil.which('x86_64-w64-mingw32-gcc') and not (is_windows() or is_cygwin()) @@ -5294,7 +5312,10 @@ class LinuxCrossMingwTests(BasePlatformTests): @skipIfNoPkgconfig def test_cross_pkg_config_option(self): testdir = os.path.join(self.unit_test_dir, '55 pkg_config_path option') - self.init(testdir, extra_args=['-Dcross_pkg_config_path=' + os.path.join(testdir, 'extra_path')]) + self.init(testdir, extra_args=[ + '-Dbuild.pkg_config_path=' + os.path.join(testdir, 'build_extra_path'), + '-Dpkg_config_path=' + os.path.join(testdir, 'host_extra_path'), + ]) class PythonTests(BasePlatformTests): |