mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
8eb4c49323
Summary: The technique of directly calling subprocess.Popen on a python script doesn't work on Windows. The executable path of the command must refer to a valid win32 executable. Instead, rename all the python scripts masquerading as gtest executables to have .py extensions, so we can easily detect then and call the python executable for them. Do this on Linux as well as Windows for consistency. The test suite directory names also come out in lower-case on Windows. We can consider removing that in a later patch. This change just updates the FileCheck lines to match on Windows. Fixes PR33933 Reviewers: modocache, mgorny Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35909 llvm-svn: 309347
30 lines
1.3 KiB
Python
30 lines
1.3 KiB
Python
# REQUIRES: python-psutil
|
|
|
|
# Check that the per test timeout is enforced when running GTest tests.
|
|
#
|
|
# RUN: not %{lit} -j 1 -v %{inputs}/googletest-timeout --timeout=1 > %t.cmd.out
|
|
# RUN: FileCheck < %t.cmd.out %s
|
|
|
|
# Check that the per test timeout is enforced when running GTest tests via
|
|
# the configuration file
|
|
#
|
|
# RUN: not %{lit} -j 1 -v %{inputs}/googletest-timeout \
|
|
# RUN: --param set_timeout=1 > %t.cfgset.out 2> %t.cfgset.err
|
|
# RUN: FileCheck < %t.cfgset.out %s
|
|
|
|
# CHECK: -- Testing:
|
|
# CHECK: PASS: googletest-timeout :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/FirstTest.subTestA
|
|
# CHECK: TIMEOUT: googletest-timeout :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/FirstTest.subTestB
|
|
# CHECK: TIMEOUT: googletest-timeout :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/FirstTest.subTestC
|
|
# CHECK: Expected Passes : 1
|
|
# CHECK: Individual Timeouts: 2
|
|
|
|
# Test per test timeout via a config file and on the command line.
|
|
# The value set on the command line should override the config file.
|
|
# RUN: not %{lit} -j 1 -v %{inputs}/googletest-timeout \
|
|
# RUN: --param set_timeout=1 --timeout=2 > %t.cmdover.out 2> %t.cmdover.err
|
|
# RUN: FileCheck < %t.cmdover.out %s
|
|
# RUN: FileCheck --check-prefix=CHECK-CMDLINE-OVERRIDE-ERR < %t.cmdover.err %s
|
|
|
|
# CHECK-CMDLINE-OVERRIDE-ERR: Forcing timeout to be 2 seconds
|