Lines Matching defs:filename
66 def write_to_script(text, filename):
67 with open(filename, "w") as f:
69 os.chmod(filename, os.stat(filename).st_mode | stat.S_IEXEC)
91 def get_crash_cmd(self, cmd=None, args=None, filename=None):
96 if not filename:
97 filename = self.file_to_reduce
99 return [cmd] + args + [filename]
101 def read_clang_args(self, crash_script, filename):
113 # Remove clang and filename from the command
114 # Assume the last occurrence of the filename is the clang input file
117 if cmd[i] == filename:
188 def check_expected_output(self, args=None, filename=None):
191 if not filename:
192 filename = self.file_to_reduce
195 self.get_crash_cmd(args=args, filename=filename),
235 # Instead of modifying the filename in the test file, just run the command
237 is_interesting = self.check_expected_output(filename=empty_file.name)
248 if self.check_expected_output(filename=tmpfile.name):
253 if self.check_expected_output(filename=tmpfile.name):