aboutsummaryrefslogtreecommitdiff
path: root/jdk9-jcstress-test-persist-results.yaml
blob: 38108fa19d3d5811ba9ca398874806015dc67c84 (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
- job:
    name: jdk9-jcstress-test-persist-results
    project-type: matrix
    defaults: global
    description: |
        * Writes results to:<br>
          * /work/openjdk-testing/jcstress-nightly-runs<br>
          * /work/openjdk-testing/jcstress-results
    properties:
        - authorization:
            linaro:
                - job-read
        - build-discarder:
            days-to-keep: 30
            num-to-keep: 10
            artifact-num-to-keep: 5
    disabled: false
    node: aarch64-06
    display-name: 'OpenJDK 9 - Write jcstress tests results'
    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:
#        combination-filter: |
#            JVM_VARIANT=="server"
        sequential: true
    wrappers:
        - workspace-cleanup:
            dirmatch: false
        - timestamps
        - matrix-tie-parent:
            node: aarch64-06
    builders:
        - copyartifact:
            project: jdk9-update-src-tree
            filter: 'out/build-date.sh'
            target: incoming
            flatten: true
        - copyartifact:
            project: jdk9-jcstress-test
            filter: 'out/jcstress-results-${JVM_VARIANT}-${BUILD_TYPE}.tar.gz'
            target: incoming
            flatten: true
        - shell: |
            #!/bin/bash

            set -exu

            PERSIST=$HOME/srv/openjdk9

            : ${YEAR:=$(date +%Y)}
            : ${DAY_OF_YEAR:=$(date +%j)}

            JCSTRESS_RUN_DIR=$PERSIST/jcstress-nightly-runs
            JCSTRESS_RESULTS_DIR=$PERSIST/jcstress-results
            RESULTS_CSV=${JCSTRESS_RESULTS_DIR}/results.csv

            mkdir -p $JCSTRESS_RESULTS_DIR

            # Tolerate missing results.csv file.
            if [ ! -f $RESULTS_CSV ]; then
                touch $RESULTS_CSV
            fi

            mkdir -p ${JCSTRESS_RESULTS_DIR} ${JCSTRESS_RUN_DIR}/${YEAR}/${DAY_OF_YEAR}
            tar -C ${JCSTRESS_RUN_DIR}/${YEAR}/${DAY_OF_YEAR} --strip-components=1 -xf incoming/BUILD_TYPE=${BUILD_TYPE},JVM_VARIANT=${JVM_VARIANT},label=${label}/jcstress-results-${JVM_VARIANT}-${BUILD_TYPE}.tar.gz
            numeric_date=$(date +'%s' --date=$(date +'%Y-%m-%d'))
            echo "Previous Results"
            cat ${RESULTS_CSV}
            echo "${numeric_date},${JCSTRESS_RUN_DIR}/${YEAR}/${DAY_OF_YEAR},success" >> ${RESULTS_CSV}
            sort --unique --field-separator=',' --numeric-sort -o ${RESULTS_CSV} ${RESULTS_CSV}