Skip to content

Commit 2478b3b

Browse files
committed
not_ok_is_cf mode is supported
1 parent 0091370 commit 2478b3b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/run_common.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2539,6 +2539,12 @@ invoke_checker(
25392539
if (exitcode == RUN_PRESENTATION_ERR && srpp->disable_pe > 0) {
25402540
exitcode = RUN_WRONG_ANSWER_ERR;
25412541
}
2542+
if (exitcode != RUN_OK && srgp->not_ok_is_cf > 0) {
2543+
append_msg_to_log(check_out_path, "checker exited with code %d", exitcode);
2544+
append_msg_to_log(check_out_path, "Check failed on non-OK result mode enabled");
2545+
status = RUN_CHECK_FAILED;
2546+
goto cleanup;
2547+
}
25422548
if (exitcode != RUN_OK && exitcode != RUN_PRESENTATION_ERR
25432549
&& exitcode != RUN_WRONG_ANSWER_ERR && exitcode != RUN_CHECK_FAILED) {
25442550
append_msg_to_log(check_out_path, "checker exited with code %d", exitcode);
@@ -3947,6 +3953,11 @@ read_checker_output:;
39473953
}
39483954

39493955
cleanup:;
3956+
if (status != RUN_OK && status != RUN_CHECK_FAILED && srgp->not_ok_is_cf > 0) {
3957+
append_msg_to_log(check_out_path, "Check failed on non-OK result mode enabled");
3958+
status = RUN_CHECK_FAILED;
3959+
}
3960+
39503961
if (init_cmd_started) {
39513962
int new_status = invoke_init_cmd(srpp, "stop", test_src, corr_src, info_src, working_dir, check_out_path,
39523963
&tstinfo);

0 commit comments

Comments
 (0)