summaryrefslogtreecommitdiff
path: root/rust/test.go
diff options
context:
space:
mode:
author Jeff Vander Stoep <jeffv@google.com> 2021-01-26 14:35:38 +0100
committer Ivan Lozano <ivanlozano@google.com> 2021-01-26 09:09:06 -0500
commitbf7a902951122e476812d9a2153ef4b14b57ca3a (patch)
treebc5606f1cad0eec7af36af21a41c7599b18c89ef /rust/test.go
parent700730e69ee8c64f53f7e7007e54eb1f7bbe3d00 (diff)
Rust: abort on panic
Test: build (test included in build) Bug: 162266455 Change-Id: I7f53956d3a35f923d0282d511d6360051f945a88
Diffstat (limited to 'rust/test.go')
-rw-r--r--rust/test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/rust/test.go b/rust/test.go
index 408e03a6d..35e04fff6 100644
--- a/rust/test.go
+++ b/rust/test.go
@@ -120,6 +120,9 @@ func (test *testDecorator) compilerFlags(ctx ModuleContext, flags Flags) Flags {
if test.testHarness() {
flags.RustFlags = append(flags.RustFlags, "--test")
}
+ if ctx.Device() {
+ flags.RustFlags = append(flags.RustFlags, "-Z panic_abort_tests")
+ }
return flags
}