| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <fcntl.h> | 5 #include <fcntl.h> |
| 6 #include <poll.h> | 6 #include <poll.h> |
| 7 #include <signal.h> | 7 #include <signal.h> |
| 8 #include <stdio.h> | 8 #include <stdio.h> |
| 9 #include <sys/resource.h> | 9 #include <sys/resource.h> |
| 10 #include <sys/time.h> | 10 #include <sys/time.h> |
| 11 #include <time.h> | 11 #include <time.h> |
| 12 #include <unistd.h> | 12 #include <unistd.h> |
| 13 | 13 |
| 14 #include "base/file_util.h" | 14 #include "base/file_util.h" |
| 15 #include "base/posix/eintr_wrapper.h" |
| 15 #include "base/third_party/valgrind/valgrind.h" | 16 #include "base/third_party/valgrind/valgrind.h" |
| 16 #include "build/build_config.h" | 17 #include "build/build_config.h" |
| 17 #include "sandbox/linux/tests/unit_tests.h" | 18 #include "sandbox/linux/tests/unit_tests.h" |
| 18 | 19 |
| 19 namespace { | 20 namespace { |
| 20 std::string TestFailedMessage(const std::string& msg) { | 21 std::string TestFailedMessage(const std::string& msg) { |
| 21 return msg.empty() ? std::string() : "Actual test failure: " + msg; | 22 return msg.empty() ? std::string() : "Actual test failure: " + msg; |
| 22 } | 23 } |
| 23 | 24 |
| 24 int GetSubProcessTimeoutTimeInSeconds() { | 25 int GetSubProcessTimeoutTimeInSeconds() { |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 fflush(stderr); | 292 fflush(stderr); |
| 292 _exit(kExitWithAssertionFailure); | 293 _exit(kExitWithAssertionFailure); |
| 293 } | 294 } |
| 294 | 295 |
| 295 void UnitTests::IgnoreThisTest() { | 296 void UnitTests::IgnoreThisTest() { |
| 296 fflush(stderr); | 297 fflush(stderr); |
| 297 _exit(kIgnoreThisTest); | 298 _exit(kIgnoreThisTest); |
| 298 } | 299 } |
| 299 | 300 |
| 300 } // namespace | 301 } // namespace |
| OLD | NEW |