Friday, December 1, 2017

Unit Test bugs

Posted on 
  • I think I finally resolved the problem with the Unit Tests not running at night
  • Changed to get the test failures and the test errors. If everything passed then no email is to be sent. Otherwise I now include the test failures and errors in the email and the subject line will no longer say SUCCEEDED
  • Changed build_status.php to sense if this is a continuous build or just a regular build and act accordingly

Unit Tests

It was a problem to debug because we have a sitaution here where build is calling which is in turn calling with -runtests. Additionally was using a library called who had a functon called unitTests. Now recently I added code to fork before exec'ing "perl -runtests" so that I could set an alarm and time out test suites that hang. I have not yet mastered debugging forked processes in Perl.

Additionally, build was not just calling in a Perl sense, rather it was exec'ing as it's a Perl script in its own right. So I was attempting to debug just the exeuction of from the command line. But whenever I did that the tests would work. Still the nightly testing would fail on trying to call "perl -runtests" stating that it could not find!

It seems to turn out that there was a clash between my using the Cwd module (which more accurately tracks changing of directories) while was not using that module. Additionally it (or rather which uses) was reffering to $ENV {PWD} and that was returning inaccurate information. For example, it was saying that we were in the directory /build when we had just did a chdir to /build/views/<view>/vobs/platform/L3 - were there is indeed a! However the script got the wrong current directory and then based things off that, including the finding of I changed this to use `pwd` and now it appears happy!

No comments:

Post a Comment

Posted on  November 23, 2005 Continued to help several users with connecting to the new Controller Clearquest Database for Vinh...