Beispiel #1
0
    def check_testcase(self, testcase):
        cmd = [
            self.showmap,
            "-t",
            str(TIMEOUT),
            "-m",
            "256T",  # for ffmpeg
            "-b",  # binary mode
            "-o",
            self.temp_file,
            "--"
        ] + self.cmd

        cmd, stdin = utils.fix_at_file(cmd, testcase)
        with open(os.devnull, "wb") as devnull:
            proc = sp.Popen(cmd, stdin=sp.PIPE, stdout=devnull, stderr=devnull)
            proc.communicate(stdin)

        this_bitmap = read_bitmap_file(self.temp_file)
        return self.is_interesting_testcase(this_bitmap, proc.returncode)
Beispiel #2
0
 def set_opts(self):
     self.cmd, self.stdin = utils.fix_at_file(self.cmd, self.input_file)
     if self.stdin is None:
         self.source_opts = ["-f", "1"]
     else:
         self.source_opts = ["-s", "1"]