Commit 4b07304a authored by Fokkema's avatar Fokkema

Attempt to get screenshots of failed runs in my email.

parent 6a7a40e8
......@@ -45,6 +45,7 @@ addons:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
- mutt
- ./tests/travis/setup/
......@@ -4,12 +4,17 @@
GLOB="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# 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}";
# Upload to, this command will output the URL on which the
# uploaded file can be reached.
curl --upload-file "${file}"
RETURN=`curl --upload-file "${file}"`;
if [[ ! $RETURN == "Could not save metadata" ]];
# service often fails.
mutt -s "Travis failure" -a "${file} -- < <(echo "Travis run failed. Screenshot attached.")
rm -f "${file}"
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