summaryrefslogtreecommitdiff
path: root/simpleperf/gtest_main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'simpleperf/gtest_main.cpp')
-rw-r--r--simpleperf/gtest_main.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/simpleperf/gtest_main.cpp b/simpleperf/gtest_main.cpp
index c9a066ed..ec4768fc 100644
--- a/simpleperf/gtest_main.cpp
+++ b/simpleperf/gtest_main.cpp
@@ -145,15 +145,3 @@ std::string GetTestData(const std::string& filename) {
const std::string& GetTestDataDir() {
return testdata_dir;
}
-
-bool IsRoot() {
- static int is_root = -1;
- if (is_root == -1) {
-#if defined(__linux__)
- is_root = (getuid() == 0) ? 1 : 0;
-#else
- is_root = 0;
-#endif
- }
- return is_root == 1;
-}