1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-08 20:36:19 +02:00
Commit Graph

35 Commits

Author SHA1 Message Date
Junio C Hamano 8d676d85f7 Merge branch 'gv/portable'
* gv/portable:
  test-lib: use DIFF definition from GIT-BUILD-OPTIONS
  build: propagate $DIFF to scripts
  Makefile: Tru64 portability fix
  Makefile: HP-UX 10.20 portability fixes
  Makefile: HPUX11 portability fixes
  Makefile: SunOS 5.6 portability fix
  inline declaration does not work on AIX
  Allow disabling "inline"
  Some platforms lack socklen_t type
  Make NO_{INET_NTOP,INET_PTON} configured independently
  Makefile: some platforms do not have hstrerror anywhere
  git-compat-util.h: some platforms with mmap() lack MAP_FAILED definition
  test_cmp: do not use "diff -u" on platforms that lack one
  fixup: do not unconditionally disable "diff -u"
  tests: use "test_cmp", not "diff", when verifying the result
  Do not use "diff" found on PATH while building and installing
  enums: omit trailing comma for portability
  Makefile: -lpthread may still be necessary when libc has only pthread stubs
  Rewrite dynamic structure initializations to runtime assignment
  Makefile: pass CPPFLAGS through to fllow customization

Conflicts:
	Makefile
	wt-status.h
2010-06-21 06:02:44 -07:00
Brandon Casey 6508eedf67 t/aggregate-results: accomodate systems with small max argument list length
IRIX 6.5 has a default maximum argument list length of 20480.  The file
glob that is passed to aggregate-results currently exceeds this length, and
so the script cannot run successfully.  Work around this issue by passing
the file names in via the standard input rather than the argument list.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-02 09:36:49 -07:00
Gary V. Vaughan b2b0026eed test_cmp: do not use "diff -u" on platforms that lack one
By default the testsuite calls 'diff -u' whenever a file comparison is
called for.  Unfortunately that throws a "diff: unknown option '-u'"
error for most non-GNU diffs.

This patch sets GIT_TEST_CMP to 'cmp' on all the architectures where
that happens.  The previous version of this patch forgot to export
GIT_TEST_CMP from t/Makefile, which is why 'make test' continued to
fail most tests on most architectures - test-lib.sh was falling back
on its default of `diff -u' for GIT_TEST_CMP.  This version of this
patch shows a vast improvement in testsuite results where either GNU
diff is in the path at configure time, or where Makefile knows that
GIT_TEST_CMP=cmp is required.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 17:36:27 -07:00
Junio C Hamano 7b3bdbb335 fixup: do not unconditionally disable "diff -u"
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 17:35:20 -07:00
Gary V. Vaughan 4fdf71be1c tests: use "test_cmp", not "diff", when verifying the result
In tests, call test_cmp rather than raw diff where possible (i.e. if
the output does not go to a pipe), to allow the use of, say, 'cmp'
when the default 'diff -u' is not compatible with a vendor diff.

When that is not possible, use $DIFF, as set in GIT-BUILD-OPTIONS.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 16:59:27 -07:00
Junio C Hamano 34b383e7cd t/Makefile: remove test artifacts upon "make clean"
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-13 12:41:20 -08:00
Jeff King c14417c4f5 t/Makefile: include config.mak
This is useful if you want to specify GIT_TEST_OPTS that you
always use.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-09 10:51:47 -07:00
Junio C Hamano b0085a7167 Merge branch 'maint'
* maint:
  test-lib: Clean up comments and Makefile.
  diff --no-index: Do not generate patch output if other output is requested
2009-03-28 01:16:46 -07:00
Emil Sit 81db4abf84 test-lib: Clean up comments and Makefile.
Bring documentation in test-lib and clean target
in Makefile in-line with abc5d372.

Signed-off-by: Emil Sit <sit@emilsit.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-28 00:11:27 -07:00
Johannes Schindelin 3da9365234 Tests: let --valgrind imply --verbose and --tee
It does not make much sense to run the (expensive) valgrind tests and
not look at the output.

To prevent output from scrolling out of reach, the parameter --tee is
implied, too.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-03 22:01:23 -08:00
Johannes Schindelin 7f6fdea119 t/Makefile: provide a 'valgrind' target
It is easy to forget running valgrinded tests without -v, and it is
also easy to forget to redirect the output to "tee" (lest the output
scroll out of the terminal's buffer).  Running "make valgrind" will
take care of all that.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-03 22:01:14 -08:00
Johannes Schindelin abc5d372ec Enable parallel tests
On multiprocessor machines, or with I/O heavy tests (that leave the
CPU waiting a lot), it makes sense to parallelize the tests.

However, care has to be taken that the different jobs use different
trash directories.

This commit does so, by creating the trash directories with a suffix
that is unique with regard to the test, as it is the test's base name.

Further, the trash directory is removed in the test itself if
everything went fine, so that the trash directories do not
pile up only to be removed at the very end.

If a test failed, the trash directory is not removed.  Chances are
that the exact error message is lost in the clutter, but you can still
see what test failed from the name of the trash directory, and repeat
the test (without -j).

If all was good, you will see the aggregated results.

Suggestions to simplify this commit came from Junio and René.

There still is an issue with tests that want to run a server process and
listen to a fixed port (http and svn) --- they cannot run in parallel but
this patch does not address this issue.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 22:24:28 -07:00
Johannes Schindelin e3df89a4b1 tests: Clarify dependencies between tests, 'aggregate-results' and 'clean'
The Makefile targets 'aggregate-results' and 'clean' pretended to be
independent.  This is not true, of course, since aggregate-results
needs the results _before_ they are removed.

Likewise, the tests should have been run already when the results are
to be aggregated.

However, as it is legitimate to run only a few tests, and then aggregate
just those results, so another target is introduced, that depends on all
tests, then aggregates the results, and only then removes the results.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 18:52:28 -07:00
SungHyun Nam dd33927ccd t/Makefile: use specified shell when running aggregation script
Signed-off-by: SungHyun Nam <goweol@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-16 08:59:14 -07:00
Sverre Rabbelier f8d5ffc2c7 Hook up the result aggregation in the test makefile.
This patch makes 'make' output the aggregated results at the end of each build.
The 'git-test-result' file is removed both before and after each build.

Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-08 15:08:19 -07:00
Sverre Rabbelier 2d84e9fb6d Modify test-lib.sh to output stats to t/test-results/*
This change is needed order to aggregate data on the test run later on.

Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-08 15:07:27 -07:00
Brandon Casey 9231e3a953 t/Makefile: "trash" directory was renamed recently
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-18 21:39:58 -07:00
Emil Medve 4cb08df553 Use $(RM) in Makefiles instead of 'rm -f'
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-14 23:31:01 -07:00
Junio C Hamano a6080a0a44 War on whitespace
This uses "git-apply --whitespace=strip" to fix whitespace errors that have
crept in to our source files over time.  There are a few files that need
to have trailing whitespaces (most notably, test vectors).  The results
still passes the test, and build result in Documentation/ area is unchanged.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-07 00:04:01 -07:00
Eric Wong ed92f17026 git-svn: remove non-delta fetch code paths
We have less code to worry about now.  As a bonus, --revision
can be used to reliably skip parts of history whenever fetch is
run, not just the first time.  I'm not sure why anybody would
want to skip history in the middle, however...

For people (nearly everyone at the moment) without the
do_switch() function in their Perl SVN library, the entire tree
must be refetched if --follow-parent is used and a parent is
found.  Future versions of SVN will have a working do_switch()
function accessible via Perl.

Accessing repositories on the local machine (especially file://
ones) is also slightly slower as a result; but I suspect most
git-svn users will be using it to access remote repositories.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-28 01:39:09 -08:00
Eric Wong b9c8518722 git-svn: remove support for the svn command-line client
Using the command-line client was great for prototyping and
getting something working quickly.  Eventually I found time
to study the library documentation and add support for using
the libraries which are much faster and more flexible when
it comes to supporting new features.

Note that we require version 1.1 of the SVN libraries, whereas
we supported the command-line svn client down to version 1.0.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-16 05:17:17 -08:00
Eric Wong e15161198a git-svn: update tests for recent changes
* Enable test for delta transfers in full-svn-test.

* Run tests against the root of the repository so we won't have
  to revisit 308906fa6e and
  efe4631def again.
  The graft-branches test still runs as before.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-27 22:23:06 -08:00
Junio C Hamano 7cdbff14d4 remove merge-recursive-old
This frees the Porcelain-ish that comes with the core Python-free.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-21 20:55:39 -08:00
Eric Wong 60d02ccc18 git-svn: migrate out of contrib
Allow NO_SVN_TESTS to be defined to skip git-svn tests.  These
tests are time-consuming due to SVN being slow, and even more so
if SVN Perl libraries are not available.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-06 17:02:47 -07:00
Johannes Schindelin 9c3796fc04 Fix setting config variables with an alternative GIT_CONFIG
When setting a config variable, git_config_set() ignored the variables
GIT_CONFIG and GIT_CONFIG_LOCAL. Now, when GIT_CONFIG_LOCAL is set, it
will write to that file. If not, GIT_CONFIG is checked, and only as a
fallback, the change is written to $GIT_DIR/config.

Add a test for it, and also future-proof the test for the upcoming
$HOME/.gitconfig support.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-19 17:30:34 -07:00
A Large Angry SCM e6bfaf3e33 Makefile fixups.
Signed-off-by: A Large Angry SCM <gitzilla@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-16 20:42:37 -07:00
Johannes Schindelin 39c015c556 Fixes for ancient versions of GNU make
Some versions of GNU make do not understand $(call), and have problems to
interpret rules like this:

some_target: CFLAGS += -Dsome=defs

[jc: simplified substitution a bit. ]

Signed-off-by: Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-18 23:17:01 -08:00
Johannes Schindelin abb7c7b31c Optionally work without python
In some setups (notably server setups) you do not need that dependency.
Gracefully handle the absence of python when NO_PYTHON is defined.

Signed-off-by: Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-18 23:16:09 -08:00
Alex Riesen 23fc63bf8f make tests ignorable with "make -i"
Allow failed tests to be ignored using make's "-i". The patch also
disables parallel make in t/. This doesn't make the testing any
different as before: the tests were run sequentially before.

It also allows to run more tests, ignoring the ones usually failing
just to figure out if something else broke.  (Or to ignore plainly
uninteresting situations because of the testing being done on say...
cygwin ;)

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-08 11:26:07 -08:00
Junio C Hamano 4769948afe Deal with $(bindir) and friends with whitespaces.
... using HPA's shellquote macro.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10 13:51:52 -07:00
Junio C Hamano 455a7f3275 More portability.
- The location of openssl development files got customizable.
 - The location of iconv development files got customizable.
 - Pass $TAR down to t5000 test so that the user can override with
   'gmake TAR=gtar'.
 - Solaris 'bc' does not seem to grok "define abs()".  There is no
   reason to use bc there -- expr would do.

Signed-off-by: Junio C Hamano <junio@twinsun.com>
2005-10-01 23:19:48 -07:00
Peter Eriksen edde7a8b53 [PATCH] Make the test more shell generic and fix missing Solaris find option
This is from Peter Eriksen, but further fixed.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-27 00:16:39 -07:00
Petr Baudis d6928ebd50 t/Makefile: OPTS -> GIT_TEST_OPTS
This way, passing this variable through the environment actually makes
sense.
2005-05-14 17:58:22 +02:00
Petr Baudis 902d960b38 t/Makefile cleanup
t/Makefile now does not use double-colon rules (why would it?), the rm
-fr trash in the all rule is silent, and OPTS aren't set to blank so
that they can be taken from the environment.
2005-05-14 17:57:32 +02:00
Junio C Hamano e1970ce43a [PATCH 1/2] Test framework take two.
This adds t/ directory to host test suite, a test helper
library and a basic set of tests.

Petr Baudis raised many valid points at the earlier attempts in
git mailing list.  This round, test-lib.sh has been updated to a
bit more modern style, and the default output is made easier to
read.  Also included is one sample test script that tests the
very basics.  This test has already found one leftover bug
missed when we introduced symlink support, which has been fixed
since then.  The supplied Makefile is designed to run all the
available tests.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Petr Baudis <pasky@ucw.cz>
2005-05-14 16:45:05 +02:00