1 # Check the behavior of the ALLOW_RETRIES keyword.
3 # This test uses a file that's stable across retries of the test to fail and
4 # only succeed the fourth time it is retried.
6 # RUN: rm -f %t.counter
7 # RUN: %{lit} %{inputs}/allow-retries/succeeds-within-limit.py -Dcounter=%t.counter -Dpython=%{python} | FileCheck --check-prefix=CHECK-TEST1 %s
8 # CHECK-TEST1: Passed With Retry: 1
10 # Test that a per-file ALLOW_RETRIES overwrites the config-wide test_retry_attempts property, if any.
12 # RUN: rm -f %t.counter
13 # RUN: %{lit} %{inputs}/allow-retries/succeeds-within-limit.py -Dtest_retry_attempts=2 -Dcounter=%t.counter -Dpython=%{python} | FileCheck --check-prefix=CHECK-TEST2 %s
14 # CHECK-TEST2: Passed With Retry: 1
16 # This test does not succeed within the allowed retry limit
18 # RUN: not %{lit} %{inputs}/allow-retries/does-not-succeed-within-limit.py | FileCheck --check-prefix=CHECK-TEST3 %s
19 # CHECK-TEST3: Failed Tests (1):
20 # CHECK-TEST3: allow-retries :: does-not-succeed-within-limit.py
22 # This test should be UNRESOLVED since it has more than one ALLOW_RETRIES
23 # lines, and that is not allowed.
25 # RUN: not %{lit} %{inputs}/allow-retries/more-than-one-allow-retries-lines.py | FileCheck --check-prefix=CHECK-TEST4 %s
26 # CHECK-TEST4: Unresolved Tests (1):
27 # CHECK-TEST4: allow-retries :: more-than-one-allow-retries-lines.py
29 # This test does not provide a valid integer to the ALLOW_RETRIES keyword.
30 # It should be unresolved.
32 # RUN: not %{lit} %{inputs}/allow-retries/not-a-valid-integer.py | FileCheck --check-prefix=CHECK-TEST5 %s
33 # CHECK-TEST5: Unresolved Tests (1):
34 # CHECK-TEST5: allow-retries :: not-a-valid-integer.py
36 # This test checks that the config-wide test_retry_attempts property is used
37 # when no ALLOW_RETRIES keyword is present.
39 # RUN: rm -f %t.counter
40 # RUN: %{lit} %{inputs}/test_retry_attempts/test.py -Dcounter=%t.counter -Dpython=%{python} | FileCheck --check-prefix=CHECK-TEST6 %s
41 # CHECK-TEST6: Passed With Retry: 1