/tags/rel-1.3.35/Examples/test-suite/errors/make.sh
Shell | 103 lines | 89 code | 11 blank | 3 comment | 2 complexity | 612f7a9f40e0ba7840fee55c5f8d5d9b MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
1#!/bin/sh
2echo "---------------------------------------"
3echo "Testing SWIG error and warning messages"
4echo "---------------------------------------"
5
6SWIG='../../../preinst-swig'
7
8# Files run in C mode
9CFILES='
10c_bad_name
11c_bad_native
12c_class
13c_default_error
14c_deprecated
15c_empty_char
16c_enum_badvalue
17c_extra_rblock
18c_extra_rbrace
19c_extra_unsigned
20c_insert_missing
21c_long_short
22c_missing_rbrace
23c_missing_semi
24c_redefine
25c_varargs
26c_varargs_neg
27nomodule
28pp_badeval
29pp_defined
30pp_macro_args
31pp_macro_badchar
32pp_macro_nargs
33pp_macro_redef
34pp_macro_rparen
35pp_macro_unterminated
36pp_misplaced_elif
37pp_misplaced_else
38pp_missing_enddef
39pp_missing_endif
40pp_missing_file
41pp_missing_rblock
42pp_unterm_char
43pp_unterm_comment
44pp_unterm_string
45swig_apply_nargs
46swig_identifier
47swig_insert_bad
48swig_typemap_copy
49swig_typemap_old
50'
51
52# Files run in C++ mode
53CPPFILES='
54cpp_bad_extern
55cpp_extend_redefine
56cpp_extend_undefined
57cpp_inline_namespace
58cpp_missing_rtemplate
59cpp_namespace_alias
60cpp_namespace_aliasnot
61cpp_namespace_aliasundef
62cpp_nested
63cpp_no_access
64cpp_nobase
65cpp_overload
66cpp_private_defvalue
67cpp_private_inherit
68cpp_template_argname
69cpp_template_nargs
70cpp_template_not
71cpp_template_partial
72cpp_template_repeat
73cpp_template_undef
74cpp_using_not
75cpp_using_undef
76'
77
78LOGFILE='test.log'
79SWIGOPT=$*
80
81rm -f ${LOGFILE}
82
83echo "SWIG error and warning test. opts=${SWIGOPT}" >> ${LOGFILE}
84echo "-----------------------------------------------------------" >> ${LOGFILE}
85
86for i in ${CFILES}; do
87 echo " Testing : ${i}.i";
88 echo "" >> ${LOGFILE};
89 echo ":::::::::::::::::::::::::::::::: ${i}.i :::::::::::::::::::::::::::::::::::" >> ${LOGFILE};
90 ${SWIG} -Wall ${SWIGOPT} ${i}.i >>${LOGFILE} 2>&1
91done
92
93for i in ${CPPFILES}; do
94 echo " Testing : ${i}.i";
95 echo "" >> ${LOGFILE}
96 echo ":::::::::::::::::::::::::::::::: ${i}.i :::::::::::::::::::::::::::::::::::" >> ${LOGFILE};
97 ${SWIG} -Wall -c++ ${SWIGOPT} ${i}.i >>${LOGFILE} 2>&1
98done
99
100echo ""
101echo "Results written to '${LOGFILE}'"
102
103