Commit | Line | Data |
---|---|---|
9bc82bae C |
1 | (* |
2 | * Copyright 2010, INRIA, University of Copenhagen | |
3 | * Julia Lawall, Rene Rydhof Hansen, Gilles Muller, Nicolas Palix | |
4 | * Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen | |
5 | * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix | |
6 | * This file is part of Coccinelle. | |
7 | * | |
8 | * Coccinelle is free software: you can redistribute it and/or modify | |
9 | * it under the terms of the GNU General Public License as published by | |
10 | * the Free Software Foundation, according to version 2 of the License. | |
11 | * | |
12 | * Coccinelle is distributed in the hope that it will be useful, | |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | * GNU General Public License for more details. | |
16 | * | |
17 | * You should have received a copy of the GNU General Public License | |
18 | * along with Coccinelle. If not, see <http://www.gnu.org/licenses/>. | |
19 | * | |
20 | * The authors reserve the right to distribute this or future versions of | |
21 | * Coccinelle under other licenses. | |
22 | *) | |
23 | ||
24 | ||
c491d8ee C |
25 | (* |
26 | * Copyright 2010, INRIA, University of Copenhagen | |
27 | * Julia Lawall, Rene Rydhof Hansen, Gilles Muller, Nicolas Palix | |
28 | * Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen | |
29 | * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix | |
30 | * This file is part of Coccinelle. | |
31 | * | |
32 | * Coccinelle is free software: you can redistribute it and/or modify | |
33 | * it under the terms of the GNU General Public License as published by | |
34 | * the Free Software Foundation, according to version 2 of the License. | |
35 | * | |
36 | * Coccinelle is distributed in the hope that it will be useful, | |
37 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
38 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
39 | * GNU General Public License for more details. | |
40 | * | |
41 | * You should have received a copy of the GNU General Public License | |
42 | * along with Coccinelle. If not, see <http://www.gnu.org/licenses/>. | |
43 | * | |
44 | * The authors reserve the right to distribute this or future versions of | |
45 | * Coccinelle under other licenses. | |
46 | *) | |
47 | ||
48 | ||
34e49164 C |
49 | open Common |
50 | ||
51 | (*****************************************************************************) | |
52 | (* work with tests/ *) | |
53 | (*****************************************************************************) | |
c3e37e97 | 54 | val testone : string (*prefix*) -> string (*test*) -> bool (*compare_expected*) -> unit |
708f4980 | 55 | val testall : ?expected_score_file:string -> unit -> unit |
34e49164 C |
56 | |
57 | (*****************************************************************************) | |
58 | (* works with tests-big/. The .res, .ok, .spatch_ok, .failed, .var *) | |
59 | (*****************************************************************************) | |
60 | val test_okfailed : filename (*cocci*) -> filename (*c*) list -> unit | |
61 | val test_regression_okfailed : unit -> unit | |
62 | ||
63 | ||
64 | ||
65 | (*****************************************************************************) | |
66 | (* the parameter is the result of Cocci.full_engine *) | |
67 | (*****************************************************************************) | |
ae4735db | 68 | val compare_with_expected : (filename * filename option) list -> unit |
34e49164 C |
69 | |
70 | ||
71 | (*****************************************************************************) | |
72 | (* to test/debug the coccinelle subsystems *) | |
73 | (*****************************************************************************) | |
74 | ||
ae4735db | 75 | (* pad: |
34e49164 C |
76 | * I moved the parsing_c/ subsystem testing in parsing_c/test_parsing_c.ml |
77 | * as I need it for other projects too. | |
78 | *) | |
79 | ||
80 | val test_parse_cocci : filename -> unit | |
81 | ||
82 | (*****************************************************************************) | |
83 | (* to be called by ocaml toplevel, to test. *) | |
84 | (*****************************************************************************) | |
85 | ||
86 | val sp_of_file : | |
87 | filename (* coccifile *) -> filename option (* isofile *) -> | |
faf9a90c C |
88 | Ast_cocci.metavar list list * Ast_cocci.rule list * |
89 | Ast_cocci.meta_name list list list * | |
34e49164 | 90 | Ast_cocci.meta_name list list list * |
978fd7e5 C |
91 | (Ast_cocci.meta_name list list list (*used after list*) * |
92 | (*fresh used after list*) | |
93 | Ast_cocci.meta_name list list list * | |
94 | (*fresh used after list seeds*) | |
95 | Ast_cocci.meta_name list list list) * | |
96 | Ast_cocci.meta_name list list list * | |
1eddfd50 C |
97 | (string list option * |
98 | string list option * | |
99 | Get_constants2.combine option) | |
34e49164 C |
100 | |
101 | (* TODO: Remove | |
102 | val rule_elem_of_string : string -> filename option -> Ast_cocci.rule_elem | |
103 | *) | |
104 | ||
105 | (* | |
106 | val flows_of_ast : Ast_c.program -> Control_flow_c.cflow list | |
107 | val print_flow : Control_flow_c.cflow -> unit | |
108 | ||
109 | val ctls_of_ast : | |
110 | Ast_cocci.rule list -> | |
111 | Ast_cocci.meta_name list list list -> | |
112 | (Lib_engine.ctlcocci * | |
113 | ((Lib_engine.predicate * Ast_cocci.meta_name Ast_ctl.modif) | |
114 | list list)) | |
115 | list list | |
116 | ||
117 | ||
118 | val one_flow : Control_flow_c.cflow list -> Control_flow_c.cflow | |
119 | val one_ctl : Lib_engine.ctlcocci list list -> Lib_engine.ctlcocci | |
120 | *) |