2019-07-10 14:30:38 +00:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
2020-04-17 09:18:50 +00:00
|
|
|
use File::Path;
|
2019-07-10 14:30:38 +00:00
|
|
|
use Test::More tests => 2;
|
|
|
|
|
2023-10-20 08:16:10 +00:00
|
|
|
my $MARIADB_DIR = $ENV{'MARIADB_DIR'};
|
|
|
|
my $MARIADB_UNIX_PORT = $ENV{'MARIADB_UNIX_PORT'};
|
|
|
|
my $MARIADB_PIDFILE = $ENV{'MARIADB_PIDFILE'};
|
2019-07-10 14:30:38 +00:00
|
|
|
|
2023-10-20 08:16:10 +00:00
|
|
|
ok(system("mariadb-admin --user=root --socket=$MARIADB_UNIX_PORT shutdown 2>&1 || [ ! -s \"$MARIADB_PIDFILE\" ] || /bin/kill `cat \"$MARIADB_PIDFILE\"`") == 0);
|
|
|
|
my $removed_count = rmtree($MARIADB_DIR, 1, 1);
|
2020-04-17 09:18:50 +00:00
|
|
|
ok($removed_count > 0);
|
2019-07-10 14:30:38 +00:00
|
|
|
|