[Git][NTPsec/ntpsec][master] Add warning if option-tester.sh can't find seccomp.h

Hal Murray gitlab at mg.gitlab.com
Sat Nov 25 19:30:41 UTC 2017


Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
a5b7570f by Hal Murray at 2017-11-25T11:26:59-08:00
Add warning if option-tester.sh can't find seccomp.h

- - - - -


1 changed file:

- tests/option-tester.sh


Changes:

=====================================
tests/option-tester.sh
=====================================
--- a/tests/option-tester.sh
+++ b/tests/option-tester.sh
@@ -3,16 +3,22 @@
 #   sh: ${PIPESTATUS[...}: Bad substitution
 
 # This is a hack to build with various configuration options.
-# The intent is to check cases that normal testing doesn't use.
+# The intent is to check building combinations that normal testing doesn't use.
 
 # Stuff goes into various test-* directories.
 # Running again starts by deleting everything in the directory.
 
+LINUX=""
+if [ `uname -s` = "Linux" -a -f /usr/include/seccomp.h ]
+then
+  # Not supported on CentOS 6
+  LINUX="--enable-seccomp"
+fi
 
 doit ()
 {
   DIR=test-$1
-  mkdir $DIR
+  [ ! -d $DIR ] && mkdir $DIR
   rm -rf $DIR/*
   ./waf configure --out=$DIR $2          2>&1 | tee    $DIR/test.log
   WAF1=${PIPESTATUS[0]}
@@ -54,13 +60,6 @@ doit minimal "--disable-droproot --disable-dns-lookup --disable-kernel-pll --dis
 # This also tests refclocks without DEBUG
 doit classic "--enable-classic-mode --refclock=all"
 
-if [ `uname -s` = "Linux" ]
-then
-  # Not supported on CentOS 6
-  LINUX="--enable-seccomp"
-else
-  LINUX=""
-fi
 doit all     "--enable-debug --enable-debug-gdb --enable-debug-timing --refclock=all --enable-lockclock --enable-leap-smear --enable-mssntp --enable-early-droproot $LINUX"
 
 if [ "`which asciidoc 2>/dev/null`" != "" -a \
@@ -72,6 +71,12 @@ fi
 # should try cross compile
 
 echo
+if [ `uname -s` = "Linux" -a ! -f /usr/include/seccomp.h ]
+then
+    echo
+    echo "### Warning: Missing seccomp.h (on a Linux system)"
+    echo
+fi
 echo "PYTHONPATH is" \"$PYTHONPATH\"
 grep VERSION: test*/test.log
 echo



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/a5b7570f4b6f831ebd4f4538832aba7e5f2548f6

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/a5b7570f4b6f831ebd4f4538832aba7e5f2548f6
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20171125/0355e001/attachment.html>


More information about the vc mailing list