twitter/bootstrap — pull request #6546 by huannh (2013-01-11 16:02:23+00:00)
Title: 3.0.0 wip - fixed the issue in which the test pid isn't killed if a test fails

Tested on MacOSX 10.6
Reproducible process:
1. Write a test that will fails
2. Run make test

See the log below at the bold line. The command *kill -9 `cat js/tests/pid.txt`* didn't run after the test failed.

Noted: for a shorter log, I only run the test cases in bootstrap-tooltip.

/code/opensource/bootstrap$ make test
jshint js/*.js --config js/.jshintrc
jshint js/tests/unit/*.js --config js/.jshintrc
node js/tests/server.js &
phantomjs js/tests/phantom.js "http://localhost:3000/js/tests"
Starting test suite
================================================

✔ All tests passed in 'bootstrap-tooltip' module

================================================
Tests completed in 1078 milliseconds
27 tests of 27 passed, 0 failed.
kill -9 `cat js/tests/pid.txt`
rm js/tests/pid.txt
/code/opensource/bootstrap$ make test
jshint js/*.js --config js/.jshintrc
jshint js/tests/unit/*.js --config js/.jshintrc
node js/tests/server.js &
phantomjs js/tests/phantom.js "http://localhost:3000/js/tests"
Starting test suite
================================================

✖ 1 tests failed in 'bootstrap-tooltip' module

================================================
Tests completed in 1075 milliseconds
**27 tests of 28 passed, 1 failed.
make: *** [test] Error 1
/code/opensource/bootstrap$ make test**
jshint js/*.js --config js/.jshintrc
jshint js/tests/unit/*.js --config js/.jshintrc
node js/tests/server.js &
phantomjs js/tests/phantom.js "http://localhost:3000/js/tests"

events.js:66
throw arguments[1]; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:768:11)
at Server._listen2 (net.js:908:14)
at listen (net.js:935:10)
at Server.listen (net.js:984:5)
at Object. (/code/opensource/bootstrap/js/tests/server.js:12:24)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)
Starting test suite
================================================

✖ 1 tests failed in 'bootstrap-tooltip' module

================================================
Tests completed in 1066 milliseconds
27 tests of 28 passed, 1 failed.
make: *** [test] Error 1