oss-fuzz: Try harder to ensure we always fail fast
authorAndrew Bartlett <abartlet@samba.org>
Wed, 26 Aug 2020 00:47:04 +0000 (12:47 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 26 Aug 2020 01:57:33 +0000 (01:57 +0000)
During a previous attempt to fix the LANG= issue I changed
the script invocation to be via a shell, so the set -x et al
ensures these are always in place and we fail fast
rather than failures only being detected by lack of output.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
lib/fuzzing/oss-fuzz/build_samba.sh

index 5d3bc3ff6c33743b54a29f9c2baed71febb4d5f2..f798f8feb6a57e352ec3cad01360c8617e5d0614 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh -eux
+#!/bin/sh
 #
 # This is not a general-purpose build script, but instead one specific to the Google oss-fuzz compile environment.
 #
 # Additional arguments are passed to configure, to allow this to be
 # tested in autobuild.py
 #
+
+# Ensure we give good trace info, fail right away and fail with unset
+# variables
+set -e
+set -x
+set -u
+
 ADDITIONAL_CFLAGS="$CFLAGS"
 export ADDITIONAL_CFLAGS
 CFLAGS=""