third_party/rust/bindgen-0.29.0/ci/no-includes.sh
author Nick Fitzgerald <fitzgen@gmail.com>
Tue, 05 Sep 2017 09:26:22 -0700
changeset 430966 ef1033c0be43818cca1cba678c43f639d0ca4e6d
parent 430397 third_party/rust/bindgen/ci/no-includes.sh@a46a5879b8781ae9ea99f37b5d34a891f0f75047
permissions -rwxr-xr-x
Bug 1277338 - Part 13: Update vendored crates for newer `js` crate; r=sfink

#!/usr/bin/env bash

# Don't allow any system include directives in tests.

set -eu
cd "$(dirname "$0")/.."

echo "Checking for #include directives of system headers..."

grep -rn '#include\s*<.*>' tests/headers || {
    echo "Found none; OK!"
    exit 0
}

echo "
Found a test with an #include directive of a system header file!

There is no guarantee that the system running the tests has the header
file, let alone the same version of it that you have. Any test with such an
include directive won't reliably produce the consistent bindings across systems.
"

exit 1