blob: 6c972056bbd49230cb653efee0d1c836d5b0bca7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# Copyright (c) 2025, PostgreSQL Global Development Group
use strict;
use warnings FATAL => 'all';
use PostgreSQL::Test::Utils;
use Test::More;
# Defer entirely to the oauth_tests executable. stdout/err is routed through
# Test::More so that our logging infrastructure can handle it correctly. Using
# IPC::Run::new_chunker seems to help interleave the two streams a little better
# than without.
#
# TODO: prove can also deal with native executables itself, which we could
# probably make use of via PROVE_TESTS on the Makefile side. But the Meson setup
# calls Perl directly, which would require more code to work around... and
# there's still the matter of logging.
my $builder = Test::More->builder;
my $out = $builder->output;
my $err = $builder->failure_output;
IPC::Run::run ['oauth_tests'],
'>' => (IPC::Run::new_chunker, sub { $out->print($_[0]) }),
'2>' => (IPC::Run::new_chunker, sub { $err->print($_[0]) })
or die "oauth_tests returned $?";
|