Fix test compiling/execution

Add -fpermissive in %%check to work around invalid conversions in
generated test code. The compiler flags for the installed library are
not changed.
This commit is contained in:
Benjamin A. Beasley 2023-02-15 09:35:58 -05:00
parent dcc8514162
commit 2327bc8a32

View File

@ -149,8 +149,18 @@ popd
# code with license problems in the source RPM.
%{python3} '%{SOURCE3}' --exceptions '%{SOURCE4}' --with dev node_modules_dev
%set_build_flags
# http-loose-request.c:7205:20: error: invalid conversion from 'void*' to
# 'const unsigned char*' [-fpermissive]
# 7205 | start = state->_span_pos0;
# | ~~~~~~~^~~~~~~~~~
# | |
# | void*
export CXXFLAGS="${CXXFLAGS-} -fpermissive"
export CFLAGS="${CFLAGS-} -fpermissive"
export CLANG=gcc
# See scripts.mocha in package.json:
NODE_ENV=test CLANG=gcc ./node_modules/.bin/mocha \
NODE_ENV=test ./node_modules/.bin/mocha \
-r ts-node/register/type-check \
test/*-test.ts