Skip to content

Commit

Permalink
add private_tests_dir to make tester (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
carzil authored Sep 5, 2023
1 parent cd1e73c commit 17210d5
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions checker/testers/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class TaskTestConfig(Tester.TaskTestConfig):
test_timeout: int = 60 # seconds

public_test_files: list[str] = field(default_factory=list)
private_test_files: list[str] = field(default_factory=list)

def _gen_build( # type: ignore[override]
self,
Expand All @@ -35,13 +36,23 @@ def _gen_build( # type: ignore[override]
verbose=verbose,
)

self._executor(
copy_files,
source=public_tests_dir,
target=build_dir,
patterns=test_config.public_test_files,
verbose=verbose,
)
if public_tests_dir is not None:
self._executor(
copy_files,
source=public_tests_dir,
target=build_dir,
patterns=test_config.public_test_files,
verbose=verbose,
)

if private_tests_dir is not None:
self._executor(
copy_files,
source=private_tests_dir,
target=build_dir,
patterns=test_config.private_test_files,
verbose=verbose,
)

def _clean_build( # type: ignore[override]
self,
Expand Down

0 comments on commit 17210d5

Please sign in to comment.