aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-02-20 07:20:18 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-02-21 01:36:08 +0530
commit69e83d6aed89745bad540295e4a93ef37265e1b3 (patch)
treed8ab0f3f1a9481e9f22bd38884c42b52290b5b3a /run_unittests.py
parent003e0a0610582020d1b213e0c8d16fe63bc6eabe (diff)
downloadmeson-69e83d6aed89745bad540295e4a93ef37265e1b3.zip
meson-69e83d6aed89745bad540295e4a93ef37265e1b3.tar.gz
meson-69e83d6aed89745bad540295e4a93ef37265e1b3.tar.bz2
Support passing of options to compilers and linkers
If you pass options, the last element in the array won't be the compiler basename, so just check if the basename is in the exelist somewhere. Includes a test.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 1622916..10aa8ac 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -801,17 +801,17 @@ class AllPlatformTests(BasePlatformTests):
self.assertIsInstance(linker, lib)
self.assertEqual(cc.id, 'msvc')
# Set evar ourselves to a wrapper script that just calls the same
- # exelist. This is meant to test that setting something like
- # `ccache gcc` or `distcc ccache gcc` works fine.
+ # exelist + some argument. This is meant to test that setting
+ # something like `ccache gcc -pipe` or `distcc ccache gcc` works.
wrapper = os.path.join(testdir, 'compiler wrapper.py')
- wrappercc = [sys.executable, wrapper] + cc.get_exelist()
+ wrappercc = [sys.executable, wrapper] + cc.get_exelist() + cc.get_always_args()
wrappercc_s = ''
for w in wrappercc:
wrappercc_s += shlex.quote(w) + ' '
os.environ[evar] = wrappercc_s
wcc = getattr(env, 'detect_{}_compiler'.format(lang))(False)
# Check static linker too
- wrapperlinker = [sys.executable, wrapper] + linker.get_exelist()
+ wrapperlinker = [sys.executable, wrapper] + linker.get_exelist() + linker.get_always_args()
wrapperlinker_s = ''
for w in wrapperlinker:
wrapperlinker_s += shlex.quote(w) + ' '