diff --git a/t/library/nciutils.t b/t/library/nciutils.t index f456394..0cad0e9 100644 --- a/t/library/nciutils.t +++ b/t/library/nciutils.t @@ -15,15 +15,28 @@ Testing Perl 6 objects. =cut +.include 'iglobals.pasm' + .sub 'main' :main load_bytecode 'Test/More.pbc' .local pmc exports, curr_namespace, test_namespace curr_namespace = get_namespace test_namespace = get_namespace ['Test';'More'] - exports = split ' ', 'plan diag ok nok is todo' + exports = split ' ', 'plan diag ok nok is todo skip_all' test_namespace.'export_to'(curr_namespace, exports) + $P0 = getinterp + $P1 = $P0[.IGLOBALS_CONFIG_HASH] + $I1 = $P1['HAS_EXTRA_NCI_THUNKS'] + if $I1 == 1 goto have_enough_nci + $I1 = $P1['HAS_LIBFFI'] + if $I1 == 1 goto have_enough_nci + + skip_all('No NCI thunks') + exit 0 + + have_enough_nci: ## set our plan plan(13) diff --git a/t/library/pcre.t b/t/library/pcre.t index 928bd0b..28cccf7 100644 --- a/t/library/pcre.t +++ b/t/library/pcre.t @@ -7,6 +7,7 @@ use lib qw( t . lib ../lib ../../lib ); use Test::More; use Parrot::Test tests => 2; +use Parrot::Config qw(%PConfig); =head1 NAME @@ -44,6 +45,11 @@ SKIP: { skip( 'no pcre-config', Test::Builder->new()->expected_tests() ) unless $has_pcre; + unless ($PConfig{HAS_EXTRA_NCI_THUNKS} || $PConfig{HAS_LIBFFI}) { + skip( 'Parrot built without libffi or extra NCI thunks', + Test::Builder->new()->expected_tests() ); + } + ## 1 ## Check that the library can be loaded and initialized, ## diganose the failure otherwise. diff --git a/t/pmc/nci.t b/t/pmc/nci.t index 6a0a8f1..3c3932d 100644 --- a/t/pmc/nci.t +++ b/t/pmc/nci.t @@ -32,6 +32,9 @@ Most tests are skipped when the F shared library is not found. $ENV{TEST_PROG_ARGS} ||= ''; SKIP: { + unless ($PConfig{HAS_EXTRA_NCI_THUNKS} || $PConfig{HAS_LIBFFI}) { + plan skip_all => "Parrot built without libffi or extra NCI thunks"; + } unless ( -e "runtime/parrot/dynext/libnci_test$PConfig{load_ext}" ) { plan skip_all => "Please make libnci_test$PConfig{load_ext}"; }