| 58 | } |
| 59 | |
| 60 | static FILE* RedirectStdout(string *temp_path) { |
| 61 | string temp_dir; |
| 62 | CHECK_OK(Env::Default()->GetTestDirectory(&temp_dir)); |
| 63 | *temp_path = Substitute("$0/pstack_watcher-dump.$1.txt", |
| 64 | temp_dir, getpid()); |
| 65 | FILE* reopened; |
| 66 | POINTER_RETRY_ON_EINTR(reopened, freopen(temp_path->c_str(), "w", stdout)); |
| 67 | return reopened; |
| 68 | } |
| 69 | |
| 70 | TEST(TestPstackWatcher, TestPstackWatcherRunning) { |
| 71 | string stdout_file; |
no test coverage detected