Remove building with NOCRYPTO option
[minix3.git] / external / bsd / atf / dist / atf-c / h_build.h
blob9454fdfde807b37394cf18714c5809a523dd3bfd
1 /*
2 * Automated Testing Framework (atf)
4 * Copyright (c) 2009 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
16 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
17 * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
18 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
23 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 #if defined(TESTS_ATF_ATF_C_H_BUILD_H)
31 # error "Cannot include h_build.h more than once."
32 #else
33 # define TESTS_ATF_ATF_C_H_BUILD_H
34 #endif
36 /* ---------------------------------------------------------------------
37 * Test case data.
38 * --------------------------------------------------------------------- */
40 static struct c_o_test {
41 const char *msg;
42 const char *cc;
43 const char *cflags;
44 const char *cppflags;
45 const char *sfile;
46 const char *ofile;
47 bool hasoptargs;
48 const char *const optargs[16];
49 const char *const expargv[16];
50 } c_o_tests[] = {
52 "No flags",
53 "cc",
54 "",
55 "",
56 "test.c",
57 "test.o",
58 false,
60 NULL
63 "cc", "-o", "test.o", "-c", "test.c", NULL
68 "Multi-word program name",
69 "cc -foo",
70 "",
71 "",
72 "test.c",
73 "test.o",
74 false,
76 NULL
79 "cc", "-foo", "-o", "test.o", "-c", "test.c", NULL
84 "Some cflags",
85 "cc",
86 "-f1 -f2 -f3 -f4-f5",
87 "",
88 "test.c",
89 "test.o",
90 false,
92 NULL
95 "cc", "-f1", "-f2", "-f3", "-f4-f5", "-o", "test.o",
96 "-c", "test.c", NULL
101 "Some cppflags",
102 "cc",
104 "-f1 -f2 -f3 -f4-f5",
105 "test.c",
106 "test.o",
107 false,
109 NULL
112 "cc", "-f1", "-f2", "-f3", "-f4-f5", "-o", "test.o",
113 "-c", "test.c", NULL
118 "Some cflags and cppflags",
119 "cc",
120 "-f2",
121 "-f1",
122 "test.c",
123 "test.o",
124 false,
126 NULL
129 "cc", "-f1", "-f2", "-o", "test.o", "-c", "test.c", NULL
134 "Some optional arguments",
135 "cc",
138 "test.c",
139 "test.o",
140 true,
142 "-o1", "-o2", NULL
145 "cc", "-o1", "-o2", "-o", "test.o", "-c", "test.c", NULL
150 "Some cflags, cppflags and optional arguments",
151 "cc",
152 "-f2",
153 "-f1",
154 "test.c",
155 "test.o",
156 true,
158 "-o1", "-o2", NULL
161 "cc", "-f1", "-f2", "-o1", "-o2", "-o", "test.o",
162 "-c", "test.c", NULL
167 NULL,
168 NULL,
169 NULL,
170 NULL,
171 NULL,
172 NULL,
173 false,
174 { NULL },
175 { NULL },
179 static struct cpp_test {
180 const char *msg;
181 const char *cpp;
182 const char *cppflags;
183 const char *sfile;
184 const char *ofile;
185 bool hasoptargs;
186 const char *const optargs[16];
187 const char *const expargv[16];
188 } cpp_tests[] = {
190 "No flags",
191 "cpp",
193 "test.c",
194 "test.out",
195 false,
197 NULL
200 "cpp", "-o", "test.out", "test.c", NULL
205 "Multi-word program name",
206 "cpp -foo",
208 "test.c",
209 "test.out",
210 false,
212 NULL
215 "cpp", "-foo", "-o", "test.out", "test.c", NULL
220 "Some cppflags",
221 "cpp",
222 "-f1 -f2 -f3 -f4-f5",
223 "test.c",
224 "test.out",
225 false,
227 NULL
230 "cpp", "-f1", "-f2", "-f3", "-f4-f5", "-o", "test.out",
231 "test.c", NULL
236 "Some optional arguments",
237 "cpp",
239 "test.c",
240 "test.out",
241 true,
243 "-o1", "-o2", NULL
246 "cpp", "-o1", "-o2", "-o", "test.out", "test.c", NULL
251 "Some cppflags and optional arguments",
252 "cpp",
253 "-f1",
254 "test.c",
255 "test.out",
256 true,
258 "-o1", "-o2", NULL
261 "cpp", "-f1", "-o1", "-o2", "-o", "test.out", "test.c", NULL
266 NULL,
267 NULL,
268 NULL,
269 NULL,
270 NULL,
271 false,
272 { NULL },
273 { NULL },
277 static struct cxx_o_test {
278 const char *msg;
279 const char *cxx;
280 const char *cxxflags;
281 const char *cppflags;
282 const char *sfile;
283 const char *ofile;
284 bool hasoptargs;
285 const char *const optargs[16];
286 const char *const expargv[16];
287 } cxx_o_tests[] = {
289 "No flags",
290 "c++",
293 "test.c",
294 "test.o",
295 false,
297 NULL
300 "c++", "-o", "test.o", "-c", "test.c", NULL
305 "Multi-word program name",
306 "c++ -foo",
309 "test.c",
310 "test.o",
311 false,
313 NULL
316 "c++", "-foo", "-o", "test.o", "-c", "test.c", NULL
321 "Some cxxflags",
322 "c++",
323 "-f1 -f2 -f3 -f4-f5",
325 "test.c",
326 "test.o",
327 false,
329 NULL
332 "c++", "-f1", "-f2", "-f3", "-f4-f5", "-o", "test.o",
333 "-c", "test.c", NULL
338 "Some cppflags",
339 "c++",
341 "-f1 -f2 -f3 -f4-f5",
342 "test.c",
343 "test.o",
344 false,
346 NULL
349 "c++", "-f1", "-f2", "-f3", "-f4-f5", "-o", "test.o",
350 "-c", "test.c", NULL
355 "Some cxxflags and cppflags",
356 "c++",
357 "-f2",
358 "-f1",
359 "test.c",
360 "test.o",
361 false,
363 NULL
366 "c++", "-f1", "-f2", "-o", "test.o", "-c", "test.c", NULL
371 "Some optional arguments",
372 "c++",
375 "test.c",
376 "test.o",
377 true,
379 "-o1", "-o2", NULL
382 "c++", "-o1", "-o2", "-o", "test.o", "-c", "test.c", NULL
387 "Some cxxflags, cppflags and optional arguments",
388 "c++",
389 "-f2",
390 "-f1",
391 "test.c",
392 "test.o",
393 true,
395 "-o1", "-o2", NULL
398 "c++", "-f1", "-f2", "-o1", "-o2", "-o", "test.o",
399 "-c", "test.c", NULL
404 NULL,
405 NULL,
406 NULL,
407 NULL,
408 NULL,
409 NULL,
410 false,
411 { NULL },
412 { NULL },