Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions example_package/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ override_limits:

# extra_compilation_files: ['__ID__lib.cpp', '__ID__lib.py']

# Alternative interactor used for running test runs in interactive via IO tasks. Not required. If not provided and
# the task is interactive via IO (and has test runs configured), then the default interactor will be used.
testrun_soc: __ID__soc_testrun.soc


### Keys used by sinol-make:

Expand Down
6 changes: 6 additions & 0 deletions src/sinol_make/commands/export/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,12 @@ def run(self, args: argparse.Namespace):
config = package_util.get_config()
package_util.validate_fake_time(config)

testrun_soc = config.get('testrun_soc', None)
if testrun_soc is not None:
if not os.path.exists(os.path.join(os.getcwd(), "prog", testrun_soc)):
util.exit_with_error(f"Testrun interactor file `{testrun_soc}` does not exist. "
f"It should be in `prog` directory.")

export_package_path = paths.get_cache_path('export', self.task_id)
if os.path.exists(export_package_path):
shutil.rmtree(export_package_path)
Expand Down
8 changes: 7 additions & 1 deletion src/sinol_make/commands/verify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def remove_cache(self):

def check_extra_files(self):
"""
Checks if extra_compilation_files and extra_execution_files exist.
Checks if extra_compilation_files, extra_execution_files and testrun_soc exist.
"""
extra_compilation_files = self.config.get('extra_compilation_files', [])
for file in extra_compilation_files:
Expand All @@ -96,6 +96,12 @@ def check_extra_files(self):
if extra_execution_files:
print(util.info("All extra execution files exist."))

testrun_soc = self.config.get('testrun_soc', None)
if testrun_soc is not None:
if not os.path.exists(os.path.join(os.getcwd(), "prog", testrun_soc)):
util.exit_with_error(f"Testrun interactor file `{testrun_soc}` does not exist. "
f"It should be in `prog` directory.")

def verify_scores(self, scored_groups):
config_scores = self.config.get('scores', {})
if not config_scores:
Expand Down
1 change: 1 addition & 0 deletions src/sinol_make/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def save_config(config):
"sinol_undocumented_time_tool",
"sinol_undocumented_test_limits",
"fake_time",
"testrun_soc",
"num_processes",
"memory_limit",
"memory_limits",
Expand Down
Loading