Call SetShmBase() in init_rs

The ShmEventLoop rust test was using /dev/shm/aos and breaking out of
the sandbox. Fix that.

Change-Id: I14db8b500a03a66fef41399c4cea334ff79b217f
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/test_init.rs b/aos/test_init.rs
new file mode 100644
index 0000000..a8380e2
--- /dev/null
+++ b/aos/test_init.rs
@@ -0,0 +1,21 @@
+use aos_init::init;
+
+autocxx::include_cpp! (
+#include "aos/testing/tmpdir.h"
+
+safety!(unsafe)
+
+generate!("aos::testing::SetTestShmBase")
+);
+
+// TODO(Brian): Should we provide a proc macro attribute that handles calling this?
+/// Initializes things for a test.
+///
+/// # Panics
+///
+/// Panics if non-test initialization has already been performed.
+pub fn test_init() {
+    init();
+    ffi::aos::testing::SetTestShmBase();
+    // TODO(Brian): Do we want any of the other stuff that `:gtest_main` has?
+}