xref: /openbmc/qemu/.patchew.yml (revision 500eb6db)
1---
2# Note: this file is still unused.  It serves as a documentation for the
3# Patchew configuration in case patchew.org disappears or has to be
4# reinstalled.
5#
6# Patchew configuration is available to project administrators at
7# https://patchew.org/api/v1/projects/1/config/ and can be configured
8# to YAML using the following Python script:
9#
10#     import json
11#     import sys
12#     import ruamel.yaml
13#
14#     json_str = sys.stdin.read()
15#     yaml = ruamel.yaml.YAML()
16#     yaml.explicit_start = True
17#     data = json.loads(json_str, object_pairs_hook=ruamel.yaml.comments.CommentedMap)
18#     ruamel.yaml.scalarstring.walk_tree(data)
19#     yaml.dump(data, sys.stdout)
20
21email:
22  notifications:
23    timeouts:
24      event: TestingReport
25      enabled: true
26      to_user: false
27      reply_subject: true
28      set_reply_to: true
29      in_reply_to: true
30      reply_to_all: false
31      subject_template: none
32      to: fam@euphon.net
33      cc: ''
34      body_template: |
35        {% if not is_timeout %} {{ cancel }} {% endif %}
36
37        Test '{{ test }}' timeout, log:
38
39        {{ log }}
40    ENOSPC:
41      event: TestingReport
42      enabled: true
43      to_user: false
44      reply_subject: false
45      set_reply_to: false
46      in_reply_to: true
47      reply_to_all: false
48      subject_template: Out of space error
49      to: fam@euphon.net
50      cc: ''
51      body_template: |
52        {% if passed %}
53          {{ cancel }}
54        {% endif %}
55
56        {% if 'No space left on device' in log %}
57        Tester {{ tester }} out of space when running {{ test }}
58
59          {{ log }}
60        {% else %}
61          {{ cancel }}
62        {% endif %}
63    FailureShort:
64      event: TestingReport
65      enabled: true
66      to_user: false
67      reply_subject: true
68      set_reply_to: true
69      in_reply_to: true
70      reply_to_all: true
71      subject_template: Testing failed
72      to: ''
73      cc: ''
74      body_template: |
75        {% if passed or not obj.message_id or is_timeout %}
76          {{ cancel }}
77        {% endif %}
78        {% if 'No space left on device' in log %}
79          {{ cancel }}
80        {% endif %}
81        Patchew URL: https://patchew.org/QEMU/{{ obj.message_id }}/
82
83        {% ansi2text log as logtext %}
84        {% if test == "checkpatch" %}
85        Hi,
86
87        This series seems to have some coding style problems. See output below for
88        more information:
89
90        {{ logtext }}
91        {% elif test == "docker-mingw@fedora" or test == "docker-quick@centos7" or test == "asan" %}
92        Hi,
93
94        This series failed the {{ test }} build test. Please find the testing commands and
95        their output below. If you have Docker installed, you can probably reproduce it
96        locally.
97
98        {% lines_between logtext start="^=== TEST SCRIPT BEGIN ===$" stop="^=== TEST SCRIPT END ===$" %}
99        {% lines_between logtext start="^=== OUTPUT BEGIN ===$" stop="=== OUTPUT END ===$" as output %}
100        {% grep_C output regex="\b(FAIL|XPASS|ERROR|WARN|error:|warning:)" n=3 %}
101        {% elif test == "s390x" or test == "FreeBSD" or test == "ppcle" or test == "ppcbe" %}
102        Hi,
103
104        This series failed build test on {{test}} host. Please find the details below.
105
106        {% lines_between logtext start="^=== TEST SCRIPT BEGIN ===$" stop="^=== TEST SCRIPT END ===$" %}
107        {% lines_between logtext start="^=== OUTPUT BEGIN ===$" stop="=== OUTPUT END ===$" as output %}
108        {% grep_C output regex="\b(FAIL|XPASS|ERROR|WARN|error:|warning:)" n=3 %}
109        {% else %}
110        {{ cancel }}
111        {% endif %}
112
113        The full log is available at
114        {{ log_url }}.
115        ---
116        Email generated automatically by Patchew [https://patchew.org/].
117        Please send your feedback to patchew-devel@redhat.com
118testing:
119  tests:
120    asan:
121      enabled: true
122      requirements: docker
123      timeout: 3600
124      script: |
125        #!/bin/bash
126        time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
127    docker-quick@centos7:
128      enabled: false
129      requirements: docker,x86_64
130      timeout: 3600
131      script: |
132        #!/bin/bash
133        time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1
134    checkpatch:
135      enabled: true
136      requirements: ''
137      timeout: 600
138      script: |
139        #!/bin/bash
140        git rev-parse base > /dev/null || exit 0
141        git config --local diff.renamelimit 0
142        git config --local diff.renames True
143        git config --local diff.algorithm histogram
144        ./scripts/checkpatch.pl --mailback base..
145    docker-mingw@fedora:
146      enabled: true
147      requirements: docker,x86_64
148      timeout: 3600
149      script: |
150        #! /bin/bash
151        test "$(uname -m)" = "x86_64"
152    ppcle:
153      enabled: false
154      requirements: ppcle
155      timeout: 3600
156      script: |
157        #!/bin/bash
158        # Testing script will be invoked under the git checkout with
159        # HEAD pointing to a commit that has the patches applied on top of "base"
160        # branch
161        set -e
162        CC=$HOME/bin/cc
163        INSTALL=$PWD/install
164        BUILD=$PWD/build
165        mkdir -p $BUILD $INSTALL
166        SRC=$PWD
167        cd $BUILD
168        $SRC/configure --cc=$CC --prefix=$INSTALL
169        make -j4
170        # XXX: we need reliable clean up
171        # make check -j4 V=1
172        make install
173
174        echo
175        echo "=== ENV ==="
176        env
177
178        echo
179        echo "=== PACKAGES ==="
180        rpm -qa
181    ppcbe:
182      enabled: false
183      requirements: ppcbe
184      timeout: 3600
185      script: |
186        #!/bin/bash
187        # Testing script will be invoked under the git checkout with
188        # HEAD pointing to a commit that has the patches applied on top of "base"
189        # branch
190        set -e
191        CC=$HOME/bin/cc
192        INSTALL=$PWD/install
193        BUILD=$PWD/build
194        mkdir -p $BUILD $INSTALL
195        SRC=$PWD
196        cd $BUILD
197        $SRC/configure --cc=$CC --prefix=$INSTALL
198        make -j4
199        # XXX: we need reliable clean up
200        # make check -j4 V=1
201        make install
202
203        echo
204        echo "=== ENV ==="
205        env
206
207        echo
208        echo "=== PACKAGES ==="
209        rpm -qa
210    FreeBSD:
211      enabled: true
212      requirements: qemu-x86,x86_64,git
213      timeout: 3600
214      script: |
215        #!/bin/bash
216        # Testing script will be invoked under the git checkout with
217        # HEAD pointing to a commit that has the patches applied on top of "base"
218        # branch
219        if qemu-system-x86_64 --help >/dev/null 2>&1; then
220          QEMU=qemu-system-x86_64
221        elif /usr/libexec/qemu-kvm --help >/dev/null 2>&1; then
222          QEMU=/usr/libexec/qemu-kvm
223        else
224          exit 1
225        fi
226        make vm-build-freebsd J=21 QEMU=$QEMU
227        exit 0
228    docker-clang@ubuntu:
229      enabled: true
230      requirements: docker,x86_64
231      timeout: 3600
232      script: |
233        #!/bin/bash
234        time make docker-test-clang@ubuntu SHOW_ENV=1 J=14 NETWORK=1
235    s390x:
236      enabled: true
237      requirements: s390x
238      timeout: 3600
239      script: |
240        #!/bin/bash
241        # Testing script will be invoked under the git checkout with
242        # HEAD pointing to a commit that has the patches applied on top of "base"
243        # branch
244        set -e
245        CC=$HOME/bin/cc
246        INSTALL=$PWD/install
247        BUILD=$PWD/build
248        mkdir -p $BUILD $INSTALL
249        SRC=$PWD
250        cd $BUILD
251        $SRC/configure --cc=$CC --prefix=$INSTALL
252        make -j4
253        # XXX: we need reliable clean up
254        # make check -j4 V=1
255        make install
256
257        echo
258        echo "=== ENV ==="
259        env
260
261        echo
262        echo "=== PACKAGES ==="
263        rpm -qa
264  requirements:
265    x86_64:
266      script: |
267        #! /bin/bash
268        test "$(uname -m)" = "x86_64"
269    qemu-x86:
270      script: |
271        #!/bin/bash
272        if qemu-system-x86_64 --help >/dev/null 2>&1; then
273          :
274        elif /usr/libexec/qemu-kvm --help >/dev/null 2>&1; then
275          :
276        else
277          exit 1
278        fi
279    ppcle:
280      script: |
281        #!/bin/bash
282        test "$(uname -m)" = "ppc64le"
283    ppcbe:
284      script: |
285        #!/bin/bash
286        test "$(uname -m)" = "ppc64"
287    git:
288      script: |
289        #! /bin/bash
290        git config user.name > /dev/null 2>&1
291    docker:
292      script: |
293        #!/bin/bash
294        docker ps || sudo -n docker ps
295    s390x:
296      script: |
297        #!/bin/bash
298        test "$(uname -m)" = "s390x"
299git:
300  push_to: git@github.com:patchew-project/qemu
301  public_repo: https://github.com/patchew-project/qemu
302  url_template: https://github.com/patchew-project/qemu/tree/%t
303