[TIP] Not receiving a failure return code when running coverage in Bah Shell

Edward Huth edward.huth at oracle.com
Thu Apr 17 14:19:51 PDT 2014



I have a bash shell script that is processing coverage for a number of python files.   

When executing the shell script for the failing directories, I see that the failure condition is met in the module cmdline.py(return FAIL_UNDER) however

I don't see the value being returned to the shell.   


My question is how do I capture the return code so I can test this within the bash_shell?   




cd $HOME/sitesnap/src/ss_lib_test

#/usr/local/rnt/bin/python test_sitesnap_dev_env_config.py


  for c_file in $CMD2


      echo ' '

      echo 'Running coverage for :'$c_file

      echo '======================================================'

      coverage erase

      coverage run  $c_file

      coverage report -m  --fail-under=$FAIL --rcfile=$RCFILE          ### would like to be able to process the return code here 

       echo '======================================================'

      echo '   '



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20140417/1175a79d/attachment.htm>

More information about the testing-in-python mailing list