From 4f532810e0da8cf6334beb8fdf0d1781837c16b9 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Wed, 19 Jul 2023 15:36:04 +0200 Subject: [PATCH] Add dependency in restart test case Because we don't know the filename of the restart file at setup time, we need to instead make the `full_run` step an explicit dependency of the `restart_run` step. --- .../tests/baroclinic_channel/restart/__init__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/polaris/ocean/tests/baroclinic_channel/restart/__init__.py b/polaris/ocean/tests/baroclinic_channel/restart/__init__.py index 5c761ce7f..f04834487 100644 --- a/polaris/ocean/tests/baroclinic_channel/restart/__init__.py +++ b/polaris/ocean/tests/baroclinic_channel/restart/__init__.py @@ -27,10 +27,14 @@ def __init__(self, test_group, resolution): super().__init__(test_group=test_group, resolution=resolution, name='restart') - for name in ['full_run', 'restart_run']: - self.add_step( - RestartStep(test_case=self, resolution=resolution, - name=name)) + full = RestartStep(test_case=self, resolution=resolution, + name='full_run') + self.add_step(full) + + restart = RestartStep(test_case=self, resolution=resolution, + name='restart_run') + restart.add_dependency(full, full.name) + self.add_step(restart) def validate(self): """