提交 d5df08af 编写于 作者: R Richard Levitte 提交者: Matt Caswell

Convert 90-test_external.t to using "executable" rather than "system"

Use the newly added "executable" function rather than "system". Also filter
the output to add a prefix to every line so that the "ok" doesn't confuse
Test::More
Reviewed-by: NRichard Levitte <levitte@openssl.org>
Reviewed-by: NMatt Caswell <matt@openssl.org>
上级 ce2596d4
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
use OpenSSL::Test; use OpenSSL::Test;
use OpenSSL::Test::Utils; use OpenSSL::Test::Utils;
use OpenSSL::Test qw/:DEFAULT srctop_file/; use OpenSSL::Test qw/:DEFAULT srctop_file cmdstr/;
setup("test_external"); setup("test_external");
...@@ -20,9 +20,19 @@ if (!$ENV{BORING_RUNNER_DIR}) { ...@@ -20,9 +20,19 @@ if (!$ENV{BORING_RUNNER_DIR}) {
plan tests => 1; plan tests => 1;
indir $ENV{BORING_RUNNER_DIR} => sub { indir $ENV{BORING_RUNNER_DIR} => sub {
ok(!system("go", "test", "-shim-path", ok(filter_run(executable(["go", "test", "-shim-path",
srctop_file("test", "ossl_shim", "ossl_shim"), srctop_file("test", "ossl_shim", "ossl_shim"),
"-shim-config", "-shim-config",
srctop_file("test", "ossl_shim", "ossl_config.json"), "-pipe"), srctop_file("test", "ossl_shim",
"running external tests"); "ossl_config.json"),
"-pipe"])),
}, create => 0, cleanup => 0; }, create => 0, cleanup => 0;
sub filter_run {
my $cmd = cmdstr(shift);
open(PIPE, "-|", $cmd);
while(<PIPE>) {
print STDOUT "go test: ", $_;
}
close PIPE;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册