908 Commits

Author SHA1 Message Date
Joel Rosdahl
3c314f42ce Put feature macro configuration stuff in a separate file 2010-07-18 10:54:43 +02:00
Joel Rosdahl
187817a707 Remove now unused x_asprintf() 2010-07-17 23:06:19 +02:00
Joel Rosdahl
b9f00885f8 Use format() instead of x_asprintf() 2010-07-17 23:05:59 +02:00
Joel Rosdahl
fa618764c7 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.
2010-07-17 22:53:34 +02:00
Joel Rosdahl
8005f7a243 Add a function that formats a string in a handier way than x_asprintf 2010-07-17 22:51:29 +02:00
Joel Rosdahl
97b2778196 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.
2010-07-17 19:26:39 +02:00
Joel Rosdahl
22ba5db1d4 Refactor cc_process_args to free stripped_args correctly when returning 2010-07-17 19:20:10 +02:00
Joel Rosdahl
4bda6c9ac8 Add suite for testing the processing of compiler arguments 2010-07-17 19:12:23 +02:00
Joel Rosdahl
5271039bd2 Add cct_create_file function 2010-07-17 19:10:56 +02:00
Joel Rosdahl
7e1a65e28c Run each test case in a separate directory for isolation 2010-07-17 19:10:42 +02:00
Joel Rosdahl
0aee1a3498 Allow argument to args_free() to be NULL 2010-07-17 19:08:40 +02:00
Joel Rosdahl
987374646a Print nicer progress messages for verbose tests 2010-07-17 18:52:20 +02:00
Joel Rosdahl
4e07d0ea7d Implement args_extend function 2010-07-17 18:49:12 +02:00
Joel Rosdahl
d907a7c966 Fix off-by-one error in args_to_string 2010-07-17 18:32:02 +02:00
Joel Rosdahl
2d590e3ca5 Let configure figure out which test suites to include 2010-07-17 18:32:02 +02:00
Joel Rosdahl
ca8330398f Get rid of the ARGS typedef; use struct args explicitly 2010-07-17 18:31:56 +02:00
Joel Rosdahl
3d613aa587 Use strcmp == 0 instead of !strcmp 2010-07-17 16:51:55 +02:00
Joel Rosdahl
204b72d5c5 Remove redundant continue 2010-07-17 12:39:30 +02:00
Joel Rosdahl
1e306da1fa Print correct singular/plural forms in test framework output 2010-07-17 12:15:42 +02:00
Joel Rosdahl
670670ed71 Correct number of failed suites 2010-07-17 12:07:03 +02:00
Joel Rosdahl
050d58c306 Portability: Don't use make variable $^ 2010-07-17 12:05:47 +02:00
Joel Rosdahl
450e475bd2 Avoid using intptr_t on non-win32 systems since it may not be defined 2010-07-17 11:58:06 +02:00
Joel Rosdahl
6b3f0b643c 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
2010-07-16 22:46:03 +02:00
Joel Rosdahl
86d6a5d7cb Link test/main with local zlib if needed 2010-07-16 22:37:04 +02:00
Joel Rosdahl
7f5d5a39b9 Correctly find suites.h in out-of-source builds 2010-07-16 22:31:08 +02:00
Ramiro Polla
d06c5fd048 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.
2010-07-16 16:57:42 -03:00
Ramiro Polla
fc1cd8c5c8 Do not misuse long to cast a pointer 2010-07-16 16:57:00 -03:00
Ramiro Polla
4d7b4810bd Win32 support 2010-07-16 16:56:43 -03:00
Ramiro Polla
3a442eb97b Implement is_full_path() helper function 2010-07-16 16:54:14 -03:00
Joel Rosdahl
fa933d884d Portability: Don't use the $(var:%=%) construction
Sadly, it seems to not work with some makes, e.g. on HP-UP.
2010-07-16 18:16:49 +02:00
Joel Rosdahl
06fbca2650 Compensate for false increase in first TEST expansion 2010-07-16 18:12:14 +02:00
Joel Rosdahl
d4cb1d7daf Fix negation errors in CHECK_*_EQ macros 2010-07-16 18:11:55 +02:00
Joel Rosdahl
a4d44f1eb9 Correctly find ccache.h from test_util.c 2010-07-16 18:02:13 +02:00
Joel Rosdahl
977253bc89 Use tcgetattr() instead of ioctl() for portability 2010-07-16 17:45:54 +02:00
Joel Rosdahl
755eaafad9 Correctly find getopt_long.h from subdir source file 2010-07-16 17:40:45 +02:00
Joel Rosdahl
dcfd19e363 Fix creation of test/suites.h in out-of-source builds 2010-07-16 17:38:59 +02:00
Joel Rosdahl
f7cd699be7 No need for distcheck to run test since installcheck does it all 2010-07-16 17:38:15 +02:00
Joel Rosdahl
aa1e6b531f 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.
2010-07-16 17:37:30 +02:00
Joel Rosdahl
a996b5dd1b Let installcheck run unit tests as well 2010-07-16 17:27:38 +02:00
Joel Rosdahl
8809f726ab 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
2010-07-16 17:08:15 +02:00
Joel Rosdahl
2bacab3f92 Use semicolon as the CCACHE_EXTRAFILES path separator on Windows 2010-07-16 16:56:48 +02:00
Ramiro Polla
41fc0ed3e2 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.
2010-07-16 16:22:56 +02:00
Ramiro Polla
36dff81451 Use a temporary file for sed_in_place() 2010-07-16 16:22:01 +02:00
Ramiro Polla
f38e9f397a Add a define for path delimiter 2010-07-16 16:19:54 +02:00
Ramiro Polla
0bdaeb12a0 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.
2010-07-16 16:17:37 +02:00
Ramiro Polla
6014657219 Implement compare_executable_name() helper function 2010-07-16 16:03:00 +02:00
Ramiro Polla
82b7876473 Implement is_absolute_path() helper function 2010-07-16 16:01:02 +02:00
Ramiro Polla
d325739040 Close manifest files after reading/writing them 2010-07-16 15:59:59 +02:00
Ramiro Polla
3cd699042a 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.
2010-07-16 15:51:59 +02:00
Ramiro Polla
b37137c514 Close file opened with gzdopen() 2010-07-16 15:50:19 +02:00