Skip to content

test: make such that -init used on ./test.py re-create the init file only for the first variant to be executed - #427

Open
svalat wants to merge 1 commit into
idefix-code:developfrom
svalat:feature/regen-ref-via-init-with-test-py
Open

svalat wants to merge 1 commit into
idefix-code:developfrom
svalat:feature/regen-ref-via-init-with-test-py

Conversation

@svalat

@svalat svalat commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Up to now we needed to regenerate the references for the tests via the testme.py files via:

cd test/MHD/sod/
./testme.py -init

In principle it is also possible the generate them with the testme.json via

# for a single test
./test.py -init -subdir test/MHD/sod -k {FULL_TEST_NAME}

# for the whole directory
./test.py -init -subdir test/MHD/sod

To be safer in the second case, we don't want to regenerate several time the dump for the MPI / reconstruction.... variants but only for the first variant (default). And most important what we want to keep if the first one (default) not the last one (variant).

The patch takes the reference file name generated for the given test a a uniq key to check if it has already been done during the current run.

Note: in any case there is still the safety question to the user if it overrides an existing reference.

Note: it doesn't prevent the variants to run, but they will just run in validation mode after the generation of the reference by the first variant executed.

Feel free to see if it looks useful or if we should just forbid -init via the testme.json.

@svalat
svalat requested a review from glesur November 26, 2026 17:23

This branch has not been deployed

No deployments
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.

1 participant