aboutsummaryrefslogtreecommitdiff
path: root/bazel
diff options
context:
space:
mode:
Diffstat (limited to 'bazel')
-rwxr-xr-xbazel/jazzer_wrapper.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/bazel/jazzer_wrapper.sh b/bazel/jazzer_wrapper.sh
index eb53f750..d12e1571 100755
--- a/bazel/jazzer_wrapper.sh
+++ b/bazel/jazzer_wrapper.sh
@@ -13,6 +13,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+# --- begin runfiles.bash initialization v2 ---
+# Copy-pasted from the Bazel Bash runfiles library v2.
+set -uo pipefail; f=bazel_tools/tools/bash/runfiles/runfiles.bash
+source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \
+source "$(grep -sm1 "^$f " "${RUNFILES_MANIFEST_FILE:-/dev/null}" | cut -f2- -d' ')" 2>/dev/null || \
+source "$0.runfiles/$f" 2>/dev/null || \
+source "$(grep -sm1 "^$f " "$0.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \
+source "$(grep -sm1 "^$f " "$0.exe.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \
+{ echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e
+# --- end runfiles.bash initialization v2 --
+
DEFAULT_CRASH_PREFIX="/tmp/jazzer"
mkdir -p $DEFAULT_CRASH_PREFIX
eval "$1" -artifact_prefix="$DEFAULT_CRASH_PREFIX/" --reproducer_path="$DEFAULT_CRASH_PREFIX" "${@:2}"