Commit 4b07304a authored by Ivo Fokkema's avatar Ivo Fokkema

Attempt to get screenshots of failed runs in my email.

parent 6a7a40e8
...@@ -45,6 +45,7 @@ addons: ...@@ -45,6 +45,7 @@ addons:
- mysql-server-5.6 - mysql-server-5.6
- mysql-client-core-5.6 - mysql-client-core-5.6
- mysql-client-5.6 - mysql-client-5.6
- mutt
before_install: before_install:
- ./tests/travis/setup/setup_chrome.sh - ./tests/travis/setup/setup_chrome.sh
......
...@@ -4,12 +4,17 @@ ...@@ -4,12 +4,17 @@
GLOB="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" GLOB="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Loop through screenshot files (oldest to newest). # Loop through screenshot files (oldest to newest).
for file in `ls -1 -t -r ${GLOB}/test_results/error_screenshots/*.png`; do for file in `ls -1 -t -r ${GLOB}/test_results/error_screenshots/ | grep -F .png`; do
echo "Uploading file: ${file}"; echo "Uploading file: ${file}";
# Upload to transfer.sh, this command will output the URL on which the # Upload to transfer.sh, this command will output the URL on which the
# uploaded file can be reached. # uploaded file can be reached.
curl --upload-file "${file}" https://transfer.sh RETURN=`curl --upload-file "${file}" https://transfer.sh`;
if [[ ! $RETURN == "Could not save metadata" ]];
then
# Transfer.sh service often fails.
mutt -s "Travis failure" -a "${file} -- I.F.A.C.Fokkema@LUMC.nl < <(echo "Travis run failed. Screenshot attached.")
fi
rm -f "${file}" rm -f "${file}"
done done
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment