From e327282f5086730fc045d99c5efbc7a2be0839b4 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Mon, 8 May 2023 09:23:46 -0600 Subject: Fixup usage of new mock yacc tool When the mock tool was revised to use argparse instead of getopt, it stumbled across the problem that argparse apparently doesn't deal with a single-letter option and its option-argument not having a space between them until Python 3.8 - 3.6 and 3.7 failed the test. Change to use the space in the test/mock tool. Signed-off-by: Mats Wichmann --- test/YACC/YACCFLAGS-fixture/myyacc.py | 2 +- test/YACC/YACCFLAGS.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/YACC/YACCFLAGS-fixture/myyacc.py b/test/YACC/YACCFLAGS-fixture/myyacc.py index 8b793a1..7461501 100644 --- a/test/YACC/YACCFLAGS-fixture/myyacc.py +++ b/test/YACC/YACCFLAGS-fixture/myyacc.py @@ -67,7 +67,7 @@ def fake_yacc(): elif arg == "-o": skip = True elif arg.startswith("-I"): - pass + skip = True else: opt_list.append(arg) # The original didn't use the file argument(s) so we have to get rid of. diff --git a/test/YACC/YACCFLAGS.py b/test/YACC/YACCFLAGS.py index 7a07072..f7a3cfb 100644 --- a/test/YACC/YACCFLAGS.py +++ b/test/YACC/YACCFLAGS.py @@ -48,7 +48,7 @@ test.write('SConstruct', """ DefaultEnvironment(tools=[]) env = Environment( YACC=r'%(_python_)s myyacc.py', - YACCFLAGS='-x -I${TARGET.dir} -I${SOURCE.dir}', + YACCFLAGS='-x -I ${TARGET.dir} -I ${SOURCE.dir}', tools=['yacc', '%(linker)s', '%(compiler)s'], ) env.CFile(target='out/aaa', source='in/aaa.y') -- cgit v0.12