From 6414835acf5213dece14519aec6d8b9bcd2d8e27 Mon Sep 17 00:00:00 2001 From: Kenichi Ishigaki Date: Thu, 25 Apr 2024 20:01:11 +0900 Subject: [PATCH] Use File::Which to see if mysql is installed --- t/pause_2017/lib/Test/PAUSE/MySQL.pm | 3 ++- t/run_test_class_tests.t | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/t/pause_2017/lib/Test/PAUSE/MySQL.pm b/t/pause_2017/lib/Test/PAUSE/MySQL.pm index b94786565..6eab707ec 100644 --- a/t/pause_2017/lib/Test/PAUSE/MySQL.pm +++ b/t/pause_2017/lib/Test/PAUSE/MySQL.pm @@ -2,9 +2,10 @@ package Test::PAUSE::MySQL; use Test::Builder (); use Test::Requires qw(Test::mysqld); +use Test::Requires qw(File::Which); BEGIN { - unless (-e '/usr/local/mysql/bin/mysql') { + unless (File::Which::which 'mysql') { Test::Builder->new->skip_all("no mysql found, needed for this test") } } diff --git a/t/run_test_class_tests.t b/t/run_test_class_tests.t index 156e1caee..3bc4fca53 100644 --- a/t/run_test_class_tests.t +++ b/t/run_test_class_tests.t @@ -4,9 +4,10 @@ use strict; use warnings; use Test::Requires qw(Test::mysqld); +use Test::Requires qw(File::Which); BEGIN { - unless (-e '/usr/local/mysql/bin/mysql') { + unless (File::Which::which 'mysql') { Test::Builder->new->skip_all("no mysql found, needed for this test") } }