Fixes to test script
authorDavid Butcher <dbutcher@arm.com>
Wed, 11 Apr 2012 09:11:57 +0000 (10:11 +0100)
committerDavid Butcher <dbutcher@arm.com>
Wed, 11 Apr 2012 09:11:57 +0000 (10:11 +0100)
  * Standalone operation (ignore absence of .git directory)
  * Proper final summary at end of nightly.pl

getlog.sh
nightly.pl

index cbbaf23..dbaf402 100755 (executable)
--- a/getlog.sh
+++ b/getlog.sh
@@ -69,9 +69,11 @@ fi
 perl --version | paste -s -d ';' -
 
 echo
-echo
-echo -e "\033[4mCURRENT 'git' CONFIGURATION:\033[0m"
-git config -l
+if [ -e .git ]; then
+ echo
+ echo -e "\033[4mCURRENT 'git' CONFIGURATION:\033[0m"
+ git config -l
+fi
 
 echo
 echo
@@ -88,7 +90,10 @@ echo "LD_LIBRARY_PATH = " $LD_LIBRARY_PATH
 
 
 echo
+if [ -e .git ]; then
 echo
 echo -e "\033[4mCURRENT GIT/SOURCE STATUS:\033[0m"
-git show
+  git show
+fi
+
 
index 95101df..ea8fbb2 100755 (executable)
@@ -61,7 +61,7 @@ $success_percentage = 100 * $units_succeeded / $units_count;
 system ( "./getlog.sh > ./testlog.txt" );
 my $platform = `echo \$NE10PLATFORM`;
 my $syslog = `cat ./testlog.txt`;
-my $testlog; # this will keep the sammary text that will be stored in the database
+my $testlog; # this will keep the summary text that will be stored in the database
 my $ACCEPTABLE_WARNS = 10; # note: this is defined in unit_test_common.h
 
 # try and run perf on the successfully built units
@@ -77,5 +77,18 @@ foreach my $success (@built)
     }
 }
 
- # print out a summary of this run
- print ( $testlog );
+# print out a summary of this run
+if (length @failed == 0) {
+  print "** No Build Failures";
+} else {
+  for my $fail (@failed) {
+    print "$fail failed to build";
+  }
+}
+if (length @warn == 0) {
+  print "** No Test Failures"
+  for my $warned (@warn) {
+    print "$warned failed test";
+  }
+}
+#print ( $testlog );