No need to make a failure when running the compiler check fatal since
other misconfigured settings can have a similar effect without resulting
in fatal errors.
bool ok = hash_multicommand_output(
ctx, hash, ctx.config.compiler_check().c_str(), ctx.orig_args->argv[0]);
if (!ok) {
- fatal("Failure running compiler check command: %s",
- ctx.config.compiler_check().c_str());
+ cc_log("Failure running compiler check command: %s",
+ ctx.config.compiler_check().c_str());
+ failed();
}
}
}
chmod +x compiler.sh
CCACHE_COMPILERCHECK="unknown_command" $CCACHE ./compiler.sh -c test1.c 2>/dev/null
- if [ "$?" -eq 0 ]; then
- test_failed "Expected failure running unknown_command to verify compiler but was success"
- fi
expect_stat 'compiler check failed' 1
# -------------------------------------------------------------------------