Commit Graph

92 Commits

Author SHA1 Message Date
Jim Meyering
ea54b6f47c tests: allow to run Perl tests more cleanly
Before this change, perl tests were run via a #!/bin/sh script
in which perl was invoked via $(PERL) ... -- - <<\EOF.
That made some stty tests fail due to the way stdin was usurped.
* build-aux/check.mk (am__check_pre): Don't append $(SHELL) to this
nominally automake-internal variable.
* tests/check.mk (TESTS_ENVIRONMENT): Instead, define a shell function
here, and append it to the more user-visible $(TESTS_ENVIRONMENT).
2008-05-16 10:10:34 +02:00
Jim Meyering
32b84c9c90 tests: save and restore TERM around use of TESTS_ENVIRONMENT,
now that TESTS_ENVIRONMENT unsets it.
* check.mk (am__check_pre): Save $TERM.
(am__check_post): Restore saved value of TERM and export.
2008-05-06 08:21:30 +02:00
Jim Meyering
5a3b0c4805 tests: remove temporary log file upon catchable signal
* check.mk (am__check_pre): Add signal handler to remove $@-t.
2008-04-27 21:31:33 +02:00
Jim Meyering
d80aaca2da Use a better dirname emulation.
* build-aux/check.mk (_dirname): Define.
(am__check_pre): Use it.
2008-02-10 13:52:47 +01:00
Jim Meyering
48b9ff8555 Avoid test failure when run with risky PATH ("." before /usr/bin).
* build-aux/check.mk (approx_dirname_filter): Define.
(am__check_pre): Emulate dirname using sed.
Report and suggested fix from Bruno Haible in
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/12587/focus=12590
2008-02-10 11:26:57 +01:00
Jim Meyering
b0823fb415 * build-aux/.gitignore: Remove file from version control. It's generated.
Signed-off-by: Jim Meyering <meyering@redhat.com>
2008-02-10 10:53:24 +01:00
Jim Meyering
9a0b4599c7 Pull vc-list-files from gnulib.
* bootstrap.conf (gnulib_modules): Add vc-list-files.
* build-aux/vc-list-files: Remove file.
2008-01-31 12:17:07 +01:00
Jim Meyering
d2e298b45d Remove each output redirection target before writing to it.
* tests/check.mk (vc_exe_in_TESTS): Remove t1 and t2 _first_,
in case they exist beforehand and are not writable.
* build-aux/check.mk (am__check_pre): Likewise, remove $@-t.
2008-01-13 12:47:42 +01:00
Ralf Wildenhues
d7ed3bcb8d Define `tst', for CU_TEST_NAME.
* build-aux/check.mk (am__check_pre): Set `tst', for
CU_TEST_NAME in tests/check.mk.
2007-11-30 10:25:09 +01:00
Jim Meyering
1379ed974f Port to Solaris 'make' and use a Posixish shell on Solaris.
* bootstrap.conf (gnulib_modules): Add gnu-make, posix-shell.
* build-aux/check.mk (SHELL): Set to $(PREFERABLY_POSIX_SHELL),
so that commands can assume Posix syntax.
(ENABLE_HARD_ERRORS, TEST_LOGS): Don't use GNU Make's "?=" syntax.
(SH_E_WORKAROUND): New macro.
(am__check_pre, $(TEST_SUITE_LOG)): Use it.
(am__check_pre): Fail if "mkdir" fails.  Use $(SHELL)
rather than relying on the "#!/bin/sh" in the file, so that tests
can use Posix syntax.
(am__check_pre, am__tty_colors): Use $$src rather than $$<, to
support the Posix-make $(TEST_LOGS) rule.
(%.log: %.test, %.log: %$(EXEEXT)): Remove unused inference rules
that rely on a GNU Make extension and cause Solaris 'make' to fail.
(SUFFIXES): New macro, so that we can use Posix style inference rules.
(%.log: %): Use this rule only if GNU_MAKE.
Set $$src so that macros can use $$src rather than $$<.
(CHECK-FORCE, DEPENDENCY, $(TEST_LOGS)): New macros and rules,
which rely only on Posix 'make' semantics, and are used only with
non-GNU 'make' implementations.  $(TEST_LOGS) invokes 'make'
recursively (and a bit inefficiently) to simulate the GNU 'make'
rules.
(.log.html): Renamed from "%.html: %.log", so that it relies only
on Posix 'make' semantics.
(check-clean, .PHONY): Do not depend on check-clean-local, since
Solaris 'make' complains about nonexistent rules like that.
* src/Makefile.am (SUFFIXES): Remove; no longer needed.
(groups): Use a specific rule rather than an inference rule that
is only instantiated once.  The inference-rule approach does not
work with Solaris 'make', which gets confused by the "groups:
Makefile" line.  It's not clear from the Posix spec that Solaris
'make' is buggy here, so instead of worrying about it, rewrite
the makefile so that it clearly conforms to Posix.
* tests/check.mk (TESTS_ENVIRONMENT): Export PACKAGE_BUGREPORT.
GNU 'make' does this automatically for us, but Solaris 'make'
doesn't.

2007-11-15  Paul Eggert  <eggert@cs.ucla.edu>
2007-11-16 11:03:03 +01:00
Jim Meyering
b8da93bee9 Get git-version-gen from gnulib.
* build-aux/git-version-gen: Remove file.
* build-aux/.gitignore: Add git-version-gen.
* bootstrap.conf (gnulib_modules): Add git-version-gen.
2007-11-05 08:31:51 +01:00
Jim Meyering
4c9b376271 git-version-gen: Sync from autoconf's version.
* build-aux/git-version-gen: Run git-status
2007-11-03 22:52:33 +01:00
Jim Meyering
ae559eabcd Sync copyright and scriptversion bits from gnulib.
* build-aux/git-version-gen: No semantic change.
2007-11-03 18:04:40 +01:00
Jim Meyering
8beb69b148 Change the first '-' to '.' in the snapshot version string,
e.g., 6.9-377-08144 -> 6.9.377-08144
* build-aux/git-version-gen: ... and add comments.
2007-11-03 17:46:42 +01:00
Bob Proulx
b8e8d02861 Improve color terminal escape usage.
* build-aux/check.mk (am__tty_colors): Use 'tput' to deduce
terminal color capabilities.
2007-10-29 05:10:23 -06:00
Jim Meyering
b63b1b4ce2 Don't try to colorize a dumb terminal.
* build-aux/check.mk (am__tty_colors): Skip colors if $TERM is "dumb".
Thanks to Bob Proulx.
2007-10-29 10:37:09 +01:00
Jim Meyering
cb75780b50 Remove spurious semicolon after "else".
* build-aux/check.mk (am__tty_colors): Fix syntax error.
2007-10-29 10:01:25 +01:00
Jim Meyering
89157ad207 If $TERM is empty, don't use colors. This helps the buildbot,
since it produces its result in an environment with a tty, but
we don't want color codes in that case.
* build-aux/check.mk (am__tty_colors): Test for nonempty $TERM.
2007-10-29 09:47:52 +01:00
Jim Meyering
973d42b90d Always initialize terminal colorization string variables.
* build-aux/check.mk (am__tty_colors): Always initialize red, grn, etc.,
In case they're defined in the environment.
2007-10-29 08:41:08 +01:00
Jim Meyering
5d9cb87197 * build-aux/check.mk: Merge with latest from Akim. 2007-10-27 09:04:47 +02:00
Jim Meyering
433a31d3dc Remove git-version-gen's first parameter.
* build-aux/git-version-gen: Add comments.
Remove first command-line parameter.
* configure.ac: Remove corresponding first argument.
* GNUmakefile (_curr-ver): Likewise.
2007-10-22 21:43:12 +02:00
Eric Blake
17f0d568d3 Fix testsuite on cygwin.
* check.mk (%.log): Also allow suffix-less tests, on platforms
where $(EXEEXT) is not empty.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-09-30 09:40:26 +02:00
Jim Meyering
d96a863cf5 Enable some previously omitted test scripts. Add a test cross-check.
* tests/rm/Makefile.am (TESTS): Add empty-name and unreadable.
* tests/rm/empty-name: Likewise.
* tests/rm/unreadable: Reenable this test.  Adjust for new rm.
* tests/mkdir/Makefile.am: Add writable-under-readonly.
* tests/mkdir/writable-under-readonly: Add some comments.
This test is always skipped, for now.
* tests/Makefile.am (ta): Hook up the new root-only script.
* tests/tail-2/infloop-1: Make this test pass.
* tests/tail-2/Makefile.am (TESTS): Add infloop-1.
* tests/tail-2/fflush: Remove unused file.
* tests/check.mk (vc_executable_is_in_TESTS): More portable.
* tests/check.mk (check): Depend on the above.
* build-aux/check.mk: Remove comment mentioning AUTHORS file.
2007-09-15 18:59:08 +02:00
Jim Meyering
c840cd4334 Parallel "make check" support.
* build-aux/check.mk: New file, from The Vaucanson Group.
* .x-sc_GPL_version: New file, to allow "version 2 or later"
in build-aux/check.mk.
* Makefile.am (EXTRA_DIST): Add .x-sc_GPL_version.
* tests/check.mk: New file.
* tests/Makefile.am (EXTRA_DIST): Add check.mk, mkdtemp and test-lib.sh.

Begin factoring "sample-test" out of test scripts.
* tests/test-lib.sh: New file, to be sourced by all tests that
were previously derived from the "sample-test" template.
* tests/mkdtemp: New file.
* tests/touch/dir-1: Use test-lib.sh.
* tests/touch/empty-file: Likewise.
* tests/touch/fail-diag: Likewise.
* tests/touch/fifo: Likewise.
* tests/touch/no-create-missing: Likewise.
* tests/touch/no-rights: Likewise.  Also, don't sleep.
* tests/touch/not-owner: Likewise.
* tests/touch/obsolescent: Likewise.
* tests/touch/read-only: Likewise.
* tests/touch/relative: Likewise.
* tests/touch/Makefile.am: Include $(top_srcdir)/tests/check.mk,
to get the parallel-"make check" bits.

Move a slow test into tests/misc.

* tests/check.mk: Wrapper.
* tests/ls/time-1: Move this file to tests/misc/ls-time.
* tests/misc/ls-time: New file.  From tests/ls/time-1.
* tests/ls/Makefile.am (TESTS): Remove time-1.
* tests/misc/Makefile.am (TESTS): Add ls-time.
2007-09-15 08:40:38 +02:00
Jim Meyering
7a6a30b8a2 Add support for parallel "make check" (in tests/misc, for now) 2007-09-15 08:40:38 +02:00
Jim Meyering
5c2f8101c5 * vc-list-files: Remove mercurial support.
Check for CVS first.  Adjust comments.
2007-09-15 08:39:53 +02:00
Jim Meyering
d0bd493a2a Don't change '-'s to '.'s in the string from git-describe.
* build-aux/git-version-gen: Leave '-'s in the string from git-describe.
Otherwise, s/-/./g would make it too hard to distinguish the base
version number from the appended .DD suffixes.

2007-09-03  Jim Meyering  <jim@meyering.net>
2007-09-03 10:38:22 +02:00
Jim Meyering
42a4957361 Shorten the snapshot version string by removing the "g".
* build-aux/git-version-gen: Remove git-describe's "g" that would
always precede the abbreviated SHA1.  Suggestion from Dmitry V. Levin.
2007-08-30 23:13:12 +02:00
Jim Meyering
bfe49f506f Make inter-release --version output more useful.
Now, each snapshot has a version "number" like 6.9-219-g58ddd,
which indicates that it is built using the 219th change set
(in _some_ repository) following the "v6.9" tag, and that 58ddd
is a prefix of the commit SHA1.
* build-aux/git-version-gen: New file.
* configure.ac: Run it to set the version.
* Makefile.am (dist-hook): Arrange so that .version appears only
in distribution tarballs, never in a checked-out repository.
* .gitignore: Add .version here, too.  Just in case.

Signed-off-by: Jim Meyering <jim@meyering.net>
2007-08-30 17:26:31 +02:00
Jim Meyering
6e3e819f4b Remove all .cvsignore files from version control. 2007-08-25 00:27:11 +02:00
Jim Meyering
71aa3ea880 Update all copyright notices to use the newer form. 2007-07-23 14:35:58 +02:00
Jim Meyering
33342c1a0a Change "version 2" to "version 3" in all copyright notices. 2007-07-10 13:35:56 +02:00
Jim Meyering
aeb892e592 Add to .cvsignore and .gitignore files. 2007-02-18 22:40:52 +01:00
Jim Meyering
82276cbd2e * vc-list-files: Select column 2, not 3 (hg-0.9.3's manifest format
now has only two columns).
2007-01-30 23:07:38 +01:00
Jim Meyering
8cafe0070a Add announce-gen to build-aux/.*ignore files. 2006-11-23 16:31:18 +01:00
Jim Meyering
dcf5b47708 * .gitignore: Remove some references to files in subdirectories.
* build-aux/.gitignore, doc/.gitignore, lib/.gitignore: New files.
* m4/.gitignore, po/.gitignore, src/.gitignore: Likewise.
2006-10-21 19:50:47 +00:00
Jim Meyering
34b35b1a3e [ChangeLog]
* Makefile.cfg: Remove cruft that's now handled via bootstrap.
* Makefile.maint: Likewise, remove these targets/rules/variables:
(local_updates, update, cvs-update, wget_files, get-targets): Remove.
(cvs_files, wget-update, automake_repo): Likewise.
Move the comment about cvsu to build-aux/vc-list-files,
where cvsu is actually used.
[build-aux/ChangeLog]
* vc-list-files: Add a comment about cvsu.
2006-10-14 09:51:58 +00:00
Jim Meyering
8a2e111207 * vc-list-files: Don't filter git-ls-files output through cut. 2006-10-14 09:31:27 +00:00
Jim Meyering
5feb482bc3 . 2006-09-09 15:32:03 +00:00
Paul Eggert
d75da2a555 Add gnupload. 2006-08-23 17:08:09 +00:00
Paul Eggert
6d124bf98a * aclocal.m4, config.hin, configure:
Remove from CVS, since ./bootstrap generates them automatically.
* .cvsignore: Add INSTALL, Makefile.in, *.cache, *.lineno, *.log.
Remove more-specific entries.  This catches files like configure.lineno.
* man/.cvsignore: Add Makefile.in.
* src/.cvsignore: Add Makefile.in.
Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.

For .cvsignore file under the tests directory:
Add Makefile.in.  Sort entries if necessary.  Remove *.I, *.E,
*.X, *.O, *-tests, build-script, mk-script if they're never
created in this directory.

* build-aux/.cvsignore: New file.
* doc/.cvsignore: Add Makefile.in, coreutils.html, coreutils.pdf,
coreutils.ps, coreutils.tps.  Remove coreutils.cm (dunno what it
is, but the makefile doesn't mention it).  Remove coreutils.info
as it is subsumed by coreutils.info*.
* lib/.cvsignore: Add Makefile.in, getdate.tab.h.
Remove stat.c, sysexit.h.
* m4/.cvsignore: Remove Makefile, dev-ino.m4, glibc2.m4, intdiv0.m4,
inttypes-h.m4, inttypes-pri.m4, jm-glibc-io.m4, lcmessage.m4,
lock.m4, printf-posix.m4, same-inode.m4, size_max.m4,
uintmax_t.m4, ulonglong.m4, visibility.m4, xsize.m4.  Many of
these are put in automatically by ../bootstrap, but that's a
bootstrap bug that I plan to fix shortly.
* po/.cvsignore: More ../bootstrap-related fixes, plus remove old
cruft.  Add *.po, LINGUAS, Makevars.  Remove *.cat, *.msg,
cat-id-dbl.c, messages.mo, stamp-cat-id.
2006-08-22 18:50:24 +00:00
Paul Eggert
05e03fc656 Add a bootstrap procedure, so that the CVS version contains fewer
files and we bootstrap the rest from gnulib, gettext, etc.
* README-cvs: New file.
* bootstrap: New file.
* bootstrap.conf: New file.
* .x-sc_trailing_blank: Remove config-log, .gdb-history.  Add .po.
* configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
of gnulib-tool.
(gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
(gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
(gl_EARLY): Add.
(gl_MACROS): Call just after gl_EARLY, just for clarity.
* src/c99-to-c98.diff: Remove patch to ls.c; no longer needed.
* src/kill.c (strtoimax): Remove decl.
* src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
* src/wc.c: Likewise.
* src/ls.c (sort_files): Rewrite to avoid need for C99-style
declaration, so that we don't need to patch this file.
* src/printf.c (strtoimax, strtoumax): Remove decls.
* src/su.c: Include getpass.h.
(getpass): remove.
* src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
Include inttypes.h unconditionally; remove decls it handles.
* lib/Makefile.am: include gnulib.mk, so that we can remove most of
this file.
(AM_CPPFLAGS): Don't mention -I$(srcdir), since that's now done
for us.
(noinst_LIBRARIES, LDDADD, DEFS): Remove.
(libcoreutils_a_SOURCES): Trim down greatly, just to the files
that aren't in gnulib.
Remove defns gnulib does for us.
* m4/check-decl.m4 (gl_CHECK_DECLS):
Don't include stdio.h, string.h, stdlib.h, unistd.h, sys/time.h,
time.h.  Use AC_CHECK_DECLS_ONCE for free, getenv, geteuid, getlogin,
getuid, lseek, malloc, memchr, realloc.  Don't check for getutent,
memrchr, nanosleep, stpcpy, strndup, strnlen, strstr, strtoul,
strtoull.
(_gl_DECL_HEADERS): Remove; all uses removed.
* m4/jm-macros.m4 (gl_MACROS): Move AC_PREREQ into configure.ac
for the benefit of gnulib-tool.  Call gl_INIT.
Do not call or require macros that gnulib will handle for us.
Don't check for fchmod, hasmntopt, isascii, lchown, listmntent,
mempcpy, realpath, wcrtomb, tzset.
(gl_CHECK_ALL_HEADERS): Don't check for sys/statvfs.h, sys/vfs.h,
sys/mount.h.
(gl_CHECK_ALL_TYPES): Require AC_TYPE_UNSIGNED_LONG_LONG_INT.
Don't check for struct stat.st_blksize.
Don't require AC_STRUCT_ST_DM_MODE, gt_TYPE_SSIZE_T,
gl_AC_TYPE_UINT32_T, gl_AC_TYPE_UINTMAX_T, gl_AC_TYPE_UINTPTR_T,
gl_AC_TYPE_UNSIGNED_LONG_LONG.
* m4/prereq.m4 (gl_PREREQ): Require gl_FUNC_XFTS, gl_ROOT_DEV_INO.
Don't require macros that gnulib does for us.
* m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Don't check for
sys/sysmacros.h.  Don't check for statvfs.  Use AC_CHECK_HEADERS_ONCE
for netinet/in.h, nfs/nfs_clnt.h, nfs/vfs.h.
Don't require gl_AC_TYPE_LONG_LONG, gt_HEADER_INTTYPES_H.
2006-08-21 07:30:45 +00:00
Paul Eggert
0f7a044109 Remove from CVS, since the bootstrap script generates them automatically. 2006-08-21 07:26:38 +00:00
Paul Eggert
5129debc41 Remove; no longer needed. 2006-08-17 20:09:22 +00:00
Paul Eggert
218fa5c61b Add/fix copyright notices and adjust to latest GNU FDL. 2006-08-17 19:58:17 +00:00
Jim Meyering
1289d06809 update from gnulib 2006-08-15 09:14:36 +00:00
Paul Eggert
93f90065f3 Sync from gnulib. 2006-08-09 23:42:26 +00:00
Jim Meyering
0ff7cb7f69 vc-list-files: Handle git repositories, too. 2006-07-25 14:10:12 +00:00
Jim Meyering
603da96fbd *** empty log message *** 2006-07-19 09:54:32 +00:00
Jim Meyering
6f91fb9595 Command line args correspond to an "include" list, not an exclude list. 2006-07-19 09:54:28 +00:00