From 8c5ef85083e8b892570aff4c049c6f8b75151b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Tue, 2 Jun 2020 16:38:46 +0200 Subject: [PATCH] [wp] make wp-qualif-env --- src/plugins/wp/Makefile.in | 4 ++++ src/plugins/wp/tests/README.md | 11 +++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/plugins/wp/Makefile.in b/src/plugins/wp/Makefile.in index b940eef7227..4fbdcabad8c 100644 --- a/src/plugins/wp/Makefile.in +++ b/src/plugins/wp/Makefile.in @@ -174,6 +174,10 @@ wp-qualif: ./bin/toplevel.opt ./bin/ptests.opt $(WP_QUALIF_CACHE) FRAMAC_WP_CACHEDIR=$(WP_QUALIF_CACHE) \ ./bin/ptests.opt src/plugins/wp/tests -config qualif -error-code +wp-qualif-env: + echo "FRAMAC_WP_CACHE=update" + echo "FRAMAC_WP_CACHEDIR=$(WP_QUALIF_CACHE)" + wp-qualif-update: ./bin/toplevel.opt ./bin/ptests.opt $(WP_QUALIF_CACHE) @echo "[CACHE] pull cache" @echo "[CACHE] $(WP_QUALIF_CACHE)" diff --git a/src/plugins/wp/tests/README.md b/src/plugins/wp/tests/README.md index 2a236d1c106..8b168ade3d2 100644 --- a/src/plugins/wp/tests/README.md +++ b/src/plugins/wp/tests/README.md @@ -41,6 +41,7 @@ The WP makefile provides several targets to automate cache management. It is hig recommanded to use them most of the time: - `make wp-qualif` re-runs qualif tests; no new cache entry is created, though. +- `make wp-qualif-env` prints the environment variables for wp-qualif. - `make wp-qualif-update` re-runs and create missing cache entries. - `make wp-qualif-upgrade` creates missing cache entries _and_ update tests scripts is necessary. - `make wp-qualif-push` commits and pushes all new cache entries to the GitLab repository. @@ -51,7 +52,7 @@ commands in a _local_ shell: $ export FRAMAC_WP_CACHE=update $ export FRAMAC_WP_CACHEDIR=<path-to-wp-cache> - $ ./bin/ptests.opt src/plugins/wp/tests/xxx/yyy.i [-show|-update] + $ ./bin/ptests.opt src/plugins/wp/tests/xxx/yyy.i -config qualif [-show|-update] It is _highly_ recommanded to _not_ set the `FRAMAC_WP_xxx` variables globally; doing so would causing WP to add new cache entries to the global « qualif » cache @@ -83,7 +84,13 @@ environment. To run individual tests, you may now use: $ export FRAMAC_WP_CACHE=update $ export FRAMAC_WP_CACHEDIR=$WP_QUALIF_CACHE - $ ./bin/ptests.opt src/plugins/wp/tests/xxx/yyy.i [-show|-update] + $ ./bin/ptests.opt src/plugins/wp/tests/xxx/yyy.i -config qualif [-show|-update] + +The necessary environment variables can also be displayed by the makefile: + + $ make wp-qualif-env + FRAMAC_WP_CACHE=update + FRAMAC_WP_CACHEDIR=$WP_QUALIF_CACHE As mentionned above, it is _not_ recommanded to globally set the `FRAMAC_WP_XXX` variables in your default shell environment, because WP will -- GitLab