Skip to content
Snippets Groups Projects
Commit aade3a7f authored by Patrick Baudin's avatar Patrick Baudin
Browse files

[wp/tests] how to add a test

parent 6e692507
No related branches found
No related tags found
No related merge requests found
# 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.*
```
...@@ -48,14 +48,12 @@ ...@@ -48,14 +48,12 @@
[wp] Proved goals: 41 / 41 [wp] Proved goals: 41 / 41
Qed: 15 Qed: 15
Alt-Ergo 2.0.0: 26 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 16 100%
Functions WP Alt-Ergo Total Success find_ptr 6 11 17 100%
find 7 9 (56..80) 16 100% iter_ptr 2 6 8 100%
find_ptr 6 11 (192..240) 17 100% ------------------------------------------------------------
iter_ptr 2 6 (72..96) 8 100%
-------------------------------------------------------------
[wp] Running WP plugin... [wp] Running WP plugin...
[rte] annotating function find [rte] annotating function find
[rte] annotating function find_ptr [rte] annotating function find_ptr
...@@ -108,11 +106,9 @@ iter_ptr 2 6 (72..96) 8 100% ...@@ -108,11 +106,9 @@ iter_ptr 2 6 (72..96) 8 100%
[wp] Proved goals: 29 / 44 [wp] Proved goals: 29 / 44
Qed: 0 Qed: 0
Alt-Ergo 2.0.0: 29 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 18 100%
Functions WP Alt-Ergo Total Success find_ptr 6 12 18 100%
find 7 11 (56..80) 18 100% iter_ptr 2 6 8 100%
find_ptr 6 12 (192..240) 18 100% ------------------------------------------------------------
iter_ptr 2 6 (72..96) 8 100%
-------------------------------------------------------------
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment