[MIParser] Set RegClassOrRegBank during instruction parsing
[llvm-complete.git] / utils / lit / tests / shtest-timeout.py
blob56415fe5b3ca47ba60162e50d4791a552cc7888e
1 # REQUIRES: lit-max-individual-test-time
3 # llvm.org/PR33944
4 # UNSUPPORTED: system-windows
6 # FIXME: This test is fragile because it relies on time which can
7 # be affected by system performance. In particular we are currently
8 # assuming that `short.py` can be successfully executed within 2
9 # seconds of wallclock time.
11 # Test per test timeout using external shell
12 # RUN: not %{lit} \
13 # RUN: %{inputs}/shtest-timeout/infinite_loop.py \
14 # RUN: %{inputs}/shtest-timeout/short.py \
15 # RUN: -j 1 -v --debug --timeout 2 --param external=1 > %t.extsh.out 2> %t.extsh.err
16 # RUN: FileCheck --check-prefix=CHECK-OUT-COMMON < %t.extsh.out %s
17 # RUN: FileCheck --check-prefix=CHECK-EXTSH-ERR < %t.extsh.err %s
19 # CHECK-EXTSH-ERR: Using external shell
21 # Test per test timeout using internal shell
22 # RUN: not %{lit} \
23 # RUN: %{inputs}/shtest-timeout/infinite_loop.py \
24 # RUN: %{inputs}/shtest-timeout/short.py \
25 # RUN: -j 1 -v --debug --timeout 2 --param external=0 > %t.intsh.out 2> %t.intsh.err
26 # RUN: FileCheck --check-prefix=CHECK-OUT-COMMON < %t.intsh.out %s
27 # RUN: FileCheck --check-prefix=CHECK-INTSH-OUT < %t.intsh.out %s
28 # RUN: FileCheck --check-prefix=CHECK-INTSH-ERR < %t.intsh.err %s
30 # CHECK-INTSH-OUT: TIMEOUT: per_test_timeout :: infinite_loop.py
31 # CHECK-INTSH-OUT: command output:
32 # CHECK-INTSH-OUT: command reached timeout: True
34 # CHECK-INTSH-ERR: Using internal shell
36 # Test per test timeout set via a config file rather than on the command line
37 # RUN: not %{lit} \
38 # RUN: %{inputs}/shtest-timeout/infinite_loop.py \
39 # RUN: %{inputs}/shtest-timeout/short.py \
40 # RUN: -j 1 -v --debug --param external=0 \
41 # RUN: --param set_timeout=2 > %t.cfgset.out 2> %t.cfgset.err
42 # RUN: FileCheck --check-prefix=CHECK-OUT-COMMON < %t.cfgset.out %s
43 # RUN: FileCheck --check-prefix=CHECK-CFGSET-ERR < %t.cfgset.err %s
45 # CHECK-CFGSET-ERR: Using internal shell
47 # CHECK-OUT-COMMON: TIMEOUT: per_test_timeout :: infinite_loop.py
48 # CHECK-OUT-COMMON: Timeout: Reached timeout of 2 seconds
49 # CHECK-OUT-COMMON: Command {{([0-9]+ )?}}Output
51 # CHECK-OUT-COMMON: PASS: per_test_timeout :: short.py
53 # CHECK-OUT-COMMON: Expected Passes{{ *}}: 1
54 # CHECK-OUT-COMMON: Individual Timeouts{{ *}}: 1
56 # Test per test timeout via a config file and on the command line.
57 # The value set on the command line should override the config file.
58 # RUN: not %{lit} \
59 # RUN: %{inputs}/shtest-timeout/infinite_loop.py \
60 # RUN: %{inputs}/shtest-timeout/short.py \
61 # RUN: -j 1 -v --debug --param external=0 \
62 # RUN: --param set_timeout=1 --timeout=2 > %t.cmdover.out 2> %t.cmdover.err
63 # RUN: FileCheck --check-prefix=CHECK-CMDLINE-OVERRIDE-OUT < %t.cmdover.out %s
64 # RUN: FileCheck --check-prefix=CHECK-CMDLINE-OVERRIDE-ERR < %t.cmdover.err %s
66 # CHECK-CMDLINE-OVERRIDE-ERR: Forcing timeout to be 2 seconds
68 # CHECK-CMDLINE-OVERRIDE-OUT: TIMEOUT: per_test_timeout :: infinite_loop.py
69 # CHECK-CMDLINE-OVERRIDE-OUT: Timeout: Reached timeout of 2 seconds
70 # CHECK-CMDLINE-OVERRIDE-OUT: Command {{([0-9]+ )?}}Output
72 # CHECK-CMDLINE-OVERRIDE-OUT: PASS: per_test_timeout :: short.py
74 # CHECK-CMDLINE-OVERRIDE-OUT: Expected Passes{{ *}}: 1
75 # CHECK-CMDLINE-OVERRIDE-OUT: Individual Timeouts{{ *}}: 1