[commit: ghc] master: First stab at making ./validate less verbose (bcbb045)

git at git.haskell.org git at git.haskell.org
Wed Oct 1 20:01:31 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/bcbb045469df987389ab791633c75f2e05c151a8/ghc

>---------------------------------------------------------------

commit bcbb045469df987389ab791633c75f2e05c151a8
Author: Austin Seipp <austin at well-typed.com>
Date:   Wed Oct 1 15:01:25 2014 -0500

    First stab at making ./validate less verbose
    
    Summary:
    When we run `./validate`, we are typically given an incredibly large
    heap of information, a large majority of which isn't really
    necessary. In particular, we don't really care about what `make` is
    doing, nor `ghc` itself most of the time.
    
    This reduces some of the output by making `./validate` quietier. By
    running:
    
      $ ./validate --quiet
    
    you'll enable `V=0` in the build, suppressing compiler messages, and
    you will suppress `make` commands by running `make` in 'silent
    mode'. It also runs the testsuite with `VERBOSE=2` to avoid extra
    lines. This alone makes quite a difference for build log sizes.
    
    Furthermore, by making the build logs less verbose, life is easier for
    systems like Harbormaster and Travis-CI, which dislike dealing with
    logs that are 10k lines or more.
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>
    
    Test Plan: iiam
    
    Reviewers: hvr, nomeata, ezyang
    
    Reviewed By: ezyang
    
    Subscribers: simonmar, ezyang, carter, thomie
    
    Projects: #ghc
    
    Differential Revision: https://phabricator.haskell.org/D298


>---------------------------------------------------------------

bcbb045469df987389ab791633c75f2e05c151a8
 validate | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/validate b/validate
index 8ea9eac..c6e6d69 100755
--- a/validate
+++ b/validate
@@ -38,6 +38,7 @@ testsuite_only=0
 hpc=NO
 speed=NORMAL
 use_dph=0
+be_quiet=0
 
 while [ $# -gt 0 ]
 do
@@ -66,6 +67,9 @@ do
     --dph)
         use_dph=1
         ;;
+    --quiet)
+        be_quiet=1
+        ;;
     --help)
         show_help
         exit 0;;
@@ -128,9 +132,17 @@ fi
 
 if type gmake > /dev/null 2> /dev/null
 then
-    make="gmake"
+    if [ $be_quiet -eq 1 ]; then
+        make="gmake -s"
+    else
+        make="gmake"
+    fi
 else
-    make="make"
+    if [ $be_quiet -eq 1 ]; then
+        make="make -s"
+    else
+        make="make"
+    fi
 fi
 
 if [ $testsuite_only -eq 0 ]; then
@@ -158,6 +170,11 @@ echo "Validating=YES"       >  mk/are-validating.mk
 echo "ValidateSpeed=$speed" >> mk/are-validating.mk
 echo "ValidateHpc=$hpc"     >> mk/are-validating.mk
 
+if [ $be_quiet -eq 1 ]; then
+    echo "V=0"              >> mk/are-validating.mk # Less gunk
+    echo "GhcHcOpts="       >> mk/are-validating.mk # Remove -Rghc-timing
+fi
+
 if [ $use_dph -eq 1 ]; then
     echo "BUILD_DPH=YES"    >> mk/are-validating.mk
 else
@@ -221,7 +238,12 @@ FAST)
         ;;
 esac
 
-$make $MAKE_TEST_TARGET stage=2 $BINDIST THREADS=$threads 2>&1 | tee testlog
+verbosity=3
+if [ $be_quiet -eq 1 ]; then
+   verbosity=2
+fi
+
+$make $MAKE_TEST_TARGET stage=2 $BINDIST VERBOSE=$verbosity THREADS=$threads 2>&1 | tee testlog
 
 check_packages post-testsuite
 



More information about the ghc-commits mailing list