1# REQUIRES: python-psutil 2 3# Check that the per test timeout is enforced when running GTest tests. 4# 5# RUN: not %{lit} -j 1 -v %{inputs}/googletest-timeout --timeout=1 > %t.cmd.out 6# RUN: FileCheck < %t.cmd.out %s 7 8# Check that the per test timeout is enforced when running GTest tests via 9# the configuration file 10# 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 14 15# CHECK: -- Testing: 16# CHECK: PASS: googletest-timeout :: DummySubDir/OneTest/FirstTest.subTestA 17# CHECK: TIMEOUT: googletest-timeout :: DummySubDir/OneTest/FirstTest.subTestB 18# CHECK: TIMEOUT: googletest-timeout :: DummySubDir/OneTest/FirstTest.subTestC 19# CHECK: Expected Passes : 1 20# CHECK: Individual Timeouts: 2 21 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 28 29# CHECK-CMDLINE-OVERRIDE-ERR: Forcing timeout to be 2 seconds 30