aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-03-20 18:46:32 +0200
committerGitHub <noreply@github.com>2019-03-20 18:46:32 +0200
commitf46b485fc2bee49c5fed763106136218bf0f82dc (patch)
tree22fc770252d7403fab4170d1214262cc0ba541df /run_unittests.py
parentac627bcea723b12e17822c18cccc9dbdeaee8b8f (diff)
parenta87b51f75cd81d89214c3ba6d36a3645b641b5aa (diff)
downloadmeson-f46b485fc2bee49c5fed763106136218bf0f82dc.zip
meson-f46b485fc2bee49c5fed763106136218bf0f82dc.tar.gz
meson-f46b485fc2bee49c5fed763106136218bf0f82dc.tar.bz2
Merge pull request #5083 from rossburton/crossfiles
Support multiple --cross-file options
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py23
1 files changed, 21 insertions, 2 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 1763c7a..f0410ab 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -612,7 +612,7 @@ class InternalTests(unittest.TestCase):
configfile.flush()
configfile.close()
opts = get_fake_options()
- opts.cross_file = configfilename
+ opts.cross_file = (configfilename,)
env = get_fake_env(opts=opts)
detected_value = env.need_exe_wrapper()
os.unlink(configfilename)
@@ -627,7 +627,7 @@ class InternalTests(unittest.TestCase):
config.write(configfile)
configfile.close()
opts = get_fake_options()
- opts.cross_file = configfilename
+ opts.cross_file = (configfilename,)
env = get_fake_env(opts=opts)
forced_value = env.need_exe_wrapper()
os.unlink(configfilename)
@@ -5871,6 +5871,25 @@ class CrossFileTests(BasePlatformTests):
'-Ddef_sharedstatedir=sharedstatebar',
'-Ddef_sysconfdir=sysconfbar'])
+ def test_cross_file_dirs_chain(self):
+ # crossfile2 overrides crossfile overrides nativefile
+ testcase = os.path.join(self.unit_test_dir, '57 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'),
+ '--cross-file', os.path.join(testcase, 'crossfile2'),
+ '-Ddef_bindir=binbar2',
+ '-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'])
class TAPParserTests(unittest.TestCase):
def assert_test(self, events, **kwargs):