Run tests with yath

This will let us run tests in parallel, and creates a more Perl-standard
test development experience.
This commit is contained in:
Graham Christensen 2021-02-19 17:04:19 -05:00
parent a39b479280
commit 2240035e20
No known key found for this signature in database
GPG key ID: FE918C3A98C1030F
5 changed files with 27 additions and 1 deletions

View file

@ -126,6 +126,7 @@
EmailMIME
EmailSender
FileSlurp
FileWhich
IOCompress
IPCRun
JSON
@ -145,6 +146,7 @@
TermSizeAny
TestMore
TextDiff
Test2Harness
TextTable
XMLSimple
YAML

View file

@ -26,7 +26,7 @@ EXTRA_DIST = \
TESTS = \
set-up.pl \
evaluation-tests.pl \
test.pl \
tear-down.pl
check_SCRIPTS = repos

24
tests/test.pl Normal file
View file

@ -0,0 +1,24 @@
#!/usr/bin/env perl
# HARNESS-NO-PRELOAD
# HARNESS-CAT-LONG
# THIS IS A GENERATED YATH RUNNER TEST
use strict;
use warnings;
use lib 'lib';
BEGIN {
use File::Which qw(which);
$App::Yath::Script::SCRIPT = which 'yath';
}
use App::Yath::Util qw/find_yath/;
system($^X, find_yath(), '-D', 'test', '--default-search' => './', @ARGV);
my $exit = $?;
# This makes sure it works with prove.
print "1..1\n";
print "not " if $exit;
print "ok 1 - Passed tests when run by yath\n";
print STDERR "yath exited with $exit" if $exit;
exit($exit ? 255 : 0);