[Rt-commit] rt branch, 4.2/skip-mysql-specific-files-compile-check, created. rt-4.2.10-220-gc32920d

? sunnavy sunnavy at bestpractical.com
Sat Mar 21 10:35:59 EDT 2015


The branch, 4.2/skip-mysql-specific-files-compile-check has been created
        at  c32920d9802881fb3edec9d3608ab96633a81d7c (commit)

- Log -----------------------------------------------------------------
commit c32920d9802881fb3edec9d3608ab96633a81d7c
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Mar 21 22:27:59 2015 +0800

    skip compile check of mysql specific files if DBD::mysql is unavailable
    
    it's unnecessary and tests could fail because of the lack of DBD::mysql.
    (e.g. etc/upgrade/upgrade-mysql-schema.pl)

diff --git a/t/99-policy.t b/t/99-policy.t
index f0cf5d0..721b1be 100644
--- a/t/99-policy.t
+++ b/t/99-policy.t
@@ -94,6 +94,10 @@ sub check {
 
     if ($check{compile_perl}) {
         my ($input, $output, $error) = ('', '', '');
+        if ( $file =~ /\bmysql\b/ ) {
+            eval { require DBD::mysql };
+            return if $@;
+        }
         run3(
             [$^X, '-Ilib', '-Mstrict', '-Mwarnings', '-c', $file],
             \$input, \$output, \$error,

-----------------------------------------------------------------------


More information about the rt-commit mailing list