aboutsummaryrefslogtreecommitdiff
path: root/jdkX-jcstress-test.yaml
blob: 1035e87394d5d861c49615a4b98f9df1a655d2cf (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
- job:
    name: jdkX-jcstress-test
    project-type: matrix
    defaults: global
    description: |
        This job runs the http://openjdk.java.net/projects/code-tools/jcstress/ tests.<br>
        <b>Note:</b> this test currently takes around <b>10 hours</b> to complete<br>
        This project currently runs the "server" variant only due to the amount of time both tests would take to complete.
    properties:
        - authorization:
            linaro:
                - job-read
            openjdk-members:
                - job-extended-read
                - job-build
                - job-cancel
        - build-discarder:
            days-to-keep: 30
            num-to-keep: 10
            artifact-num-to-keep: 5
    disabled: false
    node: aarch64-06
    display-name: 'OpenJDK X - Run jcstress tests'
    parameters:
        - string:
            name: JCSTRESS_MODE
            default: 'quick'
    axes:
        - axis:
            type: user-defined
            name: JVM_VARIANT
            values:
                - server
                - client
        - axis:
            type: user-defined
            name: BUILD_TYPE
            values:
                - release
        - axis:
            type: slave
            name: label
            values:
                - aarch64-06
    execution-strategy:
        sequential: true
    wrappers:
        - workspace-cleanup:
            dirmatch: false
        - timestamps
        - matrix-tie-parent:
            node: aarch64-06
        - timeout:
            timeout: 900
    builders:
        - copyartifact:
            project: jcstress-build
            filter: 'tests-custom/target/jcstress.jar, tests-all/target/jcstress.jar'
            target: incoming
            flatten: false
# copyartifact is slow and the file is local
# copy instead of going back and forth between master <-> slave
#        - copyartifact:
#            project: jdkX-build-image
#            filter: 'out/jdkX-${JVM_VARIANT}-${BUILD_TYPE}.tar.gz'
#            target: incoming
#            flatten: true
        - shell: |
            #!/bin/bash

            set -eu

            TEST_TYPE=all

            # client variant uses server with -XX:TieredStopAtLevel=1
            # zero is a third possible value.
            REAL_VARIANT=${JVM_VARIANT/client/server}

            JCSTRESS_JAR=${WORKSPACE}/incoming/tests-${TEST_TYPE}/target/jcstress.jar
            rm -rf jdkX*
            tar xf ~/workspace/jdkX-build-image/BUILD_TYPE/${BUILD_TYPE}/JVM_VARIANT/${REAL_VARIANT}/label/${NODE_NAME}/out/jdkX-${REAL_VARIANT}-${BUILD_TYPE}.tar.gz
            export JAVA_HOME=${WORKSPACE}/jdkX-${REAL_VARIANT}-${BUILD_TYPE}
            export PATH=${JAVA_HOME}/bin:${PATH}
            which java
            java -version

            # XXX Don't fail the job if jcstress itself fails.
            set +e
            java -jar ${JCSTRESS_JAR} -m ${JCSTRESS_MODE}

            test_result=$?
            set -e

            rm -rf out
            mkdir out

            out_dirname=jcstress-results-${JVM_VARIANT}-${BUILD_TYPE}

            rm -rf ${out_dirname}
            mkdir -p ${out_dirname}
            cp jcstress-results*.bin.gz ${out_dirname}
            cp -a results ${out_dirname}

            tar czvf out/${out_dirname}.tar.gz ${out_dirname}
    publishers:
        - archive:
            artifacts: 'out/jcstress-results-*.tar.gz'
        - html-publisher:
            name: 'HTML Report'
            dir: 'results'
            files: 'index.html'
            keep-all: true