|
25 | 25 | os.path.abspath(os.path.join(os.path.dirname(__file__), "../../input")) |
26 | 26 | ) |
27 | 27 |
|
28 | | -# This is the parameterized test for the old-style checkpoint-restart tests |
| 28 | +# This is the parameterized test for the new-style checkpoint-restart tests |
29 | 29 | # - these use parameter files from input/Checkpoint directory (it should not |
30 | 30 | # consider stuff from the legacy subdirectory) |
| 31 | +# |
| 32 | +# The following should be uncommented once PR #313 is merged |
31 | 33 |
|
32 | | -@pytest.mark.parametrize("nominal_input,uses_grackle", |
33 | | - [('checkpoint_boundary.in', False), |
34 | | - ('checkpoint_grackle.in', True), |
35 | | - ('checkpoint_ppm.in', False)]) |
36 | | -def test_ckpt_restart(nominal_input, uses_grackle): |
37 | | - nominal_input = os.path.abspath(f'{_input_dir}/Checkpoint/{nominal_input}') |
38 | | - |
39 | | - symlink_srcs = list(get_symlink_targets(grackle_files = uses_grackle)) |
40 | | - |
41 | | - # the following context manager class creates a temporary directory, |
42 | | - # stores the path to it in working_dir, and then always cleans up the |
43 | | - # contents (even if the program encounters an error) when we exit the |
44 | | - # context |
45 | | - # |
46 | | - # TODO: it would be REALLY nice to have a unified approach (shared across |
47 | | - # all tests) for doing this, that can be configured to: |
48 | | - # - name the temporary-directory in a deterministic manner after the |
49 | | - # current test (maybe let the user specify an empty directory that |
50 | | - # all tests get run inside of) |
51 | | - # - conditionally decide whether to delete the temporary directory. |
52 | | - # One could imagine 3 options: |
53 | | - # 1. Always delete the temporary directory (current behavior) |
54 | | - # 2. Only delete the temporary directory on test failure |
55 | | - # 3. Never delete the temporary directory |
56 | | - with tempfile.TemporaryDirectory() as working_dir: |
57 | | - |
58 | | - run_ckpt_restart_test(os.path.join(_input_dir, nominal_input), |
59 | | - working_dir = working_dir, |
60 | | - enzoe_driver = cached_opts().enzoe_driver, |
61 | | - nproc = 1, ckpt_cycle = 2, stop_cycle = 4, |
62 | | - symlink_srcs = symlink_srcs, |
63 | | - sim_name_prefix = None, |
64 | | - buffer_outputs_on_disk = False) |
| 34 | +#@pytest.mark.parametrize("nominal_input,uses_grackle", |
| 35 | +# [('checkpoint_boundary.in', False), |
| 36 | +# ('checkpoint_grackle.in', True), |
| 37 | +# ('checkpoint_ppm.in', False)]) |
| 38 | +#def test_ckpt_restart(nominal_input, uses_grackle): |
| 39 | +# nominal_input = os.path.abspath(f'{_input_dir}/Checkpoint/{nominal_input}') |
| 40 | +# |
| 41 | +# symlink_srcs = list(get_symlink_targets(grackle_files = uses_grackle)) |
| 42 | +# |
| 43 | +# # the following context manager class creates a temporary directory, |
| 44 | +# # stores the path to it in working_dir, and then always cleans up the |
| 45 | +# # contents (even if the program encounters an error) when we exit the |
| 46 | +# # context |
| 47 | +# # |
| 48 | +# # TODO: it would be REALLY nice to have a unified approach (shared across |
| 49 | +# # all tests) for doing this, that can be configured to: |
| 50 | +# # - name the temporary-directory in a deterministic manner after the |
| 51 | +# # current test (maybe let the user specify an empty directory that |
| 52 | +# # all tests get run inside of) |
| 53 | +# # - conditionally decide whether to delete the temporary directory. |
| 54 | +# # One could imagine 3 options: |
| 55 | +# # 1. Always delete the temporary directory (current behavior) |
| 56 | +# # 2. Only delete the temporary directory on test failure |
| 57 | +# # 3. Never delete the temporary directory |
| 58 | +# with tempfile.TemporaryDirectory() as working_dir: |
| 59 | +# |
| 60 | +# run_ckpt_restart_test(os.path.join(_input_dir, nominal_input), |
| 61 | +# working_dir = working_dir, |
| 62 | +# enzoe_driver = cached_opts().enzoe_driver, |
| 63 | +# nproc = 1, ckpt_cycle = 2, stop_cycle = 4, |
| 64 | +# symlink_srcs = symlink_srcs, |
| 65 | +# sim_name_prefix = None, |
| 66 | +# buffer_outputs_on_disk = False) |
65 | 67 |
|
66 | 68 |
|
67 | 69 | # This is the parameterized test for the old-style checkpoint-restart tests |
|
0 commit comments