forked from ocaml/ocaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuiltin_variables.ml
125 lines (90 loc) · 4.54 KB
/
builtin_variables.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
(**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* Sebastien Hinderer, projet Gallium, INRIA Paris *)
(* *)
(* Copyright 2016 Institut National de Recherche en Informatique et *)
(* en Automatique. *)
(* *)
(* All rights reserved. This file is distributed under the terms of *)
(* the GNU Lesser General Public License version 2.1, with the *)
(* special exception on linking described in the file LICENSE. *)
(* *)
(**************************************************************************)
(* Definition of variables used by built-in actions *)
(* The variables are listed in alphabetical order *)
(*
The name of the identifier representing a variable and its string name
should be similar. Is there a way to enforce this?
*)
open Variables (* Should not be necessary with a ppx *)
let arguments = make ("arguments",
"Arguments passed to executed programs and scripts")
let c_preprocessor = make ("c_preprocessor",
"Command to use to invoke the C preprocessor")
let compiler_directory_suffix = make ("compiler_directory_suffix",
"Suffix to add to the directory where the test will be compiled")
let compiler_reference = make ("compiler_reference",
"Reference file for compiler output for ocamlc.byte and ocamlopt.byte")
let compiler_reference2 = make ("compiler_reference2",
"Reference file for compiler output for ocamlc.opt and ocamlopt.opt")
let compiler_reference_suffix = make ("compiler_reference_suffix",
"Suffix to add to the file name containing the reference for compiler output")
let compiler_output = make ("compiler_output",
"Where to log output of bytecode compilers")
let compiler_output2 = make ("compiler_output2",
"Where to log output of native compilers")
let ocamlc_flags = make ("ocamlc_flags",
"Flags passed to ocamlc.byte and ocamlc.opt")
let ocamlc_default_flags = make ("ocamlc_default_flags",
"Flags passed by default to ocamlc.byte and ocamlc.opt")
let files = make ("files",
"Files used by the tests")
let flags = make ("flags",
"Flags passed to all the compilers")
let libraries = make ("libraries",
"Libraries the program should be linked with")
let modules = make ("modules",
"Other modules of the test")
let ocamlopt_flags = make ("ocamlopt_flags",
"Flags passed to ocamlopt.byte and ocamlopt.opt")
let ocamlopt_default_flags = make ("ocamlopt_default_flags",
"Flags passed by default to ocamlopt.byte and ocamlopt.opt")
let ocaml_byte_exit_status = make ("ocaml_byte_exit_status",
"Expected exit status of ocaml.byte")
let ocamlc_byte_exit_status = make ("ocamlc_byte_exit_status",
"Expected exit status of ocac.byte")
let ocamlopt_byte_exit_status = make ("ocamlopt_byte_exit_status",
"Expected exit status of ocamlopt.byte")
let ocaml_opt_exit_status = make ("ocaml_opt_exit_status",
"Expected exit status of ocaml.opt")
let ocamlc_opt_exit_status = make ("ocamlc_opt_exit_status",
"Expected exit status of ocac.opt")
let ocamlopt_opt_exit_status = make ("ocamlopt_opt_exit_status",
"Expected exit status of ocamlopt.opt")
let output = make ("output",
"Where the output of executing the program is saved")
let program = make ("program",
"Name of program produced by ocamlc.byte and ocamlopt.byte")
let program2 = make ("program2",
"Name of program produced by ocamlc.opt and ocamlopt.opt")
let reference = make ("reference",
"Path of file to which program output should be compared")
let script = make ("script",
"External script to run")
let stdin = make ("stdin", "Default standard input")
let stdout = make ("stdout", "Default standard output")
let stderr = make ("stderr", "Default standard error")
let test_build_directory = make ("test_build_directory",
"Directory for files produced during a test")
let test_file = make ("test_file",
"Name of file containing the specification of which tests to run")
let test_source_directory = make ("test_source_directory",
"Directory containing the test source files")
let _ = List.iter register_variable
[
c_preprocessor;
ocamlc_default_flags;
ocamlopt_default_flags
]