Blame SOURCES/test-clean.t

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