Skip to content

Instantly share code, notes, and snippets.

@rj76
Created July 26, 2016 16:42
Show Gist options
  • Save rj76/0be4f49ff5770616bc9e6040c19e1dcb to your computer and use it in GitHub Desktop.
Save rj76/0be4f49ff5770616bc9e6040c19e1dcb to your computer and use it in GitHub Desktop.
play wav on tests failure/success
#/bin/bash
success="/home/richard/Downloads/computer_systems.wav"
fail="/home/richard/Downloads/go_back_to_work.wav"
./manage.py test --settings settings.test_settings
if [ $? -ne 0 ]; then
vlc --play-and-exit --quiet --intf dummy vcd:// $fail
else
vlc --play-and-exit --quiet --intf dummy vcd:// $success
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment