free(p);
}
- char* cwd = gnu_getcwd();
+ char* cwd = get_cwd();
// Bytes between p and q are pending to be hashed.
char* p = data;
// Possibly hash the current working directory.
if (args_info.generating_debuginfo && g_config.hash_dir()) {
- char* cwd = gnu_getcwd();
+ char* cwd = get_cwd();
for (size_t i = 0; i < args_info.debug_prefix_maps_len; i++) {
char* map = args_info.debug_prefix_maps[i];
char* sep = strchr(map, '=');
# A simple test suite for ccache.
#
# Copyright (C) 2002-2007 Andrew Tridgell
-# Copyright (C) 2009-2019 Joel Rosdahl and other contributors
+# Copyright (C) 2009-2020 Joel Rosdahl and other contributors
#
# See doc/AUTHORS.adoc for a complete list of contributors.
#
cd /
remove_cache
- rm -rf $ABS_TESTDIR/run
- mkdir $ABS_TESTDIR/run
+ rm -rf $ABS_TESTDIR/run $ABS_TESTDIR/run.real
+
+ # Verify that tests behave well when apparent CWD != actual CWD.
+ mkdir $ABS_TESTDIR/run.real
+ ln -s run.real $ABS_TESTDIR/run
+
cd $ABS_TESTDIR/run
if type SUITE_${suite_name}_SETUP >/dev/null 2>&1; then
SUITE_${suite_name}_SETUP