Changeset 29438 for branches/sc_branches/psps_testing/build.sh
- Timestamp:
- Oct 15, 2010, 2:51:13 PM (16 years ago)
- File:
-
- 1 edited
-
branches/sc_branches/psps_testing/build.sh (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/sc_branches/psps_testing/build.sh
r29235 r29438 7 7 8 8 PYTHON=/usr/bin/python 9 UNITTEST_LOG=unittest.log 9 10 COVERAGE=/usr/bin/python-coverage 11 DOCUMENTATION=/usr/bin/epydoc 12 DOC_FOLDER=documentation 13 # Check epydoc available formats 14 DOC_FORMAT=html 10 15 11 16 FILES="testers/__init__.py \ … … 19 24 utilities/file_manipulation.py \ 20 25 utilities/psps_logger.py \ 26 utilities/abstract_test_report.py \ 21 27 utilities/test_report.py \ 22 28 utilities/test_product.py \ … … 28 34 case "$1" in 29 35 unittest) 36 something_wrong=0 37 /bin/rm -f $UNITTEST_LOG 30 38 for file in $FILES; do 31 echo "Unit test for $file ($PYTHON -m doctest $file)" 32 $PYTHON -m doctest $file 39 echo -n "Unit test for $file ($PYTHON -m doctest $file): " 40 $PYTHON -m doctest $file >> $UNITTEST_LOG 2>> $UNITTEST_LOG 41 status=$? 42 if [ "$status" -eq "0" ]; then 43 echo "OK" 44 else 45 echo "KO" 46 (( something_wrong= $something_wrong + 1 )) 47 fi 33 48 done 49 if [ "$something_wrong" -eq "0" ]; then 50 echo "All tests pass" 51 else 52 echo "!!! $something_wrong tests failed" 53 echo "!!! Look at $UNITTEST_LOG for details" 54 fi 34 55 ;; 35 56 coverage) … … 40 61 echo "### Coverage results ###" 41 62 $COVERAGE -r -o /usr,$HOME/local -m 63 ;; 64 doc|documentation) 65 $DOCUMENTATION -o $DOC_FOLDER --$DOC_FORMAT `find . -name \*.py | grep -v weirdos | grep -v html | grep -v create_simple_fits` -v 66 echo "Documentation is at:" 67 echo " file://`pwd`/documentation/index.html" 42 68 ;; 43 69 all) … … 51 77 ;; 52 78 *) 53 echo "Usage: $0 [ all | unittest | coverage ]"79 echo "Usage: $0 [ all | unittest | coverage | [doc|documentation]]" 54 80 exit 1 55 81 ;;
Note:
See TracChangeset
for help on using the changeset viewer.
