-
Notifications
You must be signed in to change notification settings - Fork 14
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
add option of skipping test case when first failure occured (#9) #6
Conversation
src/ljudge.cc
Outdated
@@ -1413,6 +1417,11 @@ static Options parse_cli_options(int argc, const char *argv[]) { | |||
REQUIRE_NARGV(1); | |||
options.nthread = NEXT_NUMBER_ARG; | |||
#endif | |||
} else if (option == "skip-on-first-failure") { | |||
if (options.nthread != 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps nthread
can be automatically set to 1 in this case so --skip-on-first-failure
works without specifying threads explicitly.
43ebd1c
to
dccd737
Compare
I saw the code already merged into master, so close. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change was pushed as bece9a4. Thanks!
I've made some minor edits.
j::object testcase_result = run_testcase(opts.etc_dir, opts.cache_dir, opts.user_code_path, opts.checker_code_path, opts.envs, opts.cases[i], opts.skip_checker, opts.keep_stdout, opts.keep_stderr); | ||
results[i] = j::value(testcase_result); | ||
if (testcase_result["result"].to_str() != TestcaseResult::ACCEPTED) { | ||
should_skip = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a bit tricky for OpenMP. Although it compiles, I think it's better to make the openmp loop explicitly not mutate a variable outside the loop body.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, seems better.
@@ -108,6 +108,7 @@ namespace TestcaseResult { | |||
const string FLOAT_POINT_EXCEPTION = "FLOAT_POINT_EXCEPTION"; | |||
const string SEGMENTATION_FAULT = "SEGMENTATION_FAULT"; | |||
const string WRONG_ANSWER = "WRONG_ANSWER"; | |||
const string SKIPPED = "SKIPPED"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines here are generated via cog. I have updated the cog comment.
used for ACM scoring rule...