mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-24 12:21:46 +00:00
Rust: test that no heap allocs happen on hot paths (#5022)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user