Exit with error code if compilation or running of tests fails