diff options
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index 85474e8..e3b7c5c 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -1540,6 +1540,27 @@ class LinuxlikeTests(BasePlatformTests): env['LD_LIBRARY_PATH'] = installed_libdir self.assertEqual(subprocess.call(installed_exe, env=env), 0) +class LinuxArmCrossCompileTests(BasePlatformTests): + ''' + Tests that verify cross-compilation to Linux/ARM + ''' + def setUp(self): + super().setUp() + src_root = os.path.dirname(__file__) + self.meson_command += ['--cross=' + os.path.join(src_root, 'cross', 'ubuntu-armhf.txt')] + + def test_cflags_cross_environment_pollution(self): + ''' + Test that the CFLAGS environment variable does not pollute the cross + environment. This can't be an ordinary test case because we need to + inspect the compiler database. + ''' + testdir = os.path.join(self.common_test_dir, '3 static') + os.environ['CFLAGS'] = '-DBUILD_ENVIRONMENT_ONLY' + self.init(testdir) + compdb = self.get_compdb() + self.assertNotIn('-DBUILD_ENVIRONMENT_ONLY', compdb[0]['command']) + class RewriterTests(unittest.TestCase): def setUp(self): |