Fix test configuration for nodejs.
This commit is contained in:
parent
335d926c44
commit
7adf93ef0f
4 changed files with 18 additions and 8 deletions
|
|
@ -80,11 +80,11 @@ _setup = \
|
|||
echo "$(ACTION)ing testcase $* under javascript ($(JSENGINE))" ; \
|
||||
fi;
|
||||
|
||||
ifeq (v8,$(ENGINE))
|
||||
ifneq (jsc,$(ENGINE))
|
||||
|
||||
# This test can not be run with v8 as it uses v8 API incompatible output typemaps
|
||||
typemap_variables.cpptest:
|
||||
echo "skipping testcase typemap_variables under javascript (v8)."
|
||||
echo "skipping testcase typemap_variables under javascript ($(JSENGINE))."
|
||||
|
||||
# with v8 we have to generate C++ wrappers only
|
||||
# these tests did raise warnings which are ignored
|
||||
|
|
@ -98,8 +98,18 @@ ifeq (node,$(JSENGINE))
|
|||
|
||||
SWIGOPT += -v8 -DBUILDING_NODE_EXTENSION=1
|
||||
|
||||
# shut up some warnings
|
||||
# contract macro has an empty 'else' at the end...
|
||||
aggregate.cpptest: GYP_CFLAGS = \"-Wno-empty-body\"
|
||||
contract_wrap.cpptest: GYP_CFLAGS = \"-Wno-empty-body\"
|
||||
|
||||
# dunno... ignoring generously
|
||||
apply_signed_char.cpptest: GYP_CFLAGS = \"Wno-ignored-qualifiers\"
|
||||
constant_pointers.cpptest: GYP_CFLAGS = \"Wno-ignored-qualifiers\"
|
||||
enum_thorough.cpptest: GYP_CFLAGS = \"-Wno-ignored-qualifiers\"
|
||||
|
||||
__setup = \
|
||||
sh ./setup_test.sh $*; \
|
||||
sh ./setup_test.sh $* $(GYP_CFLAGS); \
|
||||
$(SWIG) -c++ -javascript $(SWIGOPT) ../$*.i;
|
||||
|
||||
nodejs_swig_and_compile = \
|
||||
|
|
@ -124,9 +134,6 @@ ifeq (node,$(JSENGINE))
|
|||
|
||||
%.multicpptest:
|
||||
$(_setup)
|
||||
$(__setup)
|
||||
$(nodejs_swig_and_compile)
|
||||
$(run_testcase)
|
||||
|
||||
else
|
||||
|
||||
|
|
@ -171,3 +178,4 @@ clean:
|
|||
rm -f *_wrap.cxx
|
||||
rm -f *_wrap.c
|
||||
rm -f *.so
|
||||
rm -f *.o
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
var char_strings = require("char_strings");
|
||||
var char_strings = require("./char_strings");
|
||||
|
||||
var assertIsEqual = function(expected, actual) {
|
||||
if (expected !== actual) {
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
],
|
||||
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"',
|
||||
{
|
||||
'cflags': [ "-Wno-unused-variable", "-Wno-unused-but-set-variable", "-Wno-unused-but-set-parameter", $cflags],
|
||||
'cflags_cc': [ "-Wno-unused-variable", "-Wno-unused-but-set-variable", "-Wno-unused-but-set-parameter", $cflags],
|
||||
'cflags!': [ '-fno-exceptions' ],
|
||||
'cflags_cc!': [ '-fno-exceptions', '-fno-rtti' ]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
if [ ! -d $1 ]; then
|
||||
mkdir $1;
|
||||
fi
|
||||
sed s/\$testcase/$1/ node_template/binding.gyp.in > $1/binding.gyp
|
||||
sed -e "s/\$testcase/$1/" -e "s/\$cflags/$2/" < node_template/binding.gyp.in > $1/binding.gyp
|
||||
sed s/\$testcase/$1/ node_template/index.js.in > $1/index.js
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue