Rust: test that no heap allocs happen on hot paths (#5022)

This commit is contained in:
Robert
2018-10-31 18:08:14 -07:00
committed by GitHub
parent 160e8f2fdc
commit 4c3b6c247d
4 changed files with 155 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
#!/bin/bash
set -ex
set -e
#
# Copyright 2018 Google Inc. All rights reserved.
#
@@ -25,4 +25,13 @@ else
exit 1
fi
cargo run --bin=alloc_check
TEST_RESULT=$?
if [[ $TEST_RESULT == 0 ]]; then
echo "OK: Rust heap alloc test passed."
else
echo "KO: Rust heap alloc test failed."
exit 1
fi
cargo bench