aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2019-03-19 19:33:30 -0400
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2019-03-27 14:45:42 +0000
commitd361da991bbcf8b6a97205615ac5489112be79ff (patch)
treeae299bcf901f54e563e6a32e7354375bc4e8b13f /run_unittests.py
parente677704d2149db9ac91c5000633a3fac8f91956f (diff)
downloadmeson-d361da991bbcf8b6a97205615ac5489112be79ff.zip
meson-d361da991bbcf8b6a97205615ac5489112be79ff.tar.gz
meson-d361da991bbcf8b6a97205615ac5489112be79ff.tar.bz2
Change test to reflect new semantics
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/run_unittests.py b/run_unittests.py
index f0410ab..f22a9b2 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -2041,7 +2041,8 @@ class AllPlatformTests(BasePlatformTests):
def test_preprocessor_checks_CPPFLAGS(self):
'''
- Test that preprocessor compiler checks read CPPFLAGS but not CFLAGS
+ Test that preprocessor compiler checks read CPPFLAGS and also CFLAGS but
+ not LDFLAGS.
'''
testdir = os.path.join(self.common_test_dir, '137 get define')
define = 'MESON_TEST_DEFINE_VALUE'
@@ -2051,9 +2052,10 @@ class AllPlatformTests(BasePlatformTests):
# % and # confuse the MSVC preprocessor
# !, ^, *, and < confuse lcc preprocessor
value = 'spaces and fun@$&()-=_+{}[]:;>?,./~`'
- os.environ['CPPFLAGS'] = '-D{}="{}"'.format(define, value)
- os.environ['CFLAGS'] = '-DMESON_FAIL_VALUE=cflags-read'.format(define)
- self.init(testdir, ['-D{}={}'.format(define, value)])
+ for env_var in ['CPPFLAGS', 'CFLAGS']:
+ os.environ[env_var] = '-D{}="{}"'.format(define, value)
+ os.environ['LDFLAGS'] = '-DMESON_FAIL_VALUE=cflags-read'.format(define)
+ self.init(testdir, ['-D{}={}'.format(define, value)])
def test_custom_target_exe_data_deterministic(self):
testdir = os.path.join(self.common_test_dir, '114 custom target capture')