Make sure that the same tests are on all platforms.
In order to be able to generate a list of tests for cts, the same set of
tests must exist across all platforms. This CL adds empty tests where a
test was conditionally compiled out.
This CL creates a single library libBionicTests that includes all of
the tests found in bionic-unit-tests-static.
Also fix a few missing include files in some test files.
Tested by running and compiling the tests for every platform and
verifying the same number of tests are on each platform.
Change-Id: I9989d4bfebb0f9c409a0ce7e87169299eac605a2
diff --git a/tests/stack_unwinding_test.cpp b/tests/stack_unwinding_test.cpp
index 3b18daa..1024f28 100644
--- a/tests/stack_unwinding_test.cpp
+++ b/tests/stack_unwinding_test.cpp
@@ -20,8 +20,6 @@
#include <gtest/gtest.h>
-#if defined(i386) // Only our x86 unwinding is good enough. Switch to libunwind?
-
extern "C" {
void do_test();
}
@@ -29,8 +27,11 @@
// We have to say "DeathTest" here so gtest knows to run this test (which exits)
// in its own process.
TEST(stack_unwinding_DeathTest, unwinding_through_signal_frame) {
+// Only our x86 unwinding is good enough. Switch to libunwind?
+#if defined(__BIONIC__) && defined(__i386__)
::testing::FLAGS_gtest_death_test_style = "threadsafe";
ASSERT_EXIT(do_test(), ::testing::ExitedWithCode(42), "");
+#else // __i386__
+ GTEST_LOG_(INFO) << "This test does nothing.\n";
+#endif // __i386__
}
-
-#endif