diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-08-05 23:19:38 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-08-05 23:19:38 +0200 |
commit | 711f57c519d32311e216b0f043ea32d2793ed68a (patch) | |
tree | 11ec0712ca5fd7ed0437733683e3adb3c57fe4ec | |
parent | 21159e04c4ca1b4d2d122daffb240421910fba9e (diff) | |
download | sbotools2-711f57c519d32311e216b0f043ea32d2793ed68a.tar.xz |
26-race-sbocheck.t: use load() from Test::Sbotools
-rwxr-xr-x | t/26-race-sbocheck.t | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/t/26-race-sbocheck.t b/t/26-race-sbocheck.t index 8190b54..0cb0160 100755 --- a/t/26-race-sbocheck.t +++ b/t/26-race-sbocheck.t @@ -6,29 +6,14 @@ use Test::More; use Test::Exit; use FindBin '$RealBin'; use lib "$RealBin/../SBO-Lib/lib"; +use lib $RealBin; +use Test::Sbotools 'load'; use Capture::Tiny qw/ capture_merged /; use File::Temp 'tempdir'; use Cwd; plan tests => 2; -sub load { - my ($script, %opts) = @_; - - local @ARGV = exists $opts{argv} ? @{ $opts{argv} } : '-h'; - my ($ret, $exit, $out, $do_err); - my $eval = eval { - $out = capture_merged { $exit = exit_code { - $ret = do "$RealBin/../$script"; - $do_err = $@; - }; }; - 1; - }; - my $err = $@; - - note explain { ret => $ret, exit => $exit, out => $out, eval => $eval, err => $err, do_err => $do_err } if $opts{explain}; -} - # 1-2: sbocheck race test... { load('sbocheck'); |