1. Install composer:

http://getcomposer.org/doc/00-intro.md#installation-nix

2. Run composer

php composer.phar install

3. Install test databse (requires a running postgres instance)

createdb -U postgres jqjobs_test
./vendor/bin/mp -x'pgsql:dbname=jqjobs_test;user=postgres;host=localhost' -r -m head

4. Run tests

# main unit tests
./vendor/bin/phpunit

# remaining tests are shell script based and leverage environment vars
export PSQL_BIN=/usr/bin/psql         # ...or your psql path
export PG_DUMP_BIN=/usr/bin/pg_dump   # ...or your pg_dump path
export PHP_BIN=/usr/bin/php           # ...or your php path
export SEQ_BIN=/usr/bin/seq           # ...or your seq path

# misc integration tests
cd test/concurrency-test-script && sh concurrency-test.sh
# you will need to manually run the tests in test/shutdown-error-tests to make sure they behave as indicated
cd test/shutdown-error-tests
for i in *.php; do php $i; done
# you will need to manually run the tests in test/signals to make sure they behave as indicated
cd test/signals
./run-test.sh

#################################################################
Working on changes to the JQManagedJob model that affect the DB?
#################################################################

# to use propel-gen
export PHING_COMMAND=`pwd`/externals/pear/phing
comice exec propel-gen -l
# comment out these lines in externals/pear/phing
# Change this to reflect your environment if the default value doesn't work
#PHP_COMMAND="/usr/bin/php"
#export PHP_COMMAND 

# to rebuild propel
# from project root dir
./vendor/bin/propel-gen propel-build reverse && \
    php propel-build/fix-schema.php && \
    ./vendor/bin/propel-gen propel-build om convert-conf

# tags
ctags -f tags -R --extra=+f *php lib
