Author: ericwf Date: Wed Jun 22 02:09:59 2016 New Revision: 273390 URL: http://llvm.org/viewvc/llvm-project?rev=273390&view=rev Log: Disable ccache usage for .fail.cpp tests. It causes bugs.
Modified: libcxx/trunk/test/libcxx/compiler.py libcxx/trunk/test/libcxx/test/format.py Modified: libcxx/trunk/test/libcxx/compiler.py URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/compiler.py?rev=273390&r1=273389&r2=273390&view=diff ============================================================================== --- libcxx/trunk/test/libcxx/compiler.py (original) +++ libcxx/trunk/test/libcxx/compiler.py Wed Jun 22 02:09:59 2016 @@ -47,9 +47,10 @@ class CXXCompiler(object): self.type = compiler_type self.version = (major_ver, minor_ver, patchlevel) - def _basicCmd(self, source_files, out, is_link=False, input_is_cxx=False): + def _basicCmd(self, source_files, out, is_link=False, input_is_cxx=False, + disable_ccache=False): cmd = [] - if self.use_ccache and not is_link: + if self.use_ccache and not disable_ccache and not is_link: cmd += ['ccache'] cmd += [self.path] if out is not None: @@ -65,12 +66,15 @@ class CXXCompiler(object): return cmd def preprocessCmd(self, source_files, out=None, flags=[]): - cmd = self._basicCmd(source_files, out, input_is_cxx=True) + ['-E'] + cmd = self._basicCmd(source_files, out, input_is_cxx=True, + disable_ccache=True) + ['-E'] cmd += self.flags + self.compile_flags + flags return cmd - def compileCmd(self, source_files, out=None, flags=[]): - cmd = self._basicCmd(source_files, out, input_is_cxx=True) + ['-c'] + def compileCmd(self, source_files, out=None, flags=[], + disable_ccache=False): + cmd = self._basicCmd(source_files, out, input_is_cxx=True, + disable_ccache=disable_ccache) + ['-c'] cmd += self.flags + self.compile_flags + flags return cmd @@ -89,8 +93,10 @@ class CXXCompiler(object): out, err, rc = lit.util.executeCommand(cmd, env=env, cwd=cwd) return cmd, out, err, rc - def compile(self, source_files, out=None, flags=[], env=None, cwd=None): - cmd = self.compileCmd(source_files, out, flags) + def compile(self, source_files, out=None, flags=[], env=None, cwd=None, + disable_ccache=False): + cmd = self.compileCmd(source_files, out, flags, + disable_ccache=disable_ccache) out, err, rc = lit.util.executeCommand(cmd, env=env, cwd=cwd) return cmd, out, err, rc @@ -106,7 +112,8 @@ class CXXCompiler(object): return cmd, out, err, rc def compileLinkTwoSteps(self, source_file, out=None, object_file=None, - flags=[], env=None, cwd=None): + flags=[], env=None, cwd=None, + disable_ccache=False): if not isinstance(source_file, str): raise TypeError('This function only accepts a single input file') if object_file is None: @@ -117,7 +124,8 @@ class CXXCompiler(object): with_fn = lambda: libcxx.util.nullContext(object_file) with with_fn() as object_file: cc_cmd, cc_stdout, cc_stderr, rc = self.compile( - source_file, object_file, flags=flags, env=env, cwd=cwd) + source_file, object_file, flags=flags, env=env, cwd=cwd, + disable_ccache=disable_ccache) if rc != 0: return cc_cmd, cc_stdout, cc_stderr, rc Modified: libcxx/trunk/test/libcxx/test/format.py URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/test/format.py?rev=273390&r1=273389&r2=273390&view=diff ============================================================================== --- libcxx/trunk/test/libcxx/test/format.py (original) +++ libcxx/trunk/test/libcxx/test/format.py Wed Jun 22 02:09:59 2016 @@ -172,7 +172,8 @@ class LibcxxTestFormat(object): extra_flags += ['-Xclang', '-verify', '-Xclang', '-verify-ignore-unexpected=note'] cmd, out, err, rc = self.cxx.compile(source_path, out=os.devnull, - flags=extra_flags) + flags=extra_flags, + disable_ccache=True) expected_rc = 0 if use_verify else 1 if rc == expected_rc: return lit.Test.PASS, '' _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits