PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/errors/make.sh

#
Shell | 122 lines | 108 code | 11 blank | 3 comment | 2 complexity | 530c6a9b69132ebd7c7efdeb1d991a20 MD5 | raw file
  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_constant
 30pp_defined
 31pp_deprecated
 32pp_illegal_argument
 33pp_macro_args
 34pp_macro_badchar
 35pp_macro_defined_unterminated
 36pp_macro_expansion
 37pp_macro_expansion_multiline
 38pp_macro_inline_unterminated
 39pp_macro_missing_expression
 40pp_macro_unexpected_tokens
 41pp_macro_nargs
 42pp_macro_redef
 43pp_macro_rparen
 44pp_macro_unterminated
 45pp_misplaced_elif
 46pp_misplaced_else
 47pp_missing_enddef
 48pp_missing_endif
 49pp_missing_file
 50pp_missing_rblock
 51pp_pragma
 52pp_unterm_char
 53pp_unterm_comment
 54pp_unterm_string
 55pp_variable_args
 56swig_apply_nargs
 57swig_identifier
 58swig_insert_bad
 59swig_typemap_copy
 60swig_typemap_old
 61swig_typemap_warn
 62'
 63
 64# Files run in C++ mode
 65CPPFILES='
 66cpp_bad_extern
 67cpp_extend_destructors
 68cpp_extend_redefine
 69cpp_extend_undefined
 70cpp_inline_namespace
 71cpp_inherit
 72cpp_macro_locator
 73cpp_missing_rtemplate
 74cpp_namespace_alias
 75cpp_namespace_aliasnot
 76cpp_namespace_aliasundef
 77cpp_nested
 78cpp_no_access
 79cpp_no_return_type
 80cpp_nobase
 81cpp_overload
 82cpp_overload_const
 83cpp_private_defvalue
 84cpp_private_inherit
 85cpp_recursive_typedef
 86cpp_shared_ptr
 87cpp_template_argname
 88cpp_template_nargs
 89cpp_template_not
 90cpp_template_partial
 91cpp_template_repeat
 92cpp_template_undef
 93cpp_using_not
 94cpp_using_undef
 95'
 96
 97LOGFILE='test.log'
 98SWIGOPT=$*
 99
100rm -f ${LOGFILE}
101
102echo "SWIG error and warning test. opts=${SWIGOPT}" >> ${LOGFILE}
103echo "-----------------------------------------------------------" >> ${LOGFILE}
104
105for i in ${CFILES}; do 
106   echo "    Testing : ${i}.i"; 
107   echo "" >> ${LOGFILE};
108   echo ":::::::::::::::::::::::::::::::: ${i}.i :::::::::::::::::::::::::::::::::::" >> ${LOGFILE};
109   ${SWIG} -python -Wall ${SWIGOPT} ${i}.i >>${LOGFILE} 2>&1
110done
111
112for i in ${CPPFILES}; do 
113   echo "    Testing : ${i}.i"; 
114   echo "" >> ${LOGFILE}
115   echo ":::::::::::::::::::::::::::::::: ${i}.i :::::::::::::::::::::::::::::::::::" >> ${LOGFILE};
116   ${SWIG} -python -Wall -c++ ${SWIGOPT} ${i}.i >>${LOGFILE} 2>&1
117done
118
119echo ""
120echo "Results written to '${LOGFILE}'"
121
122