1@echo off 2 3cd "%~dp0.." 4 5set RUST_BACKTRACE=1 6 7if not defined BINDGEN_FEATURES ( 8 echo Environment variable BINDGEN_FEATURES must be defined. 9 exit /B 1 10) 11 12findstr /r /c:"#include *<.*>" tests\headers\* >nul 2>&1 && ( 13 echo Found a test with an #include directive of a system header file! 14 echo. 15 echo There is no guarantee that the system running the tests has the header 16 echo file, let alone the same version of it that you have. Any test with such an 17 echo include directive won't reliably produce the consistent bindings across systems. 18 exit /B 1 19) || ( 20 echo Found none. OK! 21 set ERRORLEVEL=0 22) 23 24@echo on 25 26::Regenerate the test headers' bindings in debug and release modes, and assert 27::that we always get the expected generated bindings. 28 29cargo test --features "%BINDGEN_FEATURES%" || exit /b 1 30call .\ci\assert-no-diff.bat 31 32cargo test --features "%BINDGEN_FEATURES% testing_only_extra_assertions" || exit /b 1 33call .\ci\assert-no-diff.bat 34 35cargo test --release --features "%BINDGEN_FEATURES% testing_only_extra_assertions" || exit /b 1 36call .\ci\assert-no-diff.bat 37 38::Now test the expectations' size and alignment tests. 39 40pushd tests\expectations 41cargo test || exit /b 1 42cargo test --release || exit /b 1 43popd 44 45::And finally, test our example bindgen + build.rs integration template project. 46 47cd bindgen-integration 48cargo test --features "%BINDGEN_FEATURES%" || exit /b 1 49cargo test --release --features "%BINDGEN_FEATURES%" || exit /b 1 50