Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions problemtools/verifyproblem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ def collect_flags(group: TestCaseGroup, flags: set[str]) -> None:
for flags_str in all_flags:
flags = flags_str.split()
for val in self._validators:
status, _ = val.run(file_name, args=flags)
status, _ = val.run(file_name, args=flags, work_dir=self.problem.tmpdir)
if os.WEXITSTATUS(status) != 42:
break
else:
Expand All @@ -1180,7 +1180,7 @@ def modified_input_validates(applicable, modifier):
for flags_str in all_flags:
flags = flags_str.split()
for val in self._validators:
status, _ = val.run(file_name, args=flags)
status, _ = val.run(file_name, args=flags, work_dir=self.problem.tmpdir)
if os.WEXITSTATUS(status) != 42:
# expected behavior; validator rejects modified input
return False
Expand Down Expand Up @@ -1208,7 +1208,7 @@ def validate(self, testcase: TestCase) -> None:

for val in self._validators:
with tempfile.NamedTemporaryFile() as outfile, tempfile.NamedTemporaryFile() as errfile:
status, _ = val.run(testcase.infile, outfile.name, errfile.name, args=flags)
status, _ = val.run(testcase.infile, outfile.name, errfile.name, args=flags, work_dir=self.problem.tmpdir)
if not os.WIFEXITED(status):
emsg = f'Input format validator {val} crashed on input {testcase.infile}'
elif os.WEXITSTATUS(status) != 42:
Expand Down
Loading