[Git][NTPsec/ntpsec][master] Add script to test various configuration options

Hal Murray gitlab at mg.gitlab.com
Thu Feb 2 10:27:53 UTC 2017


Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
b5ce5ad4 by Hal Murray at 2017-02-02T02:27:09-08:00
Add script to test various configuration options

- - - - -


1 changed file:

- + tests/option-tester.sh


Changes:

=====================================
tests/option-tester.sh
=====================================
--- /dev/null
+++ b/tests/option-tester.sh
@@ -0,0 +1,59 @@
+#!/usr/bin/env bash
+
+# This is a hack to build with various configuration options.
+# The intent is to check cases that normal testing doesn't use.
+
+# Stuff goes into various test-* directories.
+# Running again starts by deleting everything in the directory.
+
+
+doit ()
+{
+  DIR=test-$1
+  mkdir $DIR
+  rm -rf $DIR/*
+  ./waf configure --out=$DIR $2          2>&1 | tee    $DIR/test.log
+  WAF1=${PIPESTATUS[0]}
+  WAF2=0
+  WAF3=0
+  if [ "$WAF1" = 0 ]
+  then
+  echo                                   2>&1 | tee -a $DIR/test.log
+  ./waf build                            2>&1 | tee -a $DIR/test.log
+  WAF2=${PIPESTATUS[0]}
+  if [ "$WAF2" = 0 ]
+  then
+  echo                                   2>&1 | tee -a $DIR/test.log
+  ./waf check                            2>&1 | tee -a $DIR/test.log
+  WAF3=${PIPESTATUS[0]}
+  fi
+  fi
+  if [ "$WAF1" != 0 -o "$WAF2" != 0 -o "$WAF3" != 0 ] 
+  then
+    echo                                      | tee -a $DIR/test.log
+    echo "Trouble with $DIR"                  | tee -a $DIR/test.log
+  fi
+  echo
+  echo
+}
+
+doit minimal "--disable-debug --disable-droproot --disable-dns-lookup --disable-kernel-pll --disable-mdns-registration"
+doit nodebug "--disable-debug --refclock=all"
+doit all     "--enable-lockclock --enable-leap-smear --enable-mssntp --refclock=all"
+
+if [ `uname -s` = Linux ]
+then
+doit linux   "--enable-classic-mode --enable-early-droproot --enable-seccomp"
+fi
+
+if [ `which asciidoc` != "" -a `which xsltproc` != "" ]
+then
+doit doc     "--enable-doc"
+doit doconly "--enable-doc-only"
+fi
+
+echo
+grep warning: test*/test.log
+grep error:   test*/test.log
+grep ^Trouble test*/test.log
+echo



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/b5ce5ad4379c27ca46576de1a2b58bb3a85dbd6f
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170202/aa61fd02/attachment.html>


More information about the vc mailing list