Statistics counters are otherwise never incremented on fatal errors.
char* compiler = find_executable(ctx, base.c_str(), MYNAME);
if (!compiler) {
- stats_update(ctx, STATS_COMPILER);
fatal("Could not find compiler \"%s\" in PATH", base.c_str());
}
if (str_eq(compiler, argv[0])) {
TEST "Couldn't find the compiler"
$CCACHE blahblah -c test1.c 2>/dev/null
- expect_stat "couldn't find the compiler" 1
+ exit_code=$?
+ if [ $exit_code -ne 1 ]; then
+ test_failed "Expected exit code to be 1, actual value $exit_code"
+ fi
# -------------------------------------------------------------------------
TEST "Bad compiler arguments"