mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 894776 - mach doesn't properly handle spaces in mozconfig commands. r=gps
This commit is contained in:
parent
bfc566cb33
commit
585c4df19d
@ -11,7 +11,7 @@ set -e
|
||||
|
||||
ac_add_options() {
|
||||
local opt
|
||||
for opt in $*; do
|
||||
for opt; do
|
||||
echo "------BEGIN_AC_OPTION"
|
||||
echo $opt
|
||||
echo "------END_AC_OPTION"
|
||||
@ -19,7 +19,7 @@ ac_add_options() {
|
||||
}
|
||||
|
||||
ac_add_app_options() {
|
||||
local app opt
|
||||
local app
|
||||
app=$1
|
||||
shift
|
||||
echo "------BEGIN_AC_APP_OPTION"
|
||||
@ -30,7 +30,7 @@ ac_add_app_options() {
|
||||
|
||||
mk_add_options() {
|
||||
local opt
|
||||
for opt in $*; do
|
||||
for opt; do
|
||||
echo "------BEGIN_MK_OPTION"
|
||||
echo $opt
|
||||
echo "------END_MK_OPTION"
|
||||
|
@ -171,13 +171,13 @@ class TestMozconfigLoader(unittest.TestCase):
|
||||
with NamedTemporaryFile(mode='w') as mozconfig:
|
||||
mozconfig.write('ac_add_options --enable-debug\n')
|
||||
mozconfig.write('ac_add_options --disable-tests --enable-foo\n')
|
||||
mozconfig.write('ac_add_options --foo="bar"\n')
|
||||
mozconfig.write('ac_add_options --foo="bar baz"\n')
|
||||
mozconfig.flush()
|
||||
|
||||
result = self.get_loader().read_mozconfig(mozconfig.name)
|
||||
self.assertEqual(result['configure_args'], [
|
||||
'--enable-debug', '--disable-tests', '--enable-foo',
|
||||
'--foo=bar'])
|
||||
'--foo=bar baz'])
|
||||
|
||||
def test_read_ac_options_substitution(self):
|
||||
"""Ensure ac_add_options values are substituted."""
|
||||
@ -213,14 +213,14 @@ class TestMozconfigLoader(unittest.TestCase):
|
||||
with NamedTemporaryFile(mode='w') as mozconfig:
|
||||
mozconfig.write('mk_add_options MOZ_OBJDIR=/foo/bar\n')
|
||||
mozconfig.write('mk_add_options MOZ_MAKE_FLAGS=-j8\n')
|
||||
mozconfig.write('mk_add_options FOO=BAR\n')
|
||||
mozconfig.write('mk_add_options FOO="BAR BAZ"\n')
|
||||
mozconfig.write('mk_add_options BIZ=1\n')
|
||||
mozconfig.flush()
|
||||
|
||||
result = self.get_loader().read_mozconfig(mozconfig.name)
|
||||
self.assertEqual(result['topobjdir'], '/foo/bar')
|
||||
self.assertEqual(result['make_flags'], '-j8')
|
||||
self.assertEqual(result['make_extra'], ['FOO=BAR', 'BIZ=1'])
|
||||
self.assertEqual(result['make_extra'], ['FOO=BAR BAZ', 'BIZ=1'])
|
||||
|
||||
def test_read_moz_objdir_substitution(self):
|
||||
"""Ensure @TOPSRCDIR@ substitution is recognized in MOZ_OBJDIR."""
|
||||
|
Loading…
Reference in New Issue
Block a user