1RUN: %cpp_compiler %S/TimeoutTest.cpp -o %t-TimeoutTest
2RUN: %cpp_compiler %S/TimeoutEmptyTest.cpp -o %t-TimeoutEmptyTest
3RUN: not %run %t-TimeoutTest -timeout=1 2>&1 | FileCheck %s --check-prefix=TimeoutTest
4TimeoutTest: ALARM: working on the last Unit for
5TimeoutTest: Test unit written to ./timeout-
6TimeoutTest: == ERROR: libFuzzer: timeout after
7TimeoutTest: #0
8TimeoutTest: #1
9TimeoutTest: #2
10TimeoutTest: SUMMARY: libFuzzer: timeout
11
12RUN: not %run %t-TimeoutTest -timeout=1 %S/hi.txt 2>&1 | FileCheck %s --check-prefix=SingleInputTimeoutTest
13SingleInputTimeoutTest: ALARM: working on the last Unit for {{[1-3]}} seconds
14SingleInputTimeoutTest-NOT: Test unit written to ./timeout-
15
16RUN: %run %t-TimeoutTest -timeout=1 -timeout_exitcode=0
17
18RUN: not %run %t-TimeoutEmptyTest -timeout=1 2>&1 | FileCheck %s --check-prefix=TimeoutEmptyTest
19TimeoutEmptyTest: ALARM: working on the last Unit for
20TimeoutEmptyTest: == ERROR: libFuzzer: timeout after
21TimeoutEmptyTest: SUMMARY: libFuzzer: timeout
22