|
61 | 61 | - sudo -u cros --login ssh root@$(lava-target-ip) tar -xzf /usr/test_vectors-vp9.tar.gz -C
|
62 | 62 | /usr/local/share/tast/data/go.chromium.org/tast-tests/cros/local/bundles/cros/video/data/ || true
|
63 | 63 | {%- endif %}
|
| 64 | +{% if "coverage" in node.data.config_full %} |
| 65 | + - scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null |
| 66 | + -i /home/cros/.ssh/id_rsa /home/cros/gcov_* root@$(lava-target-ip):/usr/local/bin || true |
| 67 | + - /home/cros/ssh_retry.sh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null |
| 68 | + -i /home/cros/.ssh/id_rsa root@$(lava-target-ip) /usr/local/bin/gcov_reset.sh || true |
| 69 | + - lava-test-case gcov-scripts --result pass |
| 70 | +{% endif %} |
64 | 71 | - lava-test-set stop setup
|
65 | 72 | - >-
|
66 | 73 | ./tast_parser.py --run
|
67 | 74 | {%- for test in tests %}
|
68 | 75 | {{ test }}
|
69 | 76 | {%- endfor %}
|
| 77 | + || true |
| 78 | +{% if "coverage" in node.data.config_full %} |
| 79 | + - UPLOAD_PATH="{{ node.name }}-{{ node.id }}" |
| 80 | + - UPLOAD_NAME="gcov.tar.gz" |
| 81 | + # Pack and retrieve GCOV artifacts |
| 82 | + - /home/cros/ssh_retry.sh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null |
| 83 | + -i /home/cros/.ssh/id_rsa root@$(lava-target-ip) /usr/local/bin/gcov_pack.sh |
| 84 | + "/tmp/${UPLOAD_NAME}" || true |
| 85 | + - scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null |
| 86 | + -i /home/cros/.ssh/id_rsa root@$(lava-target-ip):"/tmp/${UPLOAD_NAME}" . || true |
| 87 | + # Use set +x so we can don't echo secret tokens in the logs |
| 88 | + - set +x |
| 89 | + - . /lava-${LAVA_JOB_ID}/secrets |
| 90 | + - >- |
| 91 | + lava-test-case "artifact-upload:coverage_data:{{ storage_config.base_url }}/${UPLOAD_PATH}/${UPLOAD_NAME}" |
| 92 | + --shell curl -X POST {{ storage_config.base_url }}/upload |
| 93 | + -H "Authorization: Bearer ${UPLOAD_TOKEN}" |
| 94 | + -F "file0=@${UPLOAD_NAME}" |
| 95 | + -F "path=${UPLOAD_PATH}" |
| 96 | + || true |
| 97 | + # Re-enable set -x for the final commands |
| 98 | + - set -x |
| 99 | +{% endif %} |
70 | 100 | # Wait for DUT to shut down, or keep going if unreachable (e.g. crashed)
|
71 | 101 | - >-
|
72 | 102 | /home/cros/ssh_retry.sh
|
|
76 | 106 | root@$(lava-target-ip)
|
77 | 107 | poweroff && sleep 30 || true
|
78 | 108 | - ./tast_parser.py --results
|
| 109 | +{% if "coverage" in node.data.config_full %} |
| 110 | +secrets: |
| 111 | + UPLOAD_TOKEN: {{ storage_config.name }}-token |
| 112 | +{% endif %} |
0 commit comments