diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-02-12 20:04:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-12 20:04:23 +0200 |
commit | 82e4cb7731e59237746e480f9611700f1d4fda76 (patch) | |
tree | 24e8133c742258833badd29a03188cb72bb0e044 /run_unittests.py | |
parent | ccdac894eedebfb49a90f87a3752cbcfeb28083e (diff) | |
parent | 0eccce799f5643dda7a65f3e841cd54785f03ec5 (diff) | |
download | meson-82e4cb7731e59237746e480f9611700f1d4fda76.zip meson-82e4cb7731e59237746e480f9611700f1d4fda76.tar.gz meson-82e4cb7731e59237746e480f9611700f1d4fda76.tar.bz2 |
Merge pull request #4743 from dcbaker/native-file-extended
Extend native files to store install path information
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 58 |
1 files changed, 57 insertions, 1 deletions
diff --git a/run_unittests.py b/run_unittests.py index a244bbd..9dd734a 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -5438,6 +5438,62 @@ class NativeFileTests(BasePlatformTests): compiler = env.detect_swift_compiler() self.assertEqual(compiler.version, '1.2345') + def test_native_file_dirs(self): + testcase = os.path.join(self.unit_test_dir, '54 native file override') + self.init(testcase, default_args=False, + extra_args=['--native-file', os.path.join(testcase, 'nativefile')]) + + def test_native_file_dirs_overriden(self): + testcase = os.path.join(self.unit_test_dir, '54 native file override') + self.init(testcase, default_args=False, + extra_args=['--native-file', os.path.join(testcase, 'nativefile'), + '-Ddef_libdir=liblib', '-Dlibdir=liblib']) + + +class CrossFileTests(BasePlatformTests): + + """Tests for cross file functioality not directly related to + cross compiling. + + This is mainly aimed to testing overrides from cross files. + """ + + def test_cross_file_dirs(self): + testcase = os.path.join(self.unit_test_dir, '54 native file override') + self.init(testcase, default_args=False, + extra_args=['--native-file', os.path.join(testcase, 'nativefile'), + '--cross-file', os.path.join(testcase, 'crossfile'), + '-Ddef_bindir=binbar', + '-Ddef_datadir=databar', + '-Ddef_includedir=includebar', + '-Ddef_infodir=infobar', + '-Ddef_libdir=libbar', + '-Ddef_libexecdir=libexecbar', + '-Ddef_localedir=localebar', + '-Ddef_localstatedir=localstatebar', + '-Ddef_mandir=manbar', + '-Ddef_sbindir=sbinbar', + '-Ddef_sharedstatedir=sharedstatebar', + '-Ddef_sysconfdir=sysconfbar']) + + def test_cross_file_dirs_overriden(self): + testcase = os.path.join(self.unit_test_dir, '54 native file override') + self.init(testcase, default_args=False, + extra_args=['--native-file', os.path.join(testcase, 'nativefile'), + '--cross-file', os.path.join(testcase, 'crossfile'), + '-Ddef_libdir=liblib', '-Dlibdir=liblib', + '-Ddef_bindir=binbar', + '-Ddef_datadir=databar', + '-Ddef_includedir=includebar', + '-Ddef_infodir=infobar', + '-Ddef_libexecdir=libexecbar', + '-Ddef_localedir=localebar', + '-Ddef_localstatedir=localstatebar', + '-Ddef_mandir=manbar', + '-Ddef_sbindir=sbinbar', + '-Ddef_sharedstatedir=sharedstatebar', + '-Ddef_sysconfdir=sysconfbar']) + def unset_envs(): # For unit tests we must fully control all command lines @@ -5457,7 +5513,7 @@ def should_run_cross_mingw_tests(): def main(): unset_envs() cases = ['InternalTests', 'DataTests', 'AllPlatformTests', 'FailureTests', - 'PythonTests', 'NativeFileTests', 'RewriterTests'] + 'PythonTests', 'NativeFileTests', 'RewriterTests', 'CrossFileTests'] if not is_windows(): cases += ['LinuxlikeTests'] if should_run_cross_arm_tests(): |