Skip to content

Commit 14714a8

Browse files
committed
Travis: remove status functionality
Unfortunately, we need to remove status functionality as it exposes an information it should rather not. There is no other way we can do it in the pull request coming from forks (most of our PRs are from forks). It is better if we use pass/failure what Travis provides. The information are in the logs. It should always print the status info at the very end. A test should have "echo Failed with a reason...."
1 parent fdab61d commit 14714a8

File tree

1 file changed

+1
-47
lines changed

1 file changed

+1
-47
lines changed

.travis.yml

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@ cache:
3333

3434
before_install:
3535
- source tools/test/travis-ci/functions.sh
36-
- set_status "pending" "Test started."
37-
38-
after_success:
39-
- set_status "success" "Success!"
40-
41-
after_failure:
42-
- set_status "failure" "Test failed."
4336

4437

4538
matrix:
@@ -86,8 +79,6 @@ matrix:
8679
| while read file; do cp --parents "${file}" SCANCODE_NEW_FILES; done
8780
- scancode -l --json-pp scancode_new_files.json SCANCODE_NEW_FILES
8881
- python ./tools/test/travis-ci/scancode-evaluate.py -f scancode_new_files.json || true
89-
after_success:
90-
- python ./tools/test/travis-ci/scancode-evaluate.py -f scancode.json
9182
- cat scancode-evaluate.log
9283
- COUNT=$(cat scancode-evaluate.log | grep 'File:' | wc -l)
9384
- python ./tools/test/travis-ci/scancode-evaluate.py -f scancode_new_files.json
@@ -96,22 +87,13 @@ matrix:
9687
- |
9788
if [ $COUNT == 0 ] && [ $COUNT_NEW_FILES == 0 ]; then
9889
echo "License check OK";
99-
STATUSM="All licenses OK";
100-
set_status "success" "$STATUSM";
10190
elif [ $COUNT_NEW_FILES != 0 ]; then
102-
echo "License check failed, files with the license issues found";
103-
STATUSM="Needs review, license issues in modified files: ${COUNT}, new files: ${COUNT_NEW_FILES}";
104-
set_status "failure" "$STATUSM";
91+
echo "License check failed, new files with the license issues found";
10592
false;
10693
else
10794
echo "License check failed, please review license issues found in modified files";
108-
STATUSM="Needs review, ${COUNT} license issues found";
109-
set_status "success" "$STATUSM";
110-
false;
11195
fi
11296
113-
114-
11597
- <<: *basic-vm
11698
name: "include check"
11799
env: NAME=include_check
@@ -305,20 +287,6 @@ matrix:
305287
# Run profiling tests
306288
- make -C ${EVENTS}/tests/unit prof | tee prof
307289
- ccache -s
308-
after_success:
309-
# Update status, comparing with master if possible.
310-
- |
311-
CURR=$(grep -o '[0-9]\+ cycles' prof | awk '{sum += $1} END {print sum}')
312-
PREV=$(curl -u "${MBED_BOT}" https://api.github.com/repos/${TRAVIS_REPO_SLUG}/status/master \
313-
| jq -re "select(.sha != \"${TRAVIS_COMMIT}\")
314-
| .statuses[] | select(.context == \"travis-ci/${NAME}\").description
315-
| capture(\"runtime is (?<runtime>[0-9]+)\").runtime" \
316-
|| echo 0)
317-
318-
delta=""
319-
[ "${PREV}" -ne 0 ] && delta="($(printf "%+d" "$(( ${CURR} - ${PREV} ))" cycles)"
320-
321-
set_status "success" "Success! Runtime is ${CURR} cycles. ${delta}"
322290

323291
- <<: *extended-vm
324292
name: "littlefs"
@@ -379,17 +347,3 @@ matrix:
379347
CFLAGS+="-DLFS_NO_ASSERT -DLFS_NO_DEBUG -DLFS_NO_WARN -DLFS_NO_ERROR"
380348
| tee sizes
381349
- ccache -s
382-
after_success:
383-
# Update status, comparing with master if possible.
384-
- |
385-
CURR=$(tail -n1 sizes | awk '{print $1}')
386-
PREV=$(curl -u "${MBED_BOT}" https://api.github.com/repos/${TRAVIS_REPO_SLUG}/status/master \
387-
| jq -re "select(.sha != \"${TRAVIS_COMMIT}\")
388-
| .statuses[] | select(.context == \"travis-ci/${NAME}\").description
389-
| capture(\"code size is (?<size>[0-9]+)\").size" \
390-
|| echo 0)
391-
392-
delta=""
393-
[ "${PREV}" -ne 0 ] && delta="($(printf "%+0.2f%%" "$(<<< "100 * ((${CURR} - ${PREV})/${PREV})" bc -l)"))"
394-
395-
set_status "success" "Success! Code size is ${CURR}B. ${delta}"

0 commit comments

Comments
 (0)