|
11 | 11 | from pathlib import Path |
12 | 12 | from typing import TYPE_CHECKING, ClassVar |
13 | 13 |
|
| 14 | +from dvsim.flow.base import FlowCfg |
14 | 15 | from dvsim.job.data import JobSpec, WorkspaceConfig |
15 | 16 | from dvsim.job.status import JobStatus |
16 | 17 | from dvsim.job.time import JobTime |
@@ -538,9 +539,9 @@ class RunTest(Deploy): |
538 | 539 |
|
539 | 540 | # Initial seed values when running tests (if available). |
540 | 541 | target = "run" |
541 | | - seeds = [] |
| 542 | + seeds: ClassVar[list[int]] = [] |
542 | 543 | fixed_seed = None |
543 | | - cmds_list_vars = ["pre_run_cmds", "post_run_cmds"] |
| 544 | + cmds_list_vars: ClassVar[list[str]] = ["pre_run_cmds", "post_run_cmds"] |
544 | 545 |
|
545 | 546 | def __init__(self, index, test, build_job, sim_cfg: "SimCfg") -> None: |
546 | 547 | self.test_obj = test |
@@ -572,7 +573,10 @@ def __init__(self, index, test, build_job, sim_cfg: "SimCfg") -> None: |
572 | 573 |
|
573 | 574 | # We did something wrong if build_mode is not the same as the build_job |
574 | 575 | # arg's name. |
575 | | - assert self.build_mode == build_job.name |
| 576 | + if self.build_mode != build_job.name: |
| 577 | + msg = (f"Created a build job with name {build_job.name}, when we " |
| 578 | + f"expected the name to be {self.build_mode}.") |
| 579 | + raise AssertionError(msg) |
576 | 580 |
|
577 | 581 | def _define_attrs(self) -> None: |
578 | 582 | super()._define_attrs() |
@@ -678,7 +682,7 @@ def get_seed() -> int: |
678 | 682 | RunTest.seeds.append(seed) |
679 | 683 | return RunTest.seeds.pop(0) |
680 | 684 |
|
681 | | - def get_timeout_mins(self): |
| 685 | + def get_timeout_mins(self) -> float: |
682 | 686 | """Return the timeout in minutes. |
683 | 687 |
|
684 | 688 | Limit run jobs to 60 minutes if the timeout is not set. |
@@ -737,7 +741,7 @@ class CovMerge(Deploy): |
737 | 741 | target = "cov_merge" |
738 | 742 | weight = 10 |
739 | 743 |
|
740 | | - def __init__(self, run_items, sim_cfg) -> None: |
| 744 | + def __init__(self, run_items: list[RunTest], sim_cfg: FlowCfg) -> None: |
741 | 745 | """Initialise a job deployment to merge coverage databases.""" |
742 | 746 | # Construct the cov_db_dirs right away from the run_items. This is a |
743 | 747 | # special variable used in the HJson. The coverage associated with |
|
0 commit comments