Blame SOURCES/test-clean.t

81dc9f
#!/usr/bin/perl
81dc9f
81dc9f
use strict;
81dc9f
use warnings;
81dc9f
81dc9f
use File::Path;
81dc9f
use Test::More tests => 2;
81dc9f
81dc9f
my $MYSQL_DIR       = $ENV{'MYSQL_DIR'};
81dc9f
my $MYSQL_UNIX_PORT = $ENV{'MYSQL_UNIX_PORT'};
81dc9f
my $MYSQL_PIDFILE   = $ENV{'MYSQL_PIDFILE'};
81dc9f
81dc9f
ok(system("/usr/bin/mysqladmin --user=root --socket=$MYSQL_UNIX_PORT shutdown 2>&1 || [ ! -s \"$MYSQL_PIDFILE\" ] || /bin/kill `cat \"$MYSQL_PIDFILE\"`") == 0);
81dc9f
my $removed_count = rmtree($MYSQL_DIR, 1, 1);
81dc9f
ok($removed_count > 0);
81dc9f