~arosales/charms/precise/tomcat7/add-icon

« back to all changes in this revision

Viewing changes to tests/run_test.sh

  • Committer: James Page
  • Date: 2011-10-07 12:32:58 UTC
  • Revision ID: james.page@canonical.com-20111007123258-rkj52b0ipuqumzyc
Refactoring, support for multicast cluster, testing hooks

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
RESULTS_DIR=$1
 
4
 
 
5
# Always run from the current test directory 
 
6
# this allows subunit et al to work OK.
 
7
cd $(dirname $0)
 
8
 
 
9
# Set umask so other users can actually read the
 
10
# results
 
11
umask 0022
 
12
 
 
13
# Setup the test results directory
 
14
[ -d $RESULTS_DIR ] || mkdir -p $RESULTS_DIR
 
15
 
 
16
# Execute the actual testing.
 
17
python -m subunit.run test 2> $RESULTS_DIR/TEST-error.log \
 
18
    | subunit2junitxml > $RESULTS_DIR/TEST-results.xml 
 
19
 
 
20
# Return exit code 0 and test failures cause trigger to fail
 
21
exit 0