Skip to content

Instantly share code, notes, and snippets.

@slor
slor / test_everything.sh
Created June 12, 2013 00:00
Run django test on all the packages listed in a CSV file. Supports additional args too.
#!/usr/bin/env bash
#
# Run tests on packages listed in a csv file.
#
# Usage: ./test_everything.sh [arg1 arg2 ...]
#
# Runs manage.py test on all the packages listed in what_to_test.csv. You can
# pass additional args and they will be appended to the manage command.
#
# Example:
""" An example of a Linux daemon written in Python.
Based on http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
The changes are:
1 - Uses file open context managers instead of calls to file().
2 - Forces stdin to /dev/null. stdout and stderr go to log files.
3 - Uses print instead of sys.stdout.write prior to pointing stdout to the log file.
4 - Omits try/excepts if they only wrap one error message w/ another.