mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-22 11:54:54 +00:00
Test that vmstatu runs for --run-time with --no-stalk.
This commit is contained in:
@@ -24,7 +24,7 @@ if ( !$dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox master';
|
||||
}
|
||||
else {
|
||||
plan tests => 25;
|
||||
plan tests => 26;
|
||||
}
|
||||
|
||||
my $cnf = "/tmp/12345/my.sandbox.cnf";
|
||||
@@ -263,6 +263,17 @@ is(
|
||||
"Not stalking, collect ran for --run-time"
|
||||
);
|
||||
|
||||
my $vmstat = `which vmstat 2>/dev/null`;
|
||||
SKIP: {
|
||||
skip "vmstat is not installed", 1 unless $vmstat;
|
||||
chomp(my $n=`awk '/[ ]*[0-9]/ { n += 1 } END { print n }' "$dest/nostalk-vmstat"`);
|
||||
is(
|
||||
$n,
|
||||
"2",
|
||||
"vmstat ran for --run-time seconds (bug 955860)"
|
||||
);
|
||||
};
|
||||
|
||||
is(
|
||||
`cat $dest/nostalk-hostname`,
|
||||
`hostname`,
|
||||
|
Reference in New Issue
Block a user