added a "test mode" for aos::Die and used it
ipc_stress_test was getting slowed down by disk I/O because of the
aos_fatal_error files getting written to /tmp and the stdout messages
that gtest doesn't capture were annoying, so I added a setting for
aos::Die to not do those things and used it in the ipc_stress_test
tests.
diff --git a/aos/common/mutex_test.cpp b/aos/common/mutex_test.cpp
index 652cd9e..10f4e0b 100644
--- a/aos/common/mutex_test.cpp
+++ b/aos/common/mutex_test.cpp
@@ -10,6 +10,7 @@
#include "gtest/gtest.h"
#include "aos/atom_code/ipc_lib/aos_sync.h"
+#include "aos/common/die.h"
namespace aos {
namespace testing {
@@ -17,6 +18,11 @@
class MutexTest : public ::testing::Test {
public:
Mutex test_mutex;
+
+ protected:
+ void SetUp() override {
+ SetDieTestMode(true);
+ }
};
typedef MutexTest MutexDeathTest;