From 4a498d97a183b0b41c48ee00437110cb883ea820 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 16 Mar 2021 21:51:35 +0100 Subject: [PATCH] pass custom env command in test_fix_shebang via --env-for-shebang command line option --- test/framework/toy_build.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/framework/toy_build.py b/test/framework/toy_build.py index 0cf73cae29..296ab8b05b 100644 --- a/test/framework/toy_build.py +++ b/test/framework/toy_build.py @@ -40,7 +40,7 @@ import sys import tempfile from distutils.version import LooseVersion -from test.framework.utilities import EnhancedTestCase, TestLoaderFiltered, init_config +from test.framework.utilities import EnhancedTestCase, TestLoaderFiltered from test.framework.package import mock_fpm from unittest import TextTestRunner @@ -2855,9 +2855,8 @@ def test_fix_shebang(self): "Pattern '%s' found in %s: %s" % (bash_shebang_regex.pattern, bashbin_path, bashbin_txt)) # now test with a custom env command - init_config(build_options={'env_for_shebang': "/usr/bin/env -S"}) - - self.test_toy_build(ec_file=test_ec, raise_error=True) + extra_args = ['--env-for-shebang=/usr/bin/env -S'] + self.test_toy_build(ec_file=test_ec, extra_args=extra_args, raise_error=True) toy_bindir = os.path.join(self.test_installpath, 'software', 'toy', '0.0', 'bin')