diff options
author | fergus.henderson@gmail.com <fergus.henderson@gmail.com@01de4be4-8c4a-0410-9132-4925637da917> | 2012-04-09 22:20:35 +0000 |
---|---|---|
committer | fergus.henderson@gmail.com <fergus.henderson@gmail.com@01de4be4-8c4a-0410-9132-4925637da917> | 2012-04-09 22:20:35 +0000 |
commit | b01ee33071f0ec0d1bc3fbfc71d8d46feac3df02 (patch) | |
tree | 01a3212c4be57b5a03beb84db7d20f20ca00b972 | |
parent | 72166724241f7f71d1e16e911bd2e5facebe3019 (diff) | |
download | distcc-b01ee33071f0ec0d1bc3fbfc71d8d46feac3df02.tar.gz |
Fix issue 104 <http://code.google.com/p/distcc/issues/detail?id=104>:
handle header file names containing commas.
git-svn-id: http://distcc.googlecode.com/svn/trunk@764 01de4be4-8c4a-0410-9132-4925637da917
-rwxr-xr-x | include_server/parse_file.py | 8 | ||||
-rwxr-xr-x | test/testdistcc.py | 12 |
2 files changed, 13 insertions, 7 deletions
diff --git a/include_server/parse_file.py b/include_server/parse_file.py index bc6374e..ac9720f 100755 --- a/include_server/parse_file.py +++ b/include_server/parse_file.py @@ -92,8 +92,8 @@ DIRECTIVE_RE = re.compile(r""" ( ((?P<include> include_next | include | import) \s* - ( "(?P<quote> (\w|[_/.+-])*)" | # "bar/foo.h" - <(?P<angle> (\w|[_/.+-])*)> | # <stdio.h> + ( "(?P<quote> (\w|[_/.,+-])*)" | # "bar/foo.h" + <(?P<angle> (\w|[_/.,+-])*)> | # <stdio.h> (?P<expr> .*?)) # expr, match . minimally ) | @@ -111,8 +111,8 @@ DIRECTIVE_RE = re.compile(r""" INCLUDE_STRING_RE = re.compile(r""" ^ \s* - ( "\s*(?P<quote> (\w|[\\_/.+-])*)\s*" | - <\s*(?P<angle> (\w|[\\_/.+-])*)\s*> + ( "\s*(?P<quote> (\w|[\\_/.,+-])*)\s*" | + <\s*(?P<angle> (\w|[\\_/.,+-])*)\s*> ) \s* $ diff --git a/test/testdistcc.py b/test/testdistcc.py index d5b645d..4eaf77e 100755 --- a/test/testdistcc.py +++ b/test/testdistcc.py @@ -945,17 +945,23 @@ class CompileHello_Case(Compilation_Case): def source(self): return """ #include <stdio.h> -#include "testhdr.h" +#include "%s" int main(void) { puts(HELLO_WORLD); return 0; } -""" +""" % self.headerFilename() def checkBuiltProgramMsgs(self, msgs): self.assert_equal(msgs, "hello world\n") +class CommaInFilename_Case(CompileHello_Case): + + def headerFilename(self): + return 'foo1,2.h' + + class ComputedInclude_Case(CompileHello_Case): def source(self): @@ -1016,7 +1022,6 @@ int main(void) { } """ - class LanguageSpecific_Case(Compilation_Case): """Abstract base class to test building non-C programs.""" def runtest(self): @@ -2179,6 +2184,7 @@ for path in os.environ['PATH'].split (':'): # All the tests defined in this suite tests = [ CompileHello_Case, + CommaInFilename_Case, ComputedInclude_Case, BackslashInMacro_Case, BackslashInFilename_Case, |