Skip to content

Pytest integrated#3331

Open
tomc271 wants to merge 248 commits into
nextfrom
pytest-integrated
Open

Pytest integrated#3331
tomc271 wants to merge 248 commits into
nextfrom
pytest-integrated

Conversation

@tomc271

@tomc271 tomc271 commented Mar 17, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread tests/run_integrated_tests.sh Outdated
Comment thread tests/run_integrated_tests.sh Outdated
Comment thread pyproject.toml
Comment thread CMakeLists.txt Outdated
Comment thread .ci_with_cmake.sh
Comment thread tests/integrated/test-boutpp/slicing/test_slicing.py Outdated
Comment thread tests/integrated/test-boutpp/slicing/test_slicing.py Outdated
Comment thread tests/integrated/test-boutpp/slicing/test_slicing.py Outdated
Comment thread tests/integrated/test-command-args/test_command_args.py Outdated
matching either to a file named `test_foo.py`.
Native configuration is x86_64-pc-linux-gnu

		===  tests ===

Schedule of variations:
    unix

Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.

		===  Summary === to  in CMakeLists.txt
so that the `input` directory is found.
so that the `test` directory is found.
Fails due to missing file `grid.fci.nc`.
Change directory to exe location prior to attempting to run it.
Change directory to exe location prior to attempting to run it.
Change directory to exe location prior to attempting to run it.
dschwoerer
dschwoerer previously approved these changes Jun 30, 2026

@dschwoerer dschwoerer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not see any major regressions, there are several tests where the output on failure is worse than it used to, because it already fails on the first failure.

I have pushed a few fixes. That was easier then turning them into comments. Feel free to revert, if they seem / are wrong.

One thing that is worrying me, ist that something like this:
@pytest.mark.parametrize("nproc", [1, 2, 3, 4]) will cause race conditions - because they run the simulations in the same folder.
I guess that applies to most parametrisation - they will cause race conditions if the simulation is in the same folder.
I am fine with merging it now, if that will be resolved soonish, so that we do not need to check all the tests again. But that means we may not be testing what we want to test, and it might also fail, because the dump files are still written for a different simulation.

dschwoerer
dschwoerer previously approved these changes Jun 30, 2026
This reverts commit 3e91960.

We do not call MPI_finalize.
This make mpirun unhappy.
@ZedThree

ZedThree commented Jul 1, 2026

Copy link
Copy Markdown
Member

One thing that is worrying me, ist that something like this:
@pytest.mark.parametrize("nproc", [1, 2, 3, 4]) will cause race conditions - because they run the simulations in the same folder.

There's a fixture copy_and_cwd_to_unique_tmp_dir which is used automatically (and implicitly) and takes care of running each test case in a unique tmpdir, so there shouldn't be any race conditions

@dschwoerer

Copy link
Copy Markdown
Contributor

Amazing ❤️
Thanks @tomc271!

@tomc271

tomc271 commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

@tomc271 Can you comment when you've fixed test_yupdown, and we'll merge then. Everything else can wait for a second PR

@ZedThree: test_yupdown is now fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants