[omd-commits] OMD Git: omd: tests: fixed test on sles11

git version control git at mathias-kettner.de
Thu Dec 23 11:05:14 CET 2010


Module: omd
Branch: master
Commit: 15acab31ca444a204671fc6e5a42b21102880f2a
URL:    http://omdistro.org/projects/omd/repository/revisions/15acab31ca444a204671fc6e5a42b21102880f2a

Author: Sven Nierlein <sven at nierlein.de>
Date:   Thu Dec 23 11:04:57 2010 +0100

tests: fixed test on sles11

---

 t/TestUtils.pm |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/t/TestUtils.pm b/t/TestUtils.pm
index 42f1bff..d58af2c 100644
--- a/t/TestUtils.pm
+++ b/t/TestUtils.pm
@@ -14,7 +14,6 @@ use Data::Dumper;
 use LWP::UserAgent;
 use File::Temp qw/ :POSIX /;
 use Test::Cmd;
-use HTML::Lint;
 
 if($> != 0) {
     plan( skip_all => "creating testsites requires root permission" );
@@ -22,6 +21,15 @@ if($> != 0) {
 our $omd_symlink_created = 0;
 
 ##################################################
+# HTML::Lint installed?
+my $use_html_lint = 0;
+eval {
+    require HTML::Lint;
+    $use_html_lint = 1;
+};
+
+
+##################################################
 
 =head2 get_omd_bin
 
@@ -223,6 +231,10 @@ sub test_url {
     # html valitidy
     SKIP: {
         if($page->{'content_type'} =~ 'text\/html') {
+            if($use_html_lint == 0) {
+                skip "no HTML::Lint installed", 2;
+            }
+
             my $lint = new HTML::Lint;
             isa_ok( $lint, "HTML::Lint" );
 



More information about the omd-commits mailing list