mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-25 21:54:48 +00:00
pt-summary shouldn't leave empty files; both summary tools should
die if passed a --save-samples directory that has files in it.
This commit is contained in:
@@ -13,7 +13,17 @@ use English qw(-no_match_vars);
|
||||
use PerconaTest;
|
||||
|
||||
my ($tool) = $PROGRAM_NAME =~ m/([\w-]+)\.t$/;
|
||||
push @ARGV, "$trunk/t/$tool/*.sh" unless @ARGV;
|
||||
system("$trunk/util/test-bash-functions $trunk/bin/$tool @ARGV");
|
||||
|
||||
use Test::More tests => 2;
|
||||
|
||||
for my $i (2..3) {
|
||||
|
||||
ok(
|
||||
no_diff(
|
||||
sub { print `$trunk/bin/pt-summary --read-samples "$trunk/t/pt-summary/samples/Linux/00$i/" | tail -n+3` },
|
||||
"t/pt-summary/samples/Linux/output_00$i.txt"),
|
||||
"--read-samples samples/Linux/00$i works"
|
||||
);
|
||||
}
|
||||
|
||||
exit;
|
||||
|
Reference in New Issue
Block a user