diff --git a/.github/workflows/run-tests/action.yml b/.github/workflows/run-tests/action.yml index 55a96f7d70..a4d4bd3a44 100644 --- a/.github/workflows/run-tests/action.yml +++ b/.github/workflows/run-tests/action.yml @@ -10,7 +10,10 @@ inputs: os: description: 'OS used for github action' required: true - + variant: + description: 'launch specific test' + required: false + default: "json" runs: using: "composite" steps: @@ -27,7 +30,7 @@ runs: shell: bash {0} run: | cd _build - ctest -C Release --output-on-failure -R json + ctest -C Release --output-on-failure -R ${{inputs.variant}} echo "RET_CODE=$?" >> $GITHUB_ENV - name: Clean batches diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index f47ce06966..da774e99f0 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -103,6 +103,24 @@ jobs: run: | cmake --build _build --config release -j2 + + # simtest + - name: Read simtest version + id: simtest-version + uses: notiz-dev/github-action-json-property@release + with: + path: 'simtest.json' + prop_path: 'version' + + - name: Run named mps tests + if: ${{ env.IS_PUSH == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-named-mps + os: ${{ matrix.test-platform }} + variant: "named-mps" + - name: Run unfeasibility-related tests if: ${{ env.IS_PUSH == 'true' }} run: | @@ -130,14 +148,6 @@ jobs: name: test-log path: ${{ github.workspace }}/_build/Testing/Temporary/LastTest.log - # simtest - - name: Read simtest version - id: simtest-version - uses: notiz-dev/github-action-json-property@release - with: - path: 'simtest.json' - prop_path: 'version' - - name: Run tests about infinity on BCs RHS if: ${{ env.IS_PUSH == 'true' }} uses: ./.github/workflows/run-tests diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index a14bd55c0c..c77513e020 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -149,6 +149,14 @@ jobs: path: 'simtest.json' prop_path: 'version' + - name: Run named mps tests + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-named-mps + os: ${{ matrix.test-platform }} + variant: "named-mps" + - name: Run tests for adequacy patch (CSR) uses: ./.github/workflows/run-tests with: diff --git a/simtest.json b/simtest.json index 51ffc1348a..2866454d33 100644 --- a/simtest.json +++ b/simtest.json @@ -1,3 +1,3 @@ { - "version": "v8.6.1a" + "version": "v8.7.0" } diff --git a/src/antares-deps b/src/antares-deps index 0d6bebfb90..2788a3a409 160000 --- a/src/antares-deps +++ b/src/antares-deps @@ -1 +1 @@ -Subproject commit 0d6bebfb901e47ec6ac1c73cb61a522803c81b98 +Subproject commit 2788a3a409f3d2b6a04ab90819f3c61bd6a2b282 diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 15a60f0a97..3b39ab8f85 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -59,6 +59,12 @@ if(Python3_Interpreter_FOUND) WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/run-study-tests" ) + add_test( + NAME named-mps + COMMAND Python3::Interpreter -m pytest -m json --solver-path=$ --named-mps-problems + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/run-study-tests" + ) + # The Kirchhoff constraint builder is built only if BUILD_TOOLS=ON if (BUILD_TOOLS) add_test( diff --git a/src/tests/run-study-tests/actions_on_study/study_run.py b/src/tests/run-study-tests/actions_on_study/study_run.py index c12b77f44e..2eec19336b 100644 --- a/src/tests/run-study-tests/actions_on_study/study_run.py +++ b/src/tests/run-study-tests/actions_on_study/study_run.py @@ -3,11 +3,12 @@ from utils.assertions import check class study_run: - def __init__(self, study_path, solver_path, use_ortools, ortools_solver): + def __init__(self, study_path, solver_path, use_ortools, ortools_solver, named_mps_problems): self.study_path = study_path self.solver_path = solver_path self.use_ortools = use_ortools self.ortools_solver = ortools_solver + self.named_mps_problems = named_mps_problems self.raise_exception_on_failure = True self.return_code = 0 @@ -23,6 +24,8 @@ def run(self): if self.use_ortools: command.append('--use-ortools') command.append('--ortools-solver=' + self.ortools_solver) + if self.named_mps_problems: + command.append('--named-mps-problems') process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) process.communicate() @@ -38,4 +41,4 @@ def get_return_code(self): return self.return_code def success(self): - return self.return_code == 0 \ No newline at end of file + return self.return_code == 0 diff --git a/src/tests/run-study-tests/conftest.py b/src/tests/run-study-tests/conftest.py index dc4d1e46ec..cf88f051d2 100644 --- a/src/tests/run-study-tests/conftest.py +++ b/src/tests/run-study-tests/conftest.py @@ -4,6 +4,7 @@ def pytest_addoption(parser): parser.addoption("--use-ortools", action="store_true", default=False) parser.addoption("--ortools-solver", action="store", default="sirius") parser.addoption("--solver-path", action="store") + parser.addoption("--named-mps-problems", action="store_true", default=False) @pytest.fixture() def ortools_solver(request): @@ -16,3 +17,7 @@ def use_ortools(request): @pytest.fixture() def solver_path(request): return request.config.getoption("--solver-path") + +@pytest.fixture() +def named_mps_problems(request): + return request.config.getoption("--named-mps-problems") diff --git a/src/tests/run-study-tests/fixtures.py b/src/tests/run-study-tests/fixtures.py index 8f286bed40..b37cfda2c4 100644 --- a/src/tests/run-study-tests/fixtures.py +++ b/src/tests/run-study-tests/fixtures.py @@ -40,8 +40,8 @@ def resultsRemover(study_path): return results_remover(study_path) @pytest.fixture -def simulation(study_path, solver_path, use_ortools, ortools_solver): - return study_run(study_path, solver_path, use_ortools, ortools_solver) +def simulation(study_path, solver_path, use_ortools, ortools_solver, named_mps_problems): + return study_run(study_path, solver_path, use_ortools, ortools_solver, named_mps_problems) @pytest.fixture(autouse=True) def check_runner(simulation, resultsRemover):