Add opensslbuild
authorRich Salz <rsalz@akamai.com>
Thu, 15 Jun 2017 13:17:53 +0000 (09:17 -0400)
committerRich Salz <rsalz@akamai.com>
Thu, 15 Jun 2017 13:24:12 +0000 (09:24 -0400)
A replacement for remake which was called from ghmerge.
This does the same thing, but is written in bash, not "rc" :)

review-tools/ghmerge
review-tools/opensslbuild [new file with mode: 0755]

index 5f9308c443980c4bd4acc6ff0368421470c88223..16426b39d1c88e735276d5777243a90220bd1fe0 100755 (executable)
@@ -59,7 +59,7 @@ else
     git rebase $WORK
 fi
 # echo Rebuilding
-# remake |& tail -3
+# opensslbuild |& tail -3
 
 echo -n Press return to push: ; read foo
 git push origin $REL
diff --git a/review-tools/opensslbuild b/review-tools/opensslbuild
new file mode 100755 (executable)
index 0000000..404a04e
--- /dev/null
@@ -0,0 +1,56 @@
+#! /bin/bash
+# Script to build openssl and run regression tests.
+# Usage:
+#       opensslbuild [-c] [-x] [config_args...]
+
+test -f ./config || {
+    echo Not at top-level
+    exit 1
+}
+
+# Parse arguments.
+configonly=no
+execonly=no
+test "$1" = "-c" && {
+    configonly=yes
+    shift
+}
+test "$1" = "-x" && {
+    execonly=yes
+    shift
+}
+
+# Set compiler
+test "$CC" = "" && CC="ccache clang-3.6"
+
+# Set basic config arguments
+CONFIGARGS="-d --strict-warnings --prefix=/usr/local/openssl"
+case "$CC" in
+*clang*)
+    CONFIGARGS="$CONFIGARGS -Qunused-arguments"
+    ;;
+esac
+
+# Set the features we want to enable
+ENABLES="enable-rc5 enable-md2 enable-ec_nistp_64_gcc_128 enable-tls1_3"
+ENABLES="$ENABLES enable-crypto-mdebug enable-crypto-mdebug-backtrace"
+
+make -s clean >/dev/null 2>&1
+./config $CONFIGARGS $ENABLES $* 2>&1
+
+echo Making update
+make -s update 2>&1
+make -s tags
+rm -f doc-nits
+grep -q doc-nits Makefile && make doc-nits
+s=$?
+test $configonly = yes && exit $s
+
+echo Making
+make -s -j20
+make -s -j20 build_tests >/dev/null
+s=$?
+test $execonly = yes && exit $s
+
+echo Making test
+make test