Skip to content
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

Regtesting: Add --smoketest option #2501

Merged
merged 1 commit into from Jan 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions tools/regtesting/do_regtest.py
Expand Up @@ -49,6 +49,8 @@ async def main() -> None:
parser.add_argument("--timeout", type=int, default=400)
parser.add_argument("--maxerrors", type=int, default=50)
parser.add_argument("--mpiexec", default="mpiexec")
help = "Runs only the first test of each directory."
parser.add_argument("--smoketest", dest="smoketest", action="store_true", help=help)
parser.add_argument("--keepalive", dest="keepalive", action="store_true")
parser.add_argument("--debug", action="store_true")
parser.add_argument("--restrictdir", action="append")
Expand Down Expand Up @@ -79,6 +81,7 @@ async def main() -> None:
print(f"Timeout [s]: {cfg.timeout}")
print(f"Work base dir: {cfg.work_base_dir}")
print(f"MPI exec: {cfg.mpiexec}")
print(f"Smoke test: {cfg.smoketest}")
print(f"Keepalive: {cfg.keepalive}")
print(f"Debug: {cfg.debug}")
print(f"ARCH: {cfg.arch}")
Expand Down Expand Up @@ -120,6 +123,8 @@ async def main() -> None:
if not line:
continue
batch.regtests.append(Regtest(line, test_types, batch.workdir))
if cfg.smoketest:
break # run only one test per directory
batches.append(batch)

# Create async tasks.
Expand Down Expand Up @@ -206,6 +211,7 @@ def __init__(self, args: argparse.Namespace):
self.workers = Semaphore(self.num_workers)
self.cp2k_root = Path(__file__).resolve().parent.parent.parent
self.mpiexec = args.mpiexec.split()
self.smoketest = args.smoketest
self.keepalive = args.keepalive
self.arch = args.arch
self.version = args.version
Expand Down