Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow symlinks to test cases with other output validator flags and… #276

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Tagl
Copy link
Contributor

@Tagl Tagl commented Aug 19, 2024

..warn if output validators fails to compile. Closes #244

Note this may be a breaking change for some problem based on discussion in issue.
However that problem is not being validated "correctly" since the output validator generally should behave differently with different arguments passed to it, rendering reuse impossible.

@@ -264,12 +264,9 @@ def _check_symlinks(self) -> bool:
if ans_target != f'{in_target[:-3]}.ans':
self.error(f"Symbolic link '{nicepath}' must have a corresponding link for answer file")
return False
if self.reuse_result_from is None:
if not nicepath.startswith('data'):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the previous check more accurate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How so?

@@ -1687,6 +1686,8 @@ def validate(self, testcase: TestCase, submission_output: str) -> SubmissionResu
shutil.rmtree(validator_output)
if res.verdict != 'AC':
return res
else:
self.warning(f"Compilation failed for {val.name}: {compile_res[1]}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this result in a lot of warning spam (one log line per submission per test case)? IIRC we already give an error in an earlier phase.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had an error and got no information before adding this. It was very confusing.
I will double check though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Symlinks for reuse of input files with different output validator flags
2 participants