diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2019-07-30 07:27:32 +0100 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2019-07-31 00:08:49 +0100 |
commit | 0d76eb3b56b0e13b24e778b6e10b4bef8f36888d (patch) | |
tree | 22dc4225e4e282916574a8141ebd86c8e4251c39 /Examples | |
parent | 2cf075558ce27ee0d88b71441c8cd83aabbf8028 (diff) | |
download | swig-0d76eb3b56b0e13b24e778b6e10b4bef8f36888d.tar.gz |
The errors testcases use -module to obtain a unique module name
Fixes parallel make where each invocation of swig was writing and
deleting the same file resulting in lots of the newly introduced
warning messages:
On exit, could not delete file xxx.py: No such file or directory
Diffstat (limited to 'Examples')
13 files changed, 19 insertions, 14 deletions
diff --git a/Examples/test-suite/errors/Makefile.in b/Examples/test-suite/errors/Makefile.in index 10e5bdd8f..7137a6862 100644 --- a/Examples/test-suite/errors/Makefile.in +++ b/Examples/test-suite/errors/Makefile.in @@ -45,6 +45,11 @@ include $(srcdir)/../common.mk # whatever we do here. $(DOXYGEN_ERROR_TEST_CASES): SWIGOPT += -doxygen +# Unique module names are obtained from the .i file name (required for parallel make). +# Note: -module overrides %module in the .i file. +MODULE_OPTION=-module $* +nomodule.ctest: MODULE_OPTION = + # Portable dos2unix / todos for stripping CR TODOS = tr -d '\r' #TODOS = sed -e 's/\r$$//' # On Mac OS X behaves as if written 's/r$$//' @@ -55,12 +60,12 @@ STRIP_SRCDIR = sed -e 's|\\|/|g' -e 's|^$(SRCDIR)||' # Rules for the different types of tests %.cpptest: echo "$(ACTION)ing errors testcase $*" - -$(SWIGINVOKE) -c++ -python -Wall -Fstandard $(SWIGOPT) $(SRCDIR)$*.i 2>&1 | $(TODOS) | $(STRIP_SRCDIR) > $*.$(ERROR_EXT) + -$(SWIGINVOKE) -c++ -python -Wall -Fstandard $(MODULE_OPTION) $(SWIGOPT) $(SRCDIR)$*.i 2>&1 | $(TODOS) | $(STRIP_SRCDIR) > $*.$(ERROR_EXT) $(COMPILETOOL) diff -c $(SRCDIR)$*.stderr $*.$(ERROR_EXT) %.ctest: echo "$(ACTION)ing errors testcase $*" - -$(SWIGINVOKE) -python -Wall -Fstandard $(SWIGOPT) $(SRCDIR)$*.i 2>&1 | $(TODOS) | $(STRIP_SRCDIR) > $*.$(ERROR_EXT) + -$(SWIGINVOKE) -python -Wall -Fstandard $(MODULE_OPTION) $(SWIGOPT) $(SRCDIR)$*.i 2>&1 | $(TODOS) | $(STRIP_SRCDIR) > $*.$(ERROR_EXT) $(COMPILETOOL) diff -c $(SRCDIR)$*.stderr $*.$(ERROR_EXT) %.clean: diff --git a/Examples/test-suite/errors/cpp_extra_brackets.i b/Examples/test-suite/errors/cpp_extra_brackets.i index 32cf7f72d..81fdb29c4 100644 --- a/Examples/test-suite/errors/cpp_extra_brackets.i +++ b/Examples/test-suite/errors/cpp_extra_brackets.i @@ -1,4 +1,4 @@ -%module cpp_extra_brackets +%module xxx // Extra brackets was segfaulting in SWIG-3.0.0 struct ABC { diff --git a/Examples/test-suite/errors/cpp_extra_brackets2.i b/Examples/test-suite/errors/cpp_extra_brackets2.i index 17a5d5918..194dea435 100644 --- a/Examples/test-suite/errors/cpp_extra_brackets2.i +++ b/Examples/test-suite/errors/cpp_extra_brackets2.i @@ -1,4 +1,4 @@ -%module cpp_extra_brackets +%module xxx // Extra brackets was segfaulting in SWIG-3.0.0 struct ABC { diff --git a/Examples/test-suite/errors/cpp_invalid_qualifiers.i b/Examples/test-suite/errors/cpp_invalid_qualifiers.i index fd3b36332..d0723dff6 100644 --- a/Examples/test-suite/errors/cpp_invalid_qualifiers.i +++ b/Examples/test-suite/errors/cpp_invalid_qualifiers.i @@ -1,4 +1,4 @@ -%module cpp_invalid_qualifiers +%module xxx // Constructors, destructors and static methods cannot have qualifiers struct A { diff --git a/Examples/test-suite/errors/cpp_invalid_template.i b/Examples/test-suite/errors/cpp_invalid_template.i index ea0d7beac..45ad73908 100644 --- a/Examples/test-suite/errors/cpp_invalid_template.i +++ b/Examples/test-suite/errors/cpp_invalid_template.i @@ -1,4 +1,4 @@ -%module cpp_invalid_scope +%module xxx %template(abc) SSS::AAA<int>; diff --git a/Examples/test-suite/errors/cpp_namespace_template_bad.i b/Examples/test-suite/errors/cpp_namespace_template_bad.i index 5c42d6dcb..f41918f8e 100644 --- a/Examples/test-suite/errors/cpp_namespace_template_bad.i +++ b/Examples/test-suite/errors/cpp_namespace_template_bad.i @@ -1,4 +1,4 @@ -%module namespace_template +%module xxx namespace test { template<typename T> T max(T a, T b) { return (a > b) ? a : b; } diff --git a/Examples/test-suite/errors/cpp_nested_namespace_alias.i b/Examples/test-suite/errors/cpp_nested_namespace_alias.i index b7cbceb71..058d34441 100644 --- a/Examples/test-suite/errors/cpp_nested_namespace_alias.i +++ b/Examples/test-suite/errors/cpp_nested_namespace_alias.i @@ -1,4 +1,4 @@ -%module cpp_nested_namespace_alias +%module xxx // C++17 nested namespaces diff --git a/Examples/test-suite/errors/cpp_recursive_typedef.i b/Examples/test-suite/errors/cpp_recursive_typedef.i index 3d65a8817..82d9f7a4a 100644 --- a/Examples/test-suite/errors/cpp_recursive_typedef.i +++ b/Examples/test-suite/errors/cpp_recursive_typedef.i @@ -1,4 +1,4 @@ -%module cpp_recursive_typedef +%module xxx typedef std::set<pds> pds; diff --git a/Examples/test-suite/errors/cpp_refqualifier.i b/Examples/test-suite/errors/cpp_refqualifier.i index afd6632fc..3980a812c 100644 --- a/Examples/test-suite/errors/cpp_refqualifier.i +++ b/Examples/test-suite/errors/cpp_refqualifier.i @@ -1,4 +1,4 @@ -%module cpp_refqualifier +%module xxx %ignore Host::h_ignored; %ignore Host::i_ignored() &&; diff --git a/Examples/test-suite/errors/cpp_shared_ptr.i b/Examples/test-suite/errors/cpp_shared_ptr.i index edbd0cf87..bdcd30f71 100644 --- a/Examples/test-suite/errors/cpp_shared_ptr.i +++ b/Examples/test-suite/errors/cpp_shared_ptr.i @@ -1,4 +1,4 @@ -%module cpp_shared_ptr +%module xxx %include <boost_shared_ptr.i> diff --git a/Examples/test-suite/errors/cpp_template_duplicate_names.i b/Examples/test-suite/errors/cpp_template_duplicate_names.i index 67f21d7bb..96076967b 100644 --- a/Examples/test-suite/errors/cpp_template_duplicate_names.i +++ b/Examples/test-suite/errors/cpp_template_duplicate_names.i @@ -1,4 +1,4 @@ -%module cpp_template_duplicate_names +%module xxx // From test-suite/template_class_reuse.i test diff --git a/Examples/test-suite/errors/cpp_template_friend.i b/Examples/test-suite/errors/cpp_template_friend.i index c9d1c9d5d..3b8d85eff 100644 --- a/Examples/test-suite/errors/cpp_template_friend.i +++ b/Examples/test-suite/errors/cpp_template_friend.i @@ -1,4 +1,4 @@ -%module cpp_template_friend +%module xxx template<typename T> T template_friend1(T); template<typename T> T template_friend1(T); diff --git a/Examples/test-suite/errors/pp_missing_file.i b/Examples/test-suite/errors/pp_missing_file.i index 5e3f0ea27..366f159cc 100644 --- a/Examples/test-suite/errors/pp_missing_file.i +++ b/Examples/test-suite/errors/pp_missing_file.i @@ -1,3 +1,3 @@ -%module test +%module xxx %include "missing_filename.i" |