From: Matthew Fernandez Date: Sat, 24 Oct 2020 19:32:12 +0000 (-0700) Subject: fix handling of KFLAGS and TFLAGS in rtest X-Git-Tag: 2.46.0~20^2^2~3^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14c3cfd43e6cbdaf99e299f8b9d3b4946a1541e0;p=graphviz fix handling of KFLAGS and TFLAGS in rtest This was potentially appending empty strings to the command passed to subprocess. --- diff --git a/rtest/rtest.py b/rtest/rtest.py index 1584fc211..c44cdc333 100755 --- a/rtest/rtest.py +++ b/rtest/rtest.py @@ -222,9 +222,12 @@ def doTest(TEST): OUTPATH = os.path.join(OUTDIR, OUTFILE) KFLAGS = SUBTEST['ALG'] TFLAGS = SUBTEST['FMT'] - KFLAGS = KFLAGS and '-K' + KFLAGS - TFLAGS = TFLAGS and '-T' + TFLAGS - testcmd = [DOT, KFLAGS, TFLAGS] + SUBTEST['FLAGS'] + ['-o', OUTPATH, INFILE] + if KFLAGS: KFLAGS = '-K{}'.format(KFLAGS) + if TFLAGS: TFLAGS = '-T{}'.format(TFLAGS) + testcmd = [DOT] + if KFLAGS: testcmd += [KFLAGS] + if TFLAGS: testcmd += [TFLAGS] + testcmd += SUBTEST['FLAGS'] + ['-o', OUTPATH, INFILE] if VERBOSE: print(' '.join(testcmd)) if NOOP: