From 9c74258d137c90e0c3d5d9f15c62c1cd3d48cb71 Mon Sep 17 00:00:00 2001 From: Spencer Clark Date: Thu, 7 Sep 2023 20:27:34 +0000 Subject: [PATCH] Fix test skipping syntax; hook into CI --- .circleci/config.yml | 25 +++++++++++++++++++++++-- tests/pytest/test_regression.py | 4 ++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fcd26e192..9b9bf8d7a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -161,6 +161,19 @@ jobs: - run: name: Test wrapper command: nix-shell --run "make -C FV3/wrapper test_emulation" + nix-emulation-debug: + docker: + - image: nixos/nix + environment: + FV3CONFIG_CACHE_DIR: /tmp/.fv3config + GOOGLE_APPLICATION_CREDENTIALS: /tmp/key.json + FSSPEC_GS_REQUESTER_PAYS: vcm-ml + steps: + - initialize_nix + - build_debug + - run: + name: Test fortran + command: nix-shell --run "make test_fortran_emulation" nix-unmarked-repro: docker: - image: nixos/nix @@ -232,20 +245,28 @@ workflows: filters: branches: ignore: master - - hold-nix-emulation-repro: + - hold-nix-emulation: name: Launch emulation tests type: approval filters: branches: ignore: master - nix-emulation-repro: - name: Emulation tests + name: Emulation tests in repro mode requires: - Minimal fortran and wrapper tests in repro mode - Launch emulation tests filters: branches: ignore: master + - nix-emulation-debug: + name: Emulation tests in debug mode + requires: + - Minimal fortran tests in debug mode + - Launch emulation tests + filters: + branches: + ignore: master - hold-nix-unmarked-repro: name: Launch unmarked fortran tests type: approval diff --git a/tests/pytest/test_regression.py b/tests/pytest/test_regression.py index b53dab4f4..69ea6aee2 100644 --- a/tests/pytest/test_regression.py +++ b/tests/pytest/test_regression.py @@ -236,7 +236,7 @@ def test_use_prescribed_sea_surface_properties_error(executable, tmpdir, message @pytest.fixture(scope="session") def emulation_run(executable, tmpdir_factory): if "debug" in str(executable): - pytest.skip(reason=EMULATION_DEBUG_MODE_ISSUE) + pytest.skip(EMULATION_DEBUG_MODE_ISSUE) config = get_config("emulation.yml") rundir = tmpdir_factory.mktemp("rundir") @@ -264,7 +264,7 @@ def test_zhao_carr_diagnostics(emulation_run, regtest, tile): @pytest.mark.emulation def test_gscond_logs(executable, regtest, tmpdir): if "debug" in str(executable): - pytest.skip(reason=EMULATION_DEBUG_MODE_ISSUE) + pytest.skip(EMULATION_DEBUG_MODE_ISSUE) config = get_config("emulation.yml") config["namelist"]["gfs_physics_nml"]["emulate_gscond_only"] = True