test: avoid failing RunTest if pcre2test -S is not supported (#37)
* test: avoid failing RunTest if pcre2test -S is not supported If `pcre2test -S` is not supported then then avoid checking for it in a test. There is already a conditional check for it to be used when it is needed and it is available, so adjust that as well. * pcre2test: update list of platform support for -S Minix 3 has a BSD userspace and now works fine, but Haiku still doesn't support stack limits, so update accordingly.
This commit is contained in:
parent
bc70a183fc
commit
acc520924c
5
RunTest
5
RunTest
|
@ -320,7 +320,8 @@ fi
|
||||||
# set up a large stack.
|
# set up a large stack.
|
||||||
|
|
||||||
$sim ./pcre2test -S 64 /dev/null /dev/null
|
$sim ./pcre2test -S 64 /dev/null /dev/null
|
||||||
if [ $? -eq 0 -a "$bigstack" != "" ] ; then
|
support_setstack=$?
|
||||||
|
if [ $support_setstack -eq 0 -a "$bigstack" != "" ] ; then
|
||||||
setstack="-S 64"
|
setstack="-S 64"
|
||||||
else
|
else
|
||||||
setstack=""
|
setstack=""
|
||||||
|
@ -479,7 +480,9 @@ for bmode in "$test8" "$test16" "$test32"; do
|
||||||
echo '' >testtry
|
echo '' >testtry
|
||||||
checkspecial '-C'
|
checkspecial '-C'
|
||||||
checkspecial '--help'
|
checkspecial '--help'
|
||||||
|
if [ $support_setstack -eq 0 ] ; then
|
||||||
checkspecial '-S 1 -t 10 testSinput'
|
checkspecial '-S 1 -t 10 testSinput'
|
||||||
|
fi
|
||||||
echo " OK"
|
echo " OK"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -8689,7 +8689,7 @@ while (argc > 1 && argv[op][0] == '-' && argv[op][1] != 0)
|
||||||
else if (strcmp(arg, "-S") == 0 && argc > 2 &&
|
else if (strcmp(arg, "-S") == 0 && argc > 2 &&
|
||||||
((uli = strtoul(argv[op+1], &endptr, 10)), *endptr == 0))
|
((uli = strtoul(argv[op+1], &endptr, 10)), *endptr == 0))
|
||||||
{
|
{
|
||||||
#if defined(_WIN32) || defined(WIN32) || defined(__minix) || defined(NATIVE_ZOS) || defined(__VMS)
|
#if defined(_WIN32) || defined(WIN32) || defined(__HAIKU__) || defined(NATIVE_ZOS) || defined(__VMS)
|
||||||
fprintf(stderr, "pcre2test: -S is not supported on this OS\n");
|
fprintf(stderr, "pcre2test: -S is not supported on this OS\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue