1#!/usr/bin/env bash 2 3# Don't allow any system include directives in tests. 4 5set -eu 6cd "$(dirname "$0")/.." 7 8echo "Checking for #include directives of system headers..." 9 10grep -rn '#include\s*<.*>' bindgen-tests/tests/headers || { 11 echo "Found none; OK!" 12 exit 0 13} 14 15echo " 16Found a test with an #include directive of a system header file! 17 18There is no guarantee that the system running the tests has the header 19file, let alone the same version of it that you have. Any test with such an 20include directive won't reliably produce the consistent bindings across systems. 21" 22 23exit 1 24