aboutsummaryrefslogtreecommitdiff
path: root/tcwg-abe-test-yvan.yaml
blob: 80570d9452d6c7e2ff1a7cdcf35d8378ef229693 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
- job:
    name: tcwg-abe-test-yvan
    project-type: matrix
    defaults: global
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
            linaro:
                - job-build
                - job-cancel
        - build-discarder:
            days-to-keep: 30
            num-to-keep: 100
    parameters:
        - string:
            name: GERRIT_PATCHSET_REVISION
            default: refs/remotes/origin/master
            description: 'Patched ABE revision'
    disabled: true
    node: tcwg-x86_64-build
    retry-count: 3
    concurrent: true
    display-name: 'TCWG ZZZ ABE Test - Regression plan test'
    scm:
        - git:
            url: https://git-us.linaro.org/toolchain/abe.git
            refspec: +refs/changes/*:refs/remotes/changes/*
            branches:
                - ${GERRIT_PATCHSET_REVISION}
            skip-tag: true
            shallow-clone: false
            wipe-workspace: true
            choosing-strategy: gerrit
    triggers:
        - gerrit:
            server-name: 'review.linaro.org'
            override-votes: true
            gerrit-build-successful-verified-value: 1
            gerrit-build-failed-verified-value: -1
            gerrit-build-successful-codereview-value: 1
            gerrit-build-failed-codereview-value: -1
            readable-message: true
            successful-message: 'Works for me'
            failure-message: 'Well ... it worked on my machine'
            trigger-for-unreviewed-patches: true
            projects:
                - project-compare-type: 'ANT'
                  project-pattern: 'toolchain/abe'
                  branches:
                    - branch-compare-type: 'ANT'
                      branch-pattern: 'master'
            silent-start: true
    axes:
        - axis:
            type: slave
            name: label
            values:
                - tcwg-x86_64-build
        - axis:
            type: user-defined
            name: test
            values:
                - cross_build
                - native_build
                - testsuite
                - abe-tests
                - abe-tests-checkout
    execution-strategy:
        sequential: false
    wrappers:
        - timeout:
            timeout: 300
        - timestamps
        - ssh-agent-credentials:
            # tcwg-buildslave user id
            users:
                - 'e0958a95-204f-4c14-a66c-5e2be6c5d50a'
        - build-name:
            name: '#${BUILD_NUMBER}-${GIT_REVISION,length=8}'
    builders:
        - shell: |
            #!/bin/bash

            git checkout -f ${GERRIT_PATCHSET_REVISION}

            schroot_arch=amd64
            schroot_image="tcwg-build-${schroot_arch}-trusty"

            session_id=$(schroot -b -c chroot:$schroot_image --preserve-environment)
            BUILD_SHELL="schroot -r -c session:$session_id --preserve-environment -- bash"
            $BUILD_SHELL -c "echo \"Build session is up; ulimit config:\"; ulimit -a"

            # Remove schroot session on exit
            trap "schroot -f -e -c session:$session_id" 0 1 2 3 5 9 13 15

            case "$test" in
              cross_build) ${BUILD_SHELL} -x ${WORKSPACE}/jenkins.sh --target arm-linux-gnueabihf --runtests --excludecheck gdb --override '--extraconfigdir ../config/gcc6' ;;
              native_build) ${BUILD_SHELL} -x ${WORKSPACE}/jenkins.sh --target native --runtests --bootstrap --excludecheck gdb --override '--extraconfigdir ../config/gcc5' ;;
              testsuite)
                ${BUILD_SHELL} -c "set -ex; ./configure; make check"
                ;;
              abe-tests)
                ${BUILD_SHELL} -c "set -ex; git clone https://git.linaro.org/toolchain/abe-tests.git; cd abe-tests; ./test-manifest2.sh --abe-path `pwd` --ref-snapshots /home/tcwg-buildslave/snapshots-ref --quiet --display-report"
                ;;
              abe-tests-checkout)
                ${BUILD_SHELL} -c "set -ex; git clone https://git.linaro.org/toolchain/abe-tests.git; cd abe-tests; ./test-checkout.sh --clean-snapshots --abe-path `pwd` --ref-snapshots /home/tcwg-buildslave/snapshots-ref"
                ;;
            esac
    publishers:
        - workspace-cleanup:
            include:
              - "nothing"
            dirmatch: true