[Jifty-commit] jifty branch, master, updated. 7bf91e0f750475c580fb706ff7f6d5658460b6f0

Jifty commits jifty-commit at lists.jifty.org
Wed Dec 8 14:11:35 EST 2010


The branch, master has been updated
       via  7bf91e0f750475c580fb706ff7f6d5658460b6f0 (commit)
      from  589e90e2eced00f945a55048f7cf18d388dd641a (commit)

Summary of changes:
 lib/Jifty/Test.pm |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 7bf91e0f750475c580fb706ff7f6d5658460b6f0
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Wed Dec 8 14:08:12 2010 -0500

    Bulletproof load_test_configs a little more
    
    In the case of bogus paths or the wrong permissions, sometimes
    Cwd::abs_path() returns undef.  If that happens, there's not much more
    we can do, and we should bail.

diff --git a/lib/Jifty/Test.pm b/lib/Jifty/Test.pm
index 7125c5d..d85cc36 100644
--- a/lib/Jifty/Test.pm
+++ b/lib/Jifty/Test.pm
@@ -372,9 +372,11 @@ sub load_test_configs {
         $test_options = _read_and_merge_config_file($file, $test_options);
 
         # are we at the app root? if so, then we can stop moving up
+        # did abs_path return undef? if so, there's not much we can do from here
         $directory = abs_path(File::Spec->catdir($directory, File::Spec->updir($directory)));
         return $test_options
-            if Jifty::Util->is_app_root($directory);
+            if not defined $directory
+            or Jifty::Util->is_app_root($directory);
     }
 
     Jifty->log->fatal("Stopping looking for test config files after recursing upwards $depth times. Either you have a nonstandard layout or an incredibly deep test hierarchy. If you really do have an incredibly deep test hierarchy, you can set the environment variable JIFTY_TEST_DEPTH to a larger value.") if (Jifty->logger);

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


More information about the Jifty-commit mailing list