Skip to content

Commit 0e769b7

Browse files
author
Johnny Wang
authored
tests: 082-body-filter-2.t: skip this test if mockeagain is not loaded correctly. (#2275)
1 parent 766b7a8 commit 0e769b7

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

t/082-body-filter-2.t

+8-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@ BEGIN {
1313
$SkipReason = "http2 does not support mockeagain";
1414

1515
} else {
16-
$ENV{TEST_NGINX_POSTPONE_OUTPUT} = 1;
17-
$ENV{TEST_NGINX_EVENT_TYPE} = 'poll';
18-
$ENV{MOCKEAGAIN}='w'
16+
if ($ENV{LD_PRELOAD} && $ENV{LD_PRELOAD} =~ /\bmockeagain\.so\b/) {
17+
$ENV{TEST_NGINX_POSTPONE_OUTPUT} = 1;
18+
$ENV{TEST_NGINX_EVENT_TYPE} = 'poll';
19+
$ENV{MOCKEAGAIN}='w'
20+
} else {
21+
$SkipReason = "'mockeagain.so' does not appear to be preloaded "
22+
. "with 'LD_PRELOAD'";
23+
}
1924
}
2025
}
2126

0 commit comments

Comments
 (0)