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