]>
git.ipfire.org Git - thirdparty/ccache.git/log
Joel Rosdahl [Wed, 4 Aug 2010 15:03:17 +0000 (17:03 +0200)]
Spell Ville Skyttä's name correctly
Joel Rosdahl [Wed, 4 Aug 2010 11:09:55 +0000 (13:09 +0200)]
Update license for mdfour.c to GPLv3+
Joel Rosdahl [Wed, 4 Aug 2010 09:03:40 +0000 (11:03 +0200)]
Make reading and writing of statistics counters forward-compatible
Previously, ccache threw away counters values it didn't know about, i.e., new
counters coming from later ccache versions.
Joel Rosdahl [Wed, 4 Aug 2010 08:39:02 +0000 (10:39 +0200)]
Explicitly set values of enum stats since they are important
Joel Rosdahl [Tue, 3 Aug 2010 21:09:16 +0000 (23:09 +0200)]
Move read_file from test/util.c to util.c
Joel Rosdahl [Tue, 3 Aug 2010 15:27:41 +0000 (17:27 +0200)]
Isolate knowledge of the counters data structure to stats.c
Joel Rosdahl [Tue, 3 Aug 2010 15:16:38 +0000 (17:16 +0200)]
Fold stats_read_fd() into stats_read()
Joel Rosdahl [Tue, 3 Aug 2010 15:14:01 +0000 (17:14 +0200)]
Use stats_read() instead of stats_read_fd()
Joel Rosdahl [Mon, 2 Aug 2010 22:17:57 +0000 (00:17 +0200)]
testfw: Format code to use a more consistent coding style
Joel Rosdahl [Mon, 2 Aug 2010 22:17:26 +0000 (00:17 +0200)]
testfw: Declare all variables before the first statement
Joel Rosdahl [Mon, 2 Aug 2010 20:16:22 +0000 (22:16 +0200)]
Extract calculation of the maximum path length into a local function
This also fixes a bug in x_readlink where maxlen was unsigned, which leads to
problems when pathconf() returns -1.
Joel Rosdahl [Mon, 2 Aug 2010 20:06:30 +0000 (22:06 +0200)]
No need to compile x_readlink on win32
Joel Rosdahl [Mon, 2 Aug 2010 18:57:36 +0000 (20:57 +0200)]
When crashing of out-of-memory in x_*alloc, print wanted allocation size
Joel Rosdahl [Mon, 2 Aug 2010 18:29:24 +0000 (20:29 +0200)]
Format code to use a more consistent coding style
Joel Rosdahl [Mon, 2 Aug 2010 13:47:46 +0000 (15:47 +0200)]
Add missing MANUAL.txt in dist archives
Joel Rosdahl [Mon, 2 Aug 2010 13:46:59 +0000 (15:46 +0200)]
Remove *.tar.bz2 and *.tar.gz when cleaning
Joel Rosdahl [Mon, 2 Aug 2010 09:55:26 +0000 (11:55 +0200)]
Add missing test/util.h to dist archives
Joel Rosdahl [Mon, 2 Aug 2010 09:42:55 +0000 (11:42 +0200)]
make: Remove left-over rules already moved to dev.mk.in
Joel Rosdahl [Mon, 2 Aug 2010 09:41:52 +0000 (11:41 +0200)]
General overhaul of license and copyright information
The GPL license text is now located in GPLv3.txt. LICENSE.txt contains licenses
and copyright information for all bundled files from other sources and
AUTHORS.txt lists all contributors (taken from "git log").
At the same time, manual.txt was renamed to MANUAL.txt for consistency reasons.
Joel Rosdahl [Sun, 1 Aug 2010 16:20:01 +0000 (18:20 +0200)]
testfw: Print passed assertions in verbose mode
Joel Rosdahl [Sun, 1 Aug 2010 16:15:09 +0000 (18:15 +0200)]
testfw: Fix format string in cct_check_failed()
Joel Rosdahl [Sun, 1 Aug 2010 08:47:52 +0000 (10:47 +0200)]
Format code to use a more consistent coding style
Joel Rosdahl [Sun, 1 Aug 2010 14:32:16 +0000 (16:32 +0200)]
Use newline instead of space as separator for stats values
This is a backward-compatible change and makes the content somewhat easier
to inspect when debugging.
Joel Rosdahl [Sun, 1 Aug 2010 14:07:42 +0000 (16:07 +0200)]
win32: Implement lockfile primitives
Totally not tested on Windows yet.
Joel Rosdahl [Sun, 1 Aug 2010 14:06:09 +0000 (16:06 +0200)]
Use lock files instead of POSIX locks when writing stats files
When writing a stats file, locking is now done by atomically creating a
symlink with lockfile_acquire() instead of locking with fcntl(). Updating
of the stats file while holding the lock is done using the
rename-into-place idiom since the lock may be intentionally broken by
another process, and if that happens, there should be no file corruption,
only lost information.
The major reason for the change is to be more robust against badly
implemented or configured network filesystems (e.g. NFS) where POSIX locks
may be broken in different ways.
Joel Rosdahl [Sun, 1 Aug 2010 13:57:54 +0000 (15:57 +0200)]
Don't use locks for reading/writing the manifest from/to disk
Since the rename-into-place idiom is already used, a race between two
processes will only result in one lost entry, which is not a big deal, and
it's also very unlikely.
Joel Rosdahl [Sun, 1 Aug 2010 13:55:49 +0000 (15:55 +0200)]
Implement file locking primitives
Windows support is not yet done.
Joel Rosdahl [Sun, 1 Aug 2010 12:08:42 +0000 (14:08 +0200)]
Add x_readlink() utility function
Joel Rosdahl [Sun, 1 Aug 2010 12:08:01 +0000 (14:08 +0200)]
testfw: Add read_file() utility function
Joel Rosdahl [Sun, 1 Aug 2010 12:07:27 +0000 (14:07 +0200)]
testfw: Handle CHECK(pointer) correctly
Joel Rosdahl [Sun, 1 Aug 2010 12:06:43 +0000 (14:06 +0200)]
testfw: Set cache_logfile before running each test case
Joel Rosdahl [Sun, 1 Aug 2010 12:03:23 +0000 (14:03 +0200)]
Stop loop in stats_flush() when possible
Joel Rosdahl [Sun, 1 Aug 2010 12:00:22 +0000 (14:00 +0200)]
perf: Add --nostats option
Joel Rosdahl [Fri, 30 Jul 2010 20:25:16 +0000 (22:25 +0200)]
Introduce and use function-like macros str_eq() and str_startswith()
Joel Rosdahl [Fri, 30 Jul 2010 19:50:05 +0000 (21:50 +0200)]
test: Fix failing dash_E_should_be_unsupported test
Joel Rosdahl [Fri, 30 Jul 2010 19:49:33 +0000 (21:49 +0200)]
Introduce cc_reset(), enabling the test suite to reset global state
Joel Rosdahl [Fri, 30 Jul 2010 19:48:28 +0000 (21:48 +0200)]
Plug some minor memory leaks
Joel Rosdahl [Sun, 25 Jul 2010 09:02:57 +0000 (11:02 +0200)]
testfw: Add some utility functions
Joel Rosdahl [Sun, 25 Jul 2010 08:54:52 +0000 (10:54 +0200)]
Update recommendations for combining ccache with other compiler wrappers
Joel Rosdahl [Wed, 21 Jul 2010 13:15:42 +0000 (15:15 +0200)]
Introduce x_rename(), which unlink()s destination if necessary before rename()
Joel Rosdahl [Tue, 20 Jul 2010 22:13:39 +0000 (00:13 +0200)]
Always update a stats file in a subdirectory to reduce lock contention
Joel Rosdahl [Tue, 20 Jul 2010 22:12:17 +0000 (00:12 +0200)]
Add hash_from_int function
Joel Rosdahl [Tue, 20 Jul 2010 22:12:02 +0000 (00:12 +0200)]
Code formatting cleanup
Joel Rosdahl [Tue, 20 Jul 2010 21:58:40 +0000 (23:58 +0200)]
test framework: Restore CWD to be able to wipe temporary directory after test
Ramiro [Mon, 19 Jul 2010 22:15:38 +0000 (19:15 -0300)]
win32: Add a space between filename and error string in x_fmmap()
Ramiro [Mon, 19 Jul 2010 22:13:46 +0000 (19:13 -0300)]
win32: _localtime32() should only be used with mingw-w64
Joel Rosdahl [Mon, 19 Jul 2010 09:54:02 +0000 (11:54 +0200)]
Ignore .nfs* files when cleaning up
Such files are left by an NFS server for open but deleted files and will
thus mess up ccache's "files in cache" counter if not ignored.
Joel Rosdahl [Mon, 19 Jul 2010 09:52:14 +0000 (11:52 +0200)]
Extract common exit code in cleanup.c's traverse_fn()
Joel Rosdahl [Sun, 18 Jul 2010 09:03:17 +0000 (11:03 +0200)]
Add comments about which files declarations in ccache.h belong to
Joel Rosdahl [Sun, 18 Jul 2010 08:54:43 +0000 (10:54 +0200)]
Put feature macro configuration stuff in a separate file
Joel Rosdahl [Sat, 17 Jul 2010 21:06:19 +0000 (23:06 +0200)]
Remove now unused x_asprintf()
Joel Rosdahl [Sat, 17 Jul 2010 21:05:59 +0000 (23:05 +0200)]
Use format() instead of x_asprintf()
Joel Rosdahl [Sat, 17 Jul 2010 20:53:34 +0000 (22:53 +0200)]
Verify that test (suite) names are valid C identifiers
Two reasons: 1. We may want to use the test names as identifiers in the
future. 2. We can safely create and remove directories with such names.
Joel Rosdahl [Sat, 17 Jul 2010 20:51:29 +0000 (22:51 +0200)]
Add a function that formats a string in a handier way than x_asprintf
Joel Rosdahl [Sat, 17 Jul 2010 17:26:39 +0000 (19:26 +0200)]
Only pass dependency arguments to the preprocessor
This should fix a problem with Intel's C++ compiler, which doesn't produce a
correct .d file when compiling preprocessed source. This way, the .d file
is kept from the preprocessor run.
Joel Rosdahl [Sat, 17 Jul 2010 17:20:10 +0000 (19:20 +0200)]
Refactor cc_process_args to free stripped_args correctly when returning
Joel Rosdahl [Sat, 17 Jul 2010 17:12:23 +0000 (19:12 +0200)]
Add suite for testing the processing of compiler arguments
Joel Rosdahl [Sat, 17 Jul 2010 17:10:56 +0000 (19:10 +0200)]
Add cct_create_file function
Joel Rosdahl [Sat, 17 Jul 2010 17:10:42 +0000 (19:10 +0200)]
Run each test case in a separate directory for isolation
Joel Rosdahl [Sat, 17 Jul 2010 17:08:40 +0000 (19:08 +0200)]
Allow argument to args_free() to be NULL
Joel Rosdahl [Sat, 17 Jul 2010 16:52:20 +0000 (18:52 +0200)]
Print nicer progress messages for verbose tests
Joel Rosdahl [Sat, 17 Jul 2010 16:49:12 +0000 (18:49 +0200)]
Implement args_extend function
Joel Rosdahl [Sat, 17 Jul 2010 16:19:56 +0000 (18:19 +0200)]
Fix off-by-one error in args_to_string
Joel Rosdahl [Sat, 17 Jul 2010 15:06:02 +0000 (17:06 +0200)]
Let configure figure out which test suites to include
Joel Rosdahl [Sat, 17 Jul 2010 14:58:55 +0000 (16:58 +0200)]
Get rid of the ARGS typedef; use struct args explicitly
Joel Rosdahl [Sat, 17 Jul 2010 14:51:55 +0000 (16:51 +0200)]
Use strcmp == 0 instead of !strcmp
Joel Rosdahl [Sat, 17 Jul 2010 10:39:30 +0000 (12:39 +0200)]
Remove redundant continue
Joel Rosdahl [Sat, 17 Jul 2010 10:15:42 +0000 (12:15 +0200)]
Print correct singular/plural forms in test framework output
Joel Rosdahl [Fri, 16 Jul 2010 21:01:39 +0000 (23:01 +0200)]
Correct number of failed suites
Joel Rosdahl [Sat, 17 Jul 2010 10:05:47 +0000 (12:05 +0200)]
Portability: Don't use make variable $^
Joel Rosdahl [Sat, 17 Jul 2010 09:58:06 +0000 (11:58 +0200)]
Avoid using intptr_t on non-win32 systems since it may not be defined
Joel Rosdahl [Fri, 16 Jul 2010 20:46:03 +0000 (22:46 +0200)]
Merge remote branch 'polla/master'
* polla/master:
Use _localtime32() instead of localtime() on Windows
Do not misuse long to cast a pointer
Win32 support
Implement is_full_path() helper function
Joel Rosdahl [Fri, 16 Jul 2010 20:36:35 +0000 (22:36 +0200)]
Link test/main with local zlib if needed
Joel Rosdahl [Fri, 16 Jul 2010 20:31:08 +0000 (22:31 +0200)]
Correctly find suites.h in out-of-source builds
Ramiro Polla [Fri, 16 Jul 2010 19:57:42 +0000 (16:57 -0300)]
Use _localtime32() instead of localtime() on Windows
The gettimeofday() function provided by libmingwex.a hasn't been implemented
for 64-bit yet, so the data it returns should always be passed to the 32-bit
localtime function.
Ramiro Polla [Fri, 16 Jul 2010 19:57:00 +0000 (16:57 -0300)]
Do not misuse long to cast a pointer
Ramiro Polla [Fri, 16 Jul 2010 19:56:43 +0000 (16:56 -0300)]
Win32 support
Ramiro Polla [Fri, 16 Jul 2010 19:54:14 +0000 (16:54 -0300)]
Implement is_full_path() helper function
Joel Rosdahl [Fri, 16 Jul 2010 16:16:49 +0000 (18:16 +0200)]
Portability: Don't use the $(var:%=%) construction
Sadly, it seems to not work with some makes, e.g. on HP-UP.
Joel Rosdahl [Fri, 16 Jul 2010 16:12:14 +0000 (18:12 +0200)]
Compensate for false increase in first TEST expansion
Joel Rosdahl [Fri, 16 Jul 2010 16:11:55 +0000 (18:11 +0200)]
Fix negation errors in CHECK_*_EQ macros
Joel Rosdahl [Fri, 16 Jul 2010 16:02:13 +0000 (18:02 +0200)]
Correctly find ccache.h from test_util.c
Joel Rosdahl [Fri, 16 Jul 2010 15:45:54 +0000 (17:45 +0200)]
Use tcgetattr() instead of ioctl() for portability
Joel Rosdahl [Fri, 16 Jul 2010 15:19:39 +0000 (17:19 +0200)]
Correctly find getopt_long.h from subdir source file
Joel Rosdahl [Fri, 16 Jul 2010 15:38:59 +0000 (17:38 +0200)]
Fix creation of test/suites.h in out-of-source builds
Joel Rosdahl [Fri, 16 Jul 2010 15:38:15 +0000 (17:38 +0200)]
No need for distcheck to run test since installcheck does it all
Joel Rosdahl [Fri, 16 Jul 2010 15:37:30 +0000 (17:37 +0200)]
Fix out-of-source builds by adding -I$(srcdir)
This is needed when source files in subdirs need to include headers in the top
dir.
Joel Rosdahl [Fri, 16 Jul 2010 15:27:38 +0000 (17:27 +0200)]
Let installcheck run unit tests as well
Joel Rosdahl [Fri, 16 Jul 2010 15:08:15 +0000 (17:08 +0200)]
Merge branch 'unittest'
* unittest:
Regenerate test/suites.h on Makefile updates
Add CHECK macros for ARGS
Improve CHECK_{STR,UNS,INT}_EQ macros
Let basedir("foo") return "."
Add framework for tests written in C
Split the main function into a separate compilation unit
Simplify getopt_long() usage
Add args_init_from_string function
Add stats_get_pending() function
Include all dependency files in .deps to make it work with sources in subdirs
Conflicts:
configure.ac
Joel Rosdahl [Fri, 16 Jul 2010 14:56:48 +0000 (16:56 +0200)]
Use semicolon as the CCACHE_EXTRAFILES path separator on Windows
Ramiro Polla [Thu, 15 Jul 2010 19:08:20 +0000 (16:08 -0300)]
Allow testsuite to run on Windows
The equivalent to /dev/null on Windows is NUL. The basedir test suite doesn't
work since gcc on windows gives absolute paths for all files. The link test
suite doesn't work on MSYS since it does not support symlinks with ln -s.
Ramiro Polla [Thu, 15 Jul 2010 18:49:44 +0000 (15:49 -0300)]
Use a temporary file for sed_in_place()
Ramiro Polla [Thu, 15 Jul 2010 18:48:10 +0000 (15:48 -0300)]
Add a define for path delimiter
Ramiro Polla [Thu, 15 Jul 2010 18:38:23 +0000 (15:38 -0300)]
Clear exit_functions after the exit functions have been called
While execve() does not run the functions registered with atexit() and they
must therefore be called explicitly prior to the call to execve(), the Windows
replacement function will end up running the atexit() hooks twice, and
clearing the pointer prevents the functions from actually running twice.
Ramiro Polla [Thu, 15 Jul 2010 18:18:34 +0000 (15:18 -0300)]
Implement compare_executable_name() helper function
Ramiro Polla [Thu, 15 Jul 2010 18:05:22 +0000 (15:05 -0300)]
Implement is_absolute_path() helper function
Ramiro Polla [Thu, 15 Jul 2010 17:54:11 +0000 (14:54 -0300)]
Close manifest files after reading/writing them
Ramiro Polla [Thu, 15 Jul 2010 17:43:32 +0000 (14:43 -0300)]
x_strdup() path in find_executable_in_path() instead of in find_executable()
find_executable_in_path() now only frees the memory it has allocated itself.
Ramiro Polla [Thu, 15 Jul 2010 17:39:45 +0000 (14:39 -0300)]
Close file opened with gzdopen()
Ramiro Polla [Thu, 15 Jul 2010 17:38:13 +0000 (14:38 -0300)]
Introduce and use x_fmmap() and x_munmap()
x_fmmap() opens, stats, and mmap()s a file. x_munmap() is currently just a
wrapper around munmap().