close(fd_result);
unlink(cpp_stderr);
free(cpp_stderr);
+ cpp_stderr = NULL;
}
if (status != 0) {
i_tmpfile = NULL;
}
+ /* Delete the cpp stderr file if necessary. */
+ if (cpp_stderr) {
+ unlink(cpp_stderr);
+ free(cpp_stderr);
+ cpp_stderr = NULL;
+ }
+
/* Send the stderr, if any. */
fd_stderr = open(stderr_file, O_RDONLY | O_BINARY);
if (fd_stderr != -1) {
run_suite() {
echo "starting testsuite $1"
testsuite=$1
+
${1}_suite
+
+ testname="the tmp directory should be empty"
+ if [ "`find $CCACHE_DIR/tmp -type f | wc -l`" -gt 0 ]; then
+ test_failed "$CCACHE_DIR/tmp is not empty"
+ fi
}
base_tests() {