def tearDown(self): # Wipe other temp files that are normally wiped by DriverExit. # We don't want anything to exit, so we do not call DriverExit manually. driver_temps.TempFiles.wipe() # Reset some internal state. filetype.ClearFileTypeCaches() filetype.SetForcedFileType(None)
def tearDown(self): # Reset some internal state. sys.exit = self.exit_backup filetype.ClearFileTypeCaches() filetype.SetForcedFileType(None) shutil.rmtree(self.temp_dir) super(TestPrecompiledHeaders, self).tearDown()
def main(argv): env.update(EXTRA_ENV) driver_tools.ParseArgs(argv, PATTERNS) driver_tools.Run( '"${LLVM_OPT}" ${ARGS} ' + '${DISABLE_SIMPLIFY_LIBCALLS ? -disable-simplify-libcalls} ' + '${HAVE_OUTPUT ? -o ${OUTPUT}} ' + '${INPUT}') # Opt is the only tool that will modify a file in-place. If this happens we # need to clear the filetype cache so future invocations of the type checking # routines will re-check the file. if env.getone('INPUT') == env.getone('OUTPUT'): filetype.ClearFileTypeCaches() # only reached in case of no errors return 0
def setUp(self): driver_test_utils.ApplyTestEnvOverrides(env) # Reset some internal state. filetype.ClearFileTypeCaches() filetype.SetForcedFileType(None)
def runDriver(self, driver, flags): driver_tools.RunDriver(driver, flags) # Reset some internal state. filetype.ClearFileTypeCaches() filetype.SetForcedFileType(None)