summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2015-09-29 20:22:24 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2015-09-29 20:22:24 (GMT)
commitc4fc0ad2e86ca03de81332cc984db0e0ccd98959 (patch)
treea241e445694b160890d3b0bc3fc6f2db34549bda /test
parentf067b35d278ddafcc4e48668f0eade10c71a69c0 (diff)
downloadSCons-c4fc0ad2e86ca03de81332cc984db0e0ccd98959.zip
SCons-c4fc0ad2e86ca03de81332cc984db0e0ccd98959.tar.gz
SCons-c4fc0ad2e86ca03de81332cc984db0e0ccd98959.tar.bz2
Pull request # 234 (Bug #2840) code checkin. No tests yet
Diffstat (limited to 'test')
-rw-r--r--test/CPPDEFINES/pkg-config.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/CPPDEFINES/pkg-config.py b/test/CPPDEFINES/pkg-config.py
index 0656900..1b308d3 100644
--- a/test/CPPDEFINES/pkg-config.py
+++ b/test/CPPDEFINES/pkg-config.py
@@ -32,7 +32,8 @@ import TestSCons
test = TestSCons.TestSCons()
-if not test.where_is('pkg-config'):
+pkg_config_path = test.where_is('pkg-config')
+if not pkg_config_path:
test.skip_test("Could not find 'pkg-config' in system PATH, skipping test.\n")
test.write('bug.pc', """\
@@ -58,7 +59,7 @@ test.write('SConstruct', """\
# http://scons.tigris.org/issues/show_bug.cgi?id=2671
# Passing test cases
env_1 = Environment(CPPDEFINES=[('DEBUG','1'), 'TEST'])
-env_1.ParseConfig('PKG_CONFIG_PATH=. pkg-config --cflags bug')
+env_1.ParseConfig('PKG_CONFIG_PATH=. %(pkg_config_path)s --cflags bug')
print env_1.subst('$_CPPDEFFLAGS')
env_2 = Environment(CPPDEFINES=[('DEBUG','1'), 'TEST'])
@@ -67,7 +68,7 @@ print env_2.subst('$_CPPDEFFLAGS')
# Failing test cases
env_3 = Environment(CPPDEFINES={'DEBUG':1, 'TEST':None})
-env_3.ParseConfig('PKG_CONFIG_PATH=. pkg-config --cflags bug')
+env_3.ParseConfig('PKG_CONFIG_PATH=. %(pkg_config_path)s --cflags bug')
print env_3.subst('$_CPPDEFFLAGS')
env_4 = Environment(CPPDEFINES={'DEBUG':1, 'TEST':None})
@@ -76,10 +77,10 @@ print env_4.subst('$_CPPDEFFLAGS')
# http://scons.tigris.org/issues/show_bug.cgi?id=1738
env_1738_1 = Environment(tools=['default'])
-env_1738_1.ParseConfig('PKG_CONFIG_PATH=. pkg-config --cflags --libs bug')
+env_1738_1.ParseConfig('PKG_CONFIG_PATH=. %(pkg_config_path)s --cflags --libs bug')
env_1738_1.Append(CPPDEFINES={'value' : '1'})
print env_1738_1.subst('$_CPPDEFFLAGS')
-""")
+"""%locals() )
expect_print_output="""\
-DDEBUG=1 -DTEST -DSOMETHING -DVARIABLE=2