You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
perl-DBD-MariaDB/SOURCES/test-clean.t

17 lines
454 B

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