]> begriffs open source - cmsis-freertos/blob - Test/litani/test/e2e/tests/timed_out_timeout_ignored.py
Update README.md - branch main is now the base branch
[cmsis-freertos] / Test / litani / test / e2e / tests / timed_out_timeout_ignored.py
1 # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License").
4 # You may not use this file except in compliance with the License.
5 # A copy of the License is located at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # or in the "license" file accompanying this file. This file is distributed
10 # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
11 # express or implied. See the License for the specific language governing
12 # permissions and limitations under the License.
13
14
15 def get_init_args():
16     return {
17         "kwargs": {
18             "project": "foo",
19         }
20     }
21
22
23 def get_jobs():
24     return [{
25         "args": [
26             "timeout-ignore",
27         ],
28         "kwargs": {
29             "command": "sleep 10",
30             "ci-stage": "build",
31             "pipeline": "foo",
32             "timeout": "3",
33         }
34     }]
35
36
37 def get_run_build_args():
38     return {}
39
40
41 def check_run(run):
42     pipe = run["pipelines"][0]
43     job = pipe["ci_stages"][0]["jobs"][0]
44
45     return all((
46         job["timeout_reached"],
47         job["outcome"] == "fail_ignored",
48         pipe["status"] == "fail",
49     ))