Skip to content
Snippets Groups Projects
Commit 826fb198 authored by Patrick Baudin's avatar Patrick Baudin Committed by Virgile Prevosto
Browse files

[tests] using PLUGIN directive and -no-autoload-plugins

parent 257a6b46
No related branches found
No related tags found
No related merge requests found
Showing
with 42 additions and 21 deletions
......@@ -6,8 +6,8 @@
c ∈ {1}
y ∈ {0}
[eva] computing for function g <- main.
Called from tests/misc/char_ampamp.c:12.
[eva] tests/misc/char_ampamp.c:6: Frama_C_show_each_x: {1}
Called from tests/misc/char_ampamp.c:17.
[eva] tests/misc/char_ampamp.c:11: Frama_C_show_each_x: {1}
[eva] Recording results for g
[eva] Done for function g
[eva] Recording results for main
......
......@@ -4,7 +4,7 @@
[eva] Initial state computed
[eva:initial-state] Values of globals at initialization
[eva:alarm] tests/misc/ensures.i:5: Warning:
[eva:alarm] tests/misc/ensures.i:8: Warning:
function main: postcondition got status invalid.
[eva] done for function main
[eva:summary] ====== ANALYSIS SUMMARY ======
......
......@@ -4,7 +4,7 @@
[eva] Initial state computed
[eva:initial-state] Values of globals at initialization
[eva] tests/misc/issue109.i:10: assertion got status valid.
[eva] tests/misc/issue109.i:15: assertion got status valid.
[eva] Recording results for main
[eva] done for function main
[eva] ====== VALUES COMPUTED ======
......@@ -17,7 +17,7 @@
[eva] Initial state computed
[eva:initial-state] Values of globals at initialization
[eva] tests/misc/issue109.i:10: assertion got status valid.
[eva] tests/misc/issue109.i:15: assertion got status valid.
[eva] Recording results for main
[eva] done for function main
[eva] ====== VALUES COMPUTED ======
......
......@@ -4,7 +4,7 @@
[eva] Initial state computed
[eva:initial-state] Values of globals at initialization
[eva:alarm] tests/misc/well_typed_alarm.i:11: Warning:
[eva:alarm] tests/misc/well_typed_alarm.i:16: Warning:
pointer comparison. assert \pointer_comparable((void *)p, (void *)q);
[eva] done for function main
[eva:summary] ====== ANALYSIS SUMMARY ======
......
/*run.config
PLUGIN: @EVA_PLUGINS@
STDOPT: +"-machdep gcc_x86_64 -kernel-msg-key typing:pragma"
STDOPT: +"-machdep gcc_x86_32"
STDOPT: +"-machdep msvc_x86_64"
*/
#include "pragma-pack-utils.h"
#include <stdint.h>
......
/* run.config
PLUGIN: @EVA_PLUGINS@
STDOPT: +"-machdep gcc_x86_64"
STDOPT: +"-machdep msvc_x86_64"
*/
......@@ -7,7 +8,6 @@
// In GCC, its current (undocumented) behavior is equivalent to #pragma pack(),
// that is, disable packing (reset to default). We emulate this behavior,
// but with a warning.
#include "pragma-pack-utils.h"
#include <stdint.h>
......
PLUGIN:
MODULE: global_decl_loc
MODULE:
STDOPT:
# COMMENT: Directive to add in your test file when using STDOPT:
# COMMENT: PLUGIN: @EVA_PLUGINS@
/* run.config*
PLUGIN: @EVA_PLUGINS@
MODULE: @PTEST_NAME@
OPT:
*/
int main(int c) {
int x = 0;
int y = 0;
int *p = &x;
int *q = &y;
if (c) q = &x;
if (p<=q) x++;
return *q;
}
/* run.config
PLUGIN: @EVA_PLUGINS@
EXIT:1
OPT: -eva @EVA_CONFIG@ -cpp-extra-args=-DSYNTAX_ERRORS -kernel-warn-key=annot-error=active
OPT: -eva @EVA_CONFIG@ -cpp-extra-args=-DNONCONST
......@@ -7,7 +8,6 @@
OPT: -eva @EVA_CONFIG@ -cpp-extra-args=-DALLGLOBAL -eva-msg-key widen-hints
*/
#define N 2
const int x = 9;
int not_const = 42; // cannot be used as widen hint
......
/* run.config
PLUGIN: @EVA_PLUGINS@
STDOPT: #"-eva-msg-key widen-hints"
OPT: -print
*/
#include <stdlib.h>
#define N 2
......
/* run.config*
PLUGIN: @EVA_PLUGINS@
STDOPT: #"-eva-subdivide-non-linear 20"
*/
#include "__fc_builtin.h"
#include <math.h>
......
/* run.config
PLUGIN: variadic
MODULE: @PTEST_NAME@
OPT: -journal-disable -print -variadic-no-translation
*/
#include <stdio.h>
// See http://stackoverflow.com/questions/18102502/mixing-wide-and-narrow-string-literals-in-c
int main(){
printf( "%s\n", "123" "456" );
......
STDOPT: +"-load-module" +"occurrence" -"-eva" -"-out" -"-input" -"-deps" +"-occurrence-verbose 1"
PLUGIN: eva,scope occurrence
STDOPT: -"-eva" -"-out" -"-input" -"-deps" +"-occurrence-verbose 1"
/* run.config
PLUGIN: @EVA_PLUGINS@ pdg slicing
STDOPT: +"-eva -inout -pdg -calldeps -deps -then -slice-return main -then-last -print @EVA_OPTIONS@"
*/
int Y, X;
volatile v;
......
OPT: -journal-disable @EVA_OPTIONS@ -pdg-print -pdg-verbose 2
PLUGIN: @EVA_PLUGINS@ pdg
OPT: @EVA_OPTIONS@ -pdg-print -pdg-verbose 2
COMMENT: this directory is meant to test the parser and pretty-printer
COMMENT: the default option checks that pretty-printed code can be merged
COMMENT: with the original one
PLUGIN:
CMD: FRAMAC_PLUGIN=tests/.empty @frama-c@
OPT: @PTEST_FILE@ -print -journal-disable -check -then -ocode @PTEST_DIR@/result/@PTEST_NAME@.c -print -then @PTEST_DIR@/result/@PTEST_NAME@.c @PTEST_FILE@ -ocode="" -print
OPT: @PTEST_FILE@ -print -then -ocode @PTEST_DIR@/result/@PTEST_NAME@.c -print -then @PTEST_DIR@/result/@PTEST_NAME@.c @PTEST_FILE@ -ocode="" -print
......@@ -4,15 +4,15 @@
[eva] Initial state computed
[eva:initial-state] Values of globals at initialization
t[0..9] ∈ {0}
[eva:alarm] tests/rte/unspecified_sequence.i:7: Warning:
[eva:alarm] tests/rte/unspecified_sequence.i:12: Warning:
function main: precondition got status unknown.
[eva] computing for function f <- main.
Called from tests/rte/unspecified_sequence.i:10.
Called from tests/rte/unspecified_sequence.i:15.
[eva] Recording results for f
[eva] Done for function f
[eva] tests/rte/unspecified_sequence.i:11: Reusing old results for call to f
[eva] tests/rte/unspecified_sequence.i:16: Reusing old results for call to f
[eva] computing for function f <- main.
Called from tests/rte/unspecified_sequence.i:11.
Called from tests/rte/unspecified_sequence.i:16.
[eva] Recording results for f
[eva] Done for function f
[eva] Recording results for main
......
PLUGIN: rtegen
STDOPT:
/* run.config
PLUGIN: @EVA_PLUGINS@
STDOPT:
*/
unsigned long long f(int x) {
return 0;
}
......
/* run.config
PLUGIN: eva,scope rtegen report
OPT: -rte -then -eva @EVA_OPTIONS@ -then -report
*/
#include "stdio.h"
int main(){
......
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