Syntax check headers by C module when running the unit tests suite
Catch errors in the generated headers even when we don't have a run test. Unfortunately this uncovered that almost no unit tests actually pass, so many, many more of them had to be disabled.
This commit is contained in:
parent
200ea0e37d
commit
668f2b4a85
2 changed files with 90 additions and 1 deletions
|
|
@ -1734,15 +1734,19 @@ C_LDSHARED = @C_LDSHARED@
|
||||||
CXX_LDSHARED = @CXX_LDSHARED@
|
CXX_LDSHARED = @CXX_LDSHARED@
|
||||||
C_SO = @C_SO@
|
C_SO = @C_SO@
|
||||||
|
|
||||||
|
SYNTAX_CHECK := $(CC) -fsyntax-only -x c
|
||||||
|
|
||||||
c: $(SRCDIR_SRCS)
|
c: $(SRCDIR_SRCS)
|
||||||
$(SWIG) -c $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
|
$(SWIG) -c $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
|
||||||
$(CC) -c $(CCSHARED) -I$(SRCDIR) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES)
|
$(CC) -c $(CCSHARED) -I$(SRCDIR) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES)
|
||||||
$(C_LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(CLIBPREFIX)$(TARGET)$(C_SO)
|
$(C_LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(CLIBPREFIX)$(TARGET)$(C_SO)
|
||||||
|
$(SYNTAX_CHECK) -I$(SRCDIR)$(INTERFACEDIR) $(IWRAP:.i=.h)
|
||||||
|
|
||||||
c_cpp: $(SRCDIR_SRCS)
|
c_cpp: $(SRCDIR_SRCS)
|
||||||
$(SWIG) -c++ -c $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
|
$(SWIG) -c++ -c $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
|
||||||
$(CXX) -c $(CCSHARED) -I$(SRCDIR) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_CXXSRCS) $(INCLUDES)
|
$(CXX) -c $(CCSHARED) -I$(SRCDIR) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_CXXSRCS) $(INCLUDES)
|
||||||
$(CXX_LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(CLIBPREFIX)$(TARGET)$(C_SO)
|
$(CXX_LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(CLIBPREFIX)$(TARGET)$(C_SO)
|
||||||
|
$(SYNTAX_CHECK) -I$(SRCDIR)$(INTERFACEDIR) $(IWRAP:.i=.h)
|
||||||
|
|
||||||
c_compile: $(SRCDIR)$(RUNME).c
|
c_compile: $(SRCDIR)$(RUNME).c
|
||||||
$(COMPILETOOL) $(CC) $(CFLAGS) -o $(RUNME) -I. $< -L. -l$(TARGET)
|
$(COMPILETOOL) $(CC) $(CFLAGS) -o $(RUNME) -I. $< -L. -l$(TARGET)
|
||||||
|
|
|
||||||
|
|
@ -27,21 +27,42 @@ CPP_TEST_CASES := \
|
||||||
# The following tests are currently broken and need to be fixed.
|
# The following tests are currently broken and need to be fixed.
|
||||||
FAILING_C_TESTS := \
|
FAILING_C_TESTS := \
|
||||||
arrays \
|
arrays \
|
||||||
|
enum_missing \
|
||||||
funcptr \
|
funcptr \
|
||||||
function_typedef \
|
function_typedef \
|
||||||
lextype \
|
lextype \
|
||||||
|
li_carrays \
|
||||||
li_cdata \
|
li_cdata \
|
||||||
li_constraints \
|
li_constraints \
|
||||||
|
li_cpointer \
|
||||||
|
memberin_extend_c \
|
||||||
|
nested \
|
||||||
|
nested_extend_c \
|
||||||
|
nested_structs \
|
||||||
|
overload_extend2 \
|
||||||
|
overload_extend_c \
|
||||||
|
typedef_struct \
|
||||||
|
union_parameter \
|
||||||
|
unions \
|
||||||
|
|
||||||
FAILING_CPP_TESTS := \
|
FAILING_CPP_TESTS := \
|
||||||
abstract_typedef \
|
abstract_typedef \
|
||||||
|
abstract_typedef2 \
|
||||||
anonymous_bitfield \
|
anonymous_bitfield \
|
||||||
apply_signed_char \
|
apply_signed_char \
|
||||||
|
apply_strings \
|
||||||
argout \
|
argout \
|
||||||
array_member \
|
array_member \
|
||||||
|
array_typedef_memberin \
|
||||||
|
arrayref \
|
||||||
arrays_dimensionless \
|
arrays_dimensionless \
|
||||||
|
arrays_global \
|
||||||
|
arrays_global_twodim \
|
||||||
bools \
|
bools \
|
||||||
|
char_binary \
|
||||||
char_strings \
|
char_strings \
|
||||||
|
class_ignore \
|
||||||
|
class_scope_weird \
|
||||||
constant_pointers \
|
constant_pointers \
|
||||||
cpp_basic \
|
cpp_basic \
|
||||||
cpp_basic_class_var_pub_member_built_in \
|
cpp_basic_class_var_pub_member_built_in \
|
||||||
|
|
@ -49,26 +70,42 @@ FAILING_CPP_TESTS := \
|
||||||
cpp_basic_global_var_class \
|
cpp_basic_global_var_class \
|
||||||
cpp_basic_template_class \
|
cpp_basic_template_class \
|
||||||
cpp_basic_template_function \
|
cpp_basic_template_function \
|
||||||
|
cpp_namespace \
|
||||||
|
cpp_typedef \
|
||||||
c_backend_cpp_natural_std_string \
|
c_backend_cpp_natural_std_string \
|
||||||
c_backend_cpp_exception \
|
c_backend_cpp_exception \
|
||||||
|
default_arg_values \
|
||||||
default_args \
|
default_args \
|
||||||
default_constructor \
|
default_constructor \
|
||||||
|
derived_nested \
|
||||||
director_basic \
|
director_basic \
|
||||||
director_binary_string \
|
director_binary_string \
|
||||||
|
director_enum \
|
||||||
director_frob \
|
director_frob \
|
||||||
director_property \
|
director_property \
|
||||||
director_string \
|
director_string \
|
||||||
|
enum_thorough \
|
||||||
|
enum_var \
|
||||||
exception_order \
|
exception_order \
|
||||||
extend \
|
extend \
|
||||||
extend_constructor_destructor \
|
extend_constructor_destructor \
|
||||||
extend_default \
|
extend_default \
|
||||||
extend_placement \
|
extend_placement \
|
||||||
|
extern_c \
|
||||||
features \
|
features \
|
||||||
|
friends_template \
|
||||||
funcptr_cpp \
|
funcptr_cpp \
|
||||||
|
global_scope_types \
|
||||||
|
global_vars \
|
||||||
|
grouping \
|
||||||
|
import_nomodule \
|
||||||
|
inherit_missing \
|
||||||
|
kind \
|
||||||
langobj \
|
langobj \
|
||||||
li_attribute \
|
li_attribute \
|
||||||
li_attribute_template \
|
li_attribute_template \
|
||||||
li_boost_shared_ptr \
|
li_boost_shared_ptr \
|
||||||
|
li_boost_shared_ptr_bits \
|
||||||
li_carrays_cpp \
|
li_carrays_cpp \
|
||||||
li_cdata_cpp \
|
li_cdata_cpp \
|
||||||
li_std_combinations \
|
li_std_combinations \
|
||||||
|
|
@ -76,21 +113,54 @@ FAILING_CPP_TESTS := \
|
||||||
li_std_map \
|
li_std_map \
|
||||||
li_std_pair \
|
li_std_pair \
|
||||||
li_std_pair_using \
|
li_std_pair_using \
|
||||||
|
li_std_string \
|
||||||
li_std_vector \
|
li_std_vector \
|
||||||
|
li_swigtype_inout \
|
||||||
li_windows \
|
li_windows \
|
||||||
|
long_long_apply \
|
||||||
|
member_funcptr_galore \
|
||||||
|
member_pointer \
|
||||||
mixed_types \
|
mixed_types \
|
||||||
|
multiple_inheritance_shared_ptr \
|
||||||
|
namespace_class \
|
||||||
|
namespace_typemap \
|
||||||
|
namespace_virtual_method \
|
||||||
|
naturalvar \
|
||||||
|
naturalvar_more \
|
||||||
nested_class \
|
nested_class \
|
||||||
|
nested_scope \
|
||||||
|
nested_template_base \
|
||||||
operator_overload \
|
operator_overload \
|
||||||
overload_arrays \
|
overload_arrays \
|
||||||
|
overload_polymorphic \
|
||||||
overload_simple \
|
overload_simple \
|
||||||
primitive_ref \
|
primitive_ref \
|
||||||
|
refcount \
|
||||||
|
reference_global_vars \
|
||||||
|
register_par \
|
||||||
|
smart_pointer_extend \
|
||||||
smart_pointer_not \
|
smart_pointer_not \
|
||||||
smart_pointer_template_defaults_overload \
|
smart_pointer_template_defaults_overload \
|
||||||
special_variables \
|
special_variables \
|
||||||
|
struct_initialization_cpp \
|
||||||
|
template_arg_scope \
|
||||||
template_arg_typename \
|
template_arg_typename \
|
||||||
template_basic \
|
template_basic \
|
||||||
|
template_default \
|
||||||
|
template_default_arg \
|
||||||
|
template_default_class_parms_typedef \
|
||||||
|
template_default_vw \
|
||||||
|
template_enum \
|
||||||
template_explicit \
|
template_explicit \
|
||||||
|
template_extend_overload \
|
||||||
|
template_forward \
|
||||||
|
template_nested \
|
||||||
|
template_ns2 \
|
||||||
template_ns4 \
|
template_ns4 \
|
||||||
|
template_ns_enum \
|
||||||
|
template_ns_enum2 \
|
||||||
|
template_opaque \
|
||||||
|
template_retvalue \
|
||||||
template_tbase_template \
|
template_tbase_template \
|
||||||
template_typedef \
|
template_typedef \
|
||||||
template_typedef_class_template \
|
template_typedef_class_template \
|
||||||
|
|
@ -98,19 +168,34 @@ FAILING_CPP_TESTS := \
|
||||||
template_typedef_cplx2 \
|
template_typedef_cplx2 \
|
||||||
template_typedef_cplx3 \
|
template_typedef_cplx3 \
|
||||||
template_typedef_cplx4 \
|
template_typedef_cplx4 \
|
||||||
|
template_typedef_cplx5 \
|
||||||
|
template_typedef_fnc \
|
||||||
template_typedef_funcptr \
|
template_typedef_funcptr \
|
||||||
|
template_typemaps \
|
||||||
template_typemaps_typedef \
|
template_typemaps_typedef \
|
||||||
template_typemaps_typedef2 \
|
template_typemaps_typedef2 \
|
||||||
|
template_using_directive_and_declaration_forward \
|
||||||
|
template_whitespace \
|
||||||
typedef_array_member \
|
typedef_array_member \
|
||||||
|
typedef_funcptr \
|
||||||
typedef_struct_cpp \
|
typedef_struct_cpp \
|
||||||
|
typemap_array_qualifiers \
|
||||||
typemap_namespace \
|
typemap_namespace \
|
||||||
|
typemap_template_parm_typedef \
|
||||||
|
typemap_variables \
|
||||||
|
typemap_various \
|
||||||
using_extend \
|
using_extend \
|
||||||
|
valuewrapper_opaque \
|
||||||
varargs \
|
varargs \
|
||||||
varargs_overload \
|
varargs_overload \
|
||||||
virtual_poly \
|
virtual_poly \
|
||||||
voidtest
|
voidtest
|
||||||
|
|
||||||
FAILING_MULTI_CPP_TESTS := \
|
FAILING_MULTI_CPP_TESTS := \
|
||||||
|
clientdata_prop \
|
||||||
|
imports \
|
||||||
|
import_stl \
|
||||||
|
mod \
|
||||||
template_typedef_import \
|
template_typedef_import \
|
||||||
|
|
||||||
include $(srcdir)/../common.mk
|
include $(srcdir)/../common.mk
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue