diff --git a/src/sinol_make/commands/inwer/__init__.py b/src/sinol_make/commands/inwer/__init__.py index 17204166..264e0c0f 100644 --- a/src/sinol_make/commands/inwer/__init__.py +++ b/src/sinol_make/commands/inwer/__init__.py @@ -8,7 +8,7 @@ from functools import cmp_to_key from typing import Dict, List -from sinol_make import util +from sinol_make import util, contest_types from sinol_make.structs.inwer_structs import TestResult, InwerExecution, VerificationResult, TableData from sinol_make.helpers import package_util, printer, paths, parsers from sinol_make.interfaces.BaseCommand import BaseCommand @@ -206,6 +206,7 @@ def run(self, args: argparse.Namespace): self.cpus = args.cpus or util.default_cpu_count() self.tests = package_util.get_tests(self.task_id, args.tests) + self.contest_type = contest_types.get_contest_type() if len(self.tests) == 0: util.exit_with_error('No tests found.') @@ -224,7 +225,7 @@ def run(self, args: argparse.Namespace): if len(failed_tests) > 0: util.exit_with_error(f'Verification failed for tests: {", ".join(failed_tests)}') - else: + elif self.contest_type.verify_tests_order(): print("Verifying tests order...") self.verify_tests_order() - print(util.info('Verification successful.')) + print(util.info('Verification successful.')) diff --git a/src/sinol_make/contest_types/default.py b/src/sinol_make/contest_types/default.py index 59c63003..3e9bcc80 100644 --- a/src/sinol_make/contest_types/default.py +++ b/src/sinol_make/contest_types/default.py @@ -150,3 +150,9 @@ def preferred_timetool(self): Returns preferred time tool """ return 'oiejq' + + def verify_tests_order(self): + """ + Whether to verify tests order + """ + return False diff --git a/src/sinol_make/contest_types/icpc.py b/src/sinol_make/contest_types/icpc.py index 625b1fa6..a042f1f9 100644 --- a/src/sinol_make/contest_types/icpc.py +++ b/src/sinol_make/contest_types/icpc.py @@ -41,3 +41,6 @@ def max_score_per_test(self): def preferred_timetool(self): return "time" + + def verify_tests_order(self): + return True diff --git a/src/sinol_make/contest_types/oi.py b/src/sinol_make/contest_types/oi.py index a8d18d66..dd5e4444 100644 --- a/src/sinol_make/contest_types/oi.py +++ b/src/sinol_make/contest_types/oi.py @@ -47,3 +47,6 @@ def verify_pre_gen(self): def allow_per_test_limits(self): return False + + def verify_tests_order(self): + return True diff --git a/src/sinol_make/contest_types/oij.py b/src/sinol_make/contest_types/oij.py index 3536b93b..4341c79e 100644 --- a/src/sinol_make/contest_types/oij.py +++ b/src/sinol_make/contest_types/oij.py @@ -30,3 +30,6 @@ def verify_pre_gen(self): total_score = sum(config['scores'].values()) if total_score != 100: util.exit_with_error(f"Total score in config is {total_score}, but should be 100.") + + def verify_tests_order(self): + return True diff --git a/tests/packages/wer/config.yml b/tests/packages/wer/config.yml index c5b12807..072ecd69 100644 --- a/tests/packages/wer/config.yml +++ b/tests/packages/wer/config.yml @@ -1,6 +1,7 @@ title: Test package for veryfing inwer command memory_limit: 16000 time_limit: 1000 +sinol_contest_type: oi scores: 1: 33