1 # REQUIRES: lit-max-individual-test-time
3 # Check that the per test timeout is enforced when running GTest tests.
5 # RUN: not %{lit} -j 1 -v %{inputs}/googletest-timeout --timeout=1 > %t.cmd.out
6 # RUN: FileCheck < %t.cmd.out %s
8 # Check that the per test timeout is enforced when running GTest tests via
9 # the configuration file
11 # RUN: not %{lit} -j 1 -v %{inputs}/googletest-timeout \
12 # RUN: --param set_timeout=1 > %t.cfgset.out 2> %t.cfgset.err
13 # RUN: FileCheck < %t.cfgset.out %s
16 # CHECK: PASS: googletest-timeout :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/FirstTest.subTestA
17 # CHECK: TIMEOUT: googletest-timeout :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/FirstTest.subTestB
18 # CHECK: TIMEOUT: googletest-timeout :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/FirstTest.subTestC
19 # CHECK: Expected Passes : 1
20 # CHECK: Individual Timeouts: 2
22 # Test per test timeout via a config file and on the command line.
23 # The value set on the command line should override the config file.
24 # RUN: not %{lit} -j 1 -v %{inputs}/googletest-timeout \
25 # RUN: --param set_timeout=1 --timeout=2 > %t.cmdover.out 2> %t.cmdover.err
26 # RUN: FileCheck < %t.cmdover.out %s
27 # RUN: FileCheck --check-prefix=CHECK-CMDLINE-OVERRIDE-ERR < %t.cmdover.err %s
29 # CHECK-CMDLINE-OVERRIDE-ERR: Forcing timeout to be 2 seconds