diff --git a/src/plugins/wp/tests/README.md b/src/plugins/wp/tests/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c88b74cb66da4ec06b1b519cc8808a595c96eec8 --- /dev/null +++ b/src/plugins/wp/tests/README.md @@ -0,0 +1,42 @@ +# How to add a new test + +``` +cd src/plugins/wp +git add tests/wp_gallery/find.i +``` + +## Update oracle for default configuration + +1. generate oracle files +``` +ptests.opt tests/wp_gallery/find.i -show +ptests.opt tests/wp_gallery/find.i -update +``` + +2. check again (for a final validation) before adding the oracle files +``` +ptests.opt tests/wp_gallery/find.i +git add tests/wp_gallery/oracle/find.* +``` + +## Update oracle for 'qualif' configuration (if there is such) + +1. generate oracle files and updated cache files +``` +FRAMAC_WP_CACHE=update ptests.opt -config qualif tests/wp_gallery/find.i -show +ptests.opt -config qualif tests/wp_gallery/find.i -update +``` + +Note: cleaning the cache is _not_ recommanded when updating or modifying an +existing test; actually it might introduce git merge conflicts that are +annoying to resolve. But the cleaning can be usefull when adding a new test. +It can be done using the command (before those of the step 1): +``` +rm -rf tests/wp_gallery/oracle_qualif/find.[0-9]*.session/cache/ +``` + +2. check again (for a final validation) before adding the oracle and cache files +``` +ptests.opt -config qualif tests/wp_gallery/find.i +git add tests/wp_gallery/oracle_qualif/find.* +``` diff --git a/src/plugins/wp/tests/wp_gallery/oracle_qualif/find.res.oracle b/src/plugins/wp/tests/wp_gallery/oracle_qualif/find.res.oracle index 8f59a81a8f93dddf21a3b224837935fd374d8993..f0f68963ee4697b08904f242b4abb683cc7fcd38 100644 --- a/src/plugins/wp/tests/wp_gallery/oracle_qualif/find.res.oracle +++ b/src/plugins/wp/tests/wp_gallery/oracle_qualif/find.res.oracle @@ -48,14 +48,12 @@ [wp] Proved goals: 41 / 41 Qed: 15 Alt-Ergo 2.0.0: 26 -[wp] Report in: 'tests/wp_gallery/oracle_qualif/find.0.report.json' -[wp] Report out: 'tests/wp_gallery/result_qualif/find.0.report.json' -------------------------------------------------------------- -Functions WP Alt-Ergo Total Success -find 7 9 (56..80) 16 100% -find_ptr 6 11 (192..240) 17 100% -iter_ptr 2 6 (72..96) 8 100% -------------------------------------------------------------- +------------------------------------------------------------ + Functions WP Alt-Ergo Total Success + find 7 9 16 100% + find_ptr 6 11 17 100% + iter_ptr 2 6 8 100% +------------------------------------------------------------ [wp] Running WP plugin... [rte] annotating function find [rte] annotating function find_ptr @@ -108,11 +106,9 @@ iter_ptr 2 6 (72..96) 8 100% [wp] Proved goals: 29 / 44 Qed: 0 Alt-Ergo 2.0.0: 29 -[wp] Report in: 'tests/wp_gallery/oracle_qualif/find.0.report.json' -[wp] Report out: 'tests/wp_gallery/result_qualif/find.0.report.json' -------------------------------------------------------------- -Functions WP Alt-Ergo Total Success -find 7 11 (56..80) 18 100% -find_ptr 6 12 (192..240) 18 100% -iter_ptr 2 6 (72..96) 8 100% -------------------------------------------------------------- +------------------------------------------------------------ + Functions WP Alt-Ergo Total Success + find 7 11 18 100% + find_ptr 6 12 18 100% + iter_ptr 2 6 8 100% +------------------------------------------------------------