Skip to content

Commit babe523

Browse files
authored
Merge pull request #24 from boegel/configurable_env_for_shebang
pass custom env command in test_fix_shebang via --env-for-shebang command line option
2 parents ccde372 + 4a498d9 commit babe523

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/framework/toy_build.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
import sys
4141
import tempfile
4242
from distutils.version import LooseVersion
43-
from test.framework.utilities import EnhancedTestCase, TestLoaderFiltered, init_config
43+
from test.framework.utilities import EnhancedTestCase, TestLoaderFiltered
4444
from test.framework.package import mock_fpm
4545
from unittest import TextTestRunner
4646

@@ -2855,9 +2855,8 @@ def test_fix_shebang(self):
28552855
"Pattern '%s' found in %s: %s" % (bash_shebang_regex.pattern, bashbin_path, bashbin_txt))
28562856

28572857
# now test with a custom env command
2858-
init_config(build_options={'env_for_shebang': "/usr/bin/env -S"})
2859-
2860-
self.test_toy_build(ec_file=test_ec, raise_error=True)
2858+
extra_args = ['--env-for-shebang=/usr/bin/env -S']
2859+
self.test_toy_build(ec_file=test_ec, extra_args=extra_args, raise_error=True)
28612860

28622861
toy_bindir = os.path.join(self.test_installpath, 'software', 'toy', '0.0', 'bin')
28632862

0 commit comments

Comments
 (0)