[test-suite] r263612 - litsupport: Fix bug in environment variable parsing
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 15 20:14:59 PDT 2016
Author: matze
Date: Tue Mar 15 22:14:59 2016
New Revision: 263612
URL: http://llvm.org/viewvc/llvm-project?rev=263612&view=rev
Log:
litsupport: Fix bug in environment variable parsing
Modified:
test-suite/trunk/litsupport/shellcommand.py
Modified: test-suite/trunk/litsupport/shellcommand.py
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/litsupport/shellcommand.py?rev=263612&r1=263611&r2=263612&view=diff
==============================================================================
--- test-suite/trunk/litsupport/shellcommand.py (original)
+++ test-suite/trunk/litsupport/shellcommand.py Tue Mar 15 22:14:59 2016
@@ -80,12 +80,14 @@ def parse(commandline):
result.stderr = tokens[i]
i += 1
continue
- assignment=re.match('([A-Za-z_][A-Za-z_0-9]*)=(.*)', token)
- if assignment:
- result.envvars[m.group(1)] = m.group(2)
- continue
if first_word:
+ # Is it an environment variable assignment?
+ assignment=re.match('([A-Za-z_][A-Za-z_0-9]*)=(.*)', token)
+ if assignment:
+ result.envvars[assignment.group(1)] = assignment.group(2)
+ continue
+ # A reserved word?
if token in reserved_words or token in unhandled_tokens:
raise Exception("Reserved word '%s' not supported" % token)
result.executable = token
More information about the llvm-commits
mailing list