summaryrefslogtreecommitdiff
path: root/simpleperf/test_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'simpleperf/test_util.h')
-rw-r--r--simpleperf/test_util.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/simpleperf/test_util.h b/simpleperf/test_util.h
index f242c896..5d214269 100644
--- a/simpleperf/test_util.h
+++ b/simpleperf/test_util.h
@@ -40,3 +40,13 @@ bool IsRoot();
GTEST_LOG_(INFO) << "Didn't test \"" << #TestStatement << "\" requires root privileges"; \
} \
} while (0)
+
+bool IsInNativeAbi();
+// Used to skip tests not supposed to run on non-native ABIs.
+#define OMIT_TEST_ON_NON_NATIVE_ABIS() \
+ do { \
+ if (!IsInNativeAbi()) { \
+ GTEST_LOG_(INFO) << "Skip this test as it only runs on native ABIs."; \
+ return; \
+ } \
+ } while (0)