Просмотр исходного кода

New test variables default to "none", so no changes required to tinderbox satelites

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1530 f882894a-f735-0410-b71e-b25c423dba1c
Ton Voon 19 лет назад
Родитель
Сommit
299c6bab02
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      NPTest.pm

+ 4 - 3
NPTest.pm

@@ -54,8 +54,8 @@ user. The user can accept the developer's default value or reply "none"
 which will then be returned as "" for the test to skip if appropriate.
 
 If a parameter needs to be entered and the test is run without a tty 
-attached (such as a cronjob), this routine will die causing the test to 
-fail.
+attached (such as a cronjob), the parameter will be assigned as if it 
+was "none". Tests can check for the parameter and skip if not set.
 
 Responses are stored in an external, file-based
 cache so subsequent test runs will use these values. The user is able
@@ -346,7 +346,8 @@ sub getTestParameter
     return $default;
   }
 
-  die "Need to manually enter test parameter $param" unless (-t STDERR);
+  # Set "none" if no terminal attached (eg, tinderbox build servers when new variables set)
+  return "" unless (-t STDERR);
 
   my $userResponse = "";