summaryrefslogtreecommitdiff
path: root/t/Makefile
AgeCommit message (Collapse)AuthorFilesLines
2010-11-17Merge branch 'mg/make-prove'Libravatar Junio C Hamano1-1/+9
* mg/make-prove: test: allow running the tests under "prove"
2010-10-26test: allow running the tests under "prove"Libravatar Michael J Gruber1-1/+9
You can run "make DEFAULT_TEST_TARGET=prove test" to run the test under "prove" (or $(PROVE) if set). The output is a bit easier to read when running many tests in parallel. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Liked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Liked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-30gitweb/Makefile: Add 'test' and 'test-installed' targetsLibravatar Jakub Narebski1-0/+4
The 'test-installed' target in gitweb/Makefile tests installed gitweb, using the same destination directory that 'install' target uses. The 'test' target is just a convenience wrapper invoking 'gitweb-test' target of t/Makefile. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18cvs tests: do not touch test CVS repositories shipped with sourceLibravatar Junio C Hamano1-1/+0
Some tests in t96xx series (cvsimport) want to write into the control area (CVSROOT) of their test CVS repositories, but this does not work well when the source area is made read-only (test trash directories are moved via --root=else/where option). Copy the supplied test CVS repository to a scratch place at the beginning of these tests. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18t/Makefile: Create test-results dir for smoke targetLibravatar Ævar Arnfjörð Bjarmason1-1/+1
Change the smoke target to create a test-results directory. This was done implicitly by the test-lib before my "test-lib: Don't write test-results when HARNESS_ACTIVE" patch, but after that smoking from the pu branch hasn't worked. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18t/README: Add SMOKE_{COMMENT,TAGS}= to smoke_report targetLibravatar Ævar Arnfjörð Bjarmason1-0/+6
The smoke server supports a free form text field with comments about a report, and a comma delimited list of tags. Change the smoke_report target to expose this functionality. Now smokers can send more data that explains and categorizes the reports they're submitting. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18t/Makefile: Can't include GIT-BUILD-OPTIONS, it's a .shLibravatar Ævar Arnfjörð Bjarmason1-1/+1
Change the smoke testing portion of t/Makefile not to include GIT-BUILD-OPTIONS. It's a shellscript, not a Makefile snippet, so it had the nasty side-effect of sneaking e.g. SHELL_PATH = '/bin/sh' (with quotes) everywhere. Just add our own PERL_PATH variable as a workaround. The t/Makefile already has e.g. an equivalent SHELL_PATH and TAR option which duplicate the definitions in GIT-BUILD-OPTIONS. Reported-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18tests: Infrastructure for Git smoke testingLibravatar Ævar Arnfjörð Bjarmason1-1/+34
Add the capability to send smoke reports from the Git test suite. Currently we only notice bugs in the test suite when it's run manually. Bugs in Git that only occur on obscure platforms or setups that the core developers aren't using can thus go unnoticed. This series aims to change that. With it, anyone that's interested in avoiding bitrot in Git can volunteer to run a smoke tester. A smoke tester periodically compiles the latest version of Git, runs the test suite, and submits a report to a central server indicating how the test run went. A smoke tester might run something like this in cron: #!/bin/sh cd ~/g/git git fetch for branch in maint master next pu; do git checkout origin/$i && make clean all && cd t && make smoke_report done The smoker might want to compile git with non-default flags, include bisecting functionality or run the tests under valgrind. Doing that is outside the scope of this patch, this just adds a report submission mechanism. But including a canonical smoke runner is something we'll want to include eventually. What this does now is add smoke and smoke_report targets to t/Makefile (this example only uses a few tests for demonstration): $ make clean smoke rm -f -r 'trash directory'.* test-results rm -f t????/cvsroot/CVSROOT/?* rm -f -r valgrind/bin rm -f .prove perl ./harness --git-version="1.7.2.1.173.gc9b40" \ --no-verbose \ --archive="test-results/git-smoke.tar.gz" \ t0000-basic.sh t0001-init.sh t0002-gitfile.sh t0003-attributes.sh t0004-unwritable.sh t0005-signals.sh t0006-date.sh t0000-basic.sh ....... ok t0001-init.sh ........ ok t0002-gitfile.sh ..... ok t0003-attributes.sh .. ok t0004-unwritable.sh .. ok t0005-signals.sh ..... ok t0006-date.sh ........ ok All tests successful. Test Summary Report ------------------- t0000-basic.sh (Wstat: 0 Tests: 46 Failed: 0) TODO passed: 5 Files=7, Tests=134, 3 wallclock secs ( 0.06 usr 0.05 sys + 0.23 cusr 1.33 csys = 1.67 CPU) Result: PASS TAP Archive created at /home/avar/g/git/t/test-results/git-smoke.tar.gz The smoke target uses TAP::Harness::Archive to aggregate the test results into a tarball. The tarball contains two things, the output of every test file that was run, and a metadata file: Tarball contents: $ tar xzvf git-smoke.tar.gz t0004-unwritable.sh t0001-init.sh t0002-gitfile.sh t0005-signals.sh t0000-basic.sh t0003-attributes.sh t0006-date.sh meta.yml A test report: $ cat t0005-signals.sh ok 1 - sigchain works # passed all 1 test(s) 1..1 A metadata file: --- extra_properties: file_attributes: - description: t0000-basic.sh end_time: 1280437324.61398 start_time: 1280437324.22186 - description: t0001-init.sh end_time: 1280437325.12346 start_time: 1280437324.62393 - description: t0002-gitfile.sh end_time: 1280437325.29428 start_time: 1280437325.13646 - description: t0003-attributes.sh end_time: 1280437325.59678 start_time: 1280437325.30565 - description: t0004-unwritable.sh end_time: 1280437325.77376 start_time: 1280437325.61003 - description: t0005-signals.sh end_time: 1280437325.85426 start_time: 1280437325.78727 - description: t0006-date.sh end_time: 1280437326.2362 start_time: 1280437325.86768 file_order: - t0000-basic.sh - t0001-init.sh - t0002-gitfile.sh - t0003-attributes.sh - t0004-unwritable.sh - t0005-signals.sh - t0006-date.sh start_time: 1280437324 stop_time: 1280437326 The "extra_properties" hash is where we'll stick Git-specific info, like whether Git was compiled with gettext or the fallback regex engine, and what branch we're compiling. Currently no metadata like this is included. The entire tarball is then submitted to a central smokebox at smoke.git.nix.is. This is done with curl(1) via the "smoke_report" target: $ make smoke_report curl \ -H "Expect: " \ -F project=Git \ -F architecture=x86_64 \ -F platform=Linux \ -F revision="1.7.2.1.173.gc9b40" \ -F report_file=@test-results/git-smoke.tar.gz \ http://smoke.git.nix.is/app/projects/process_add_report/1 \ | grep -v ^Redirecting % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 117k 100 63 100 117k 3 6430 0:00:21 0:00:18 0:00:03 0 Reported #8 added. Reports are then made available on the smokebox via a web interface: http://smoke.git.nix.is/app/projects/smoke_reports/1 The smoke reports are also mirrored to a Git repository hosted on GitHub: http://github.com/gitsmoke/smoke-reports The Smolder SQLite database that contains metadata about the reports is also made available: http://github.com/gitsmoke/smoke-database Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-25tests: Ignore the Test::Harness .prove fileLibravatar Ævar Arnfjörð Bjarmason1-0/+1
We document how to run prove with the --state option in t/README. This produces a .prove YAML file in the current directory. Change the t/ gitignore to ignore it, and clean it up on `make clean'. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-16Only run aggregate-results over actual countsLibravatar Thomas Rast1-1/+1
The current make target 'aggregate-results' scanned all files matching test-results/t*-*. Normally these are only the test counts (and the exit values, which are ignored), but with --tee the suite also dumps all output. Furthermore, with --verbose t1450 contains several lines starting with "broken link from ..." which matches the criteria used by aggregate-results.sh. Rename the counts output files to *.counts, and only scan those. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-21Merge branch 'gv/portable'Libravatar Junio C Hamano1-0/+1
* 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-02t/aggregate-results: accomodate systems with small max argument list lengthLibravatar Brandon Casey1-1/+3
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-05-31test_cmp: do not use "diff -u" on platforms that lack oneLibravatar Gary V. Vaughan1-0/+1
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-31fixup: do not unconditionally disable "diff -u"Libravatar Junio C Hamano1-4/+0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31tests: use "test_cmp", not "diff", when verifying the resultLibravatar Gary V. Vaughan1-0/+4
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-03-13t/Makefile: remove test artifacts upon "make clean"Libravatar Junio C Hamano1-0/+2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-09t/Makefile: include config.makLibravatar Jeff King1-0/+2
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-03-28Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: test-lib: Clean up comments and Makefile. diff --no-index: Do not generate patch output if other output is requested
2009-03-28test-lib: Clean up comments and Makefile.Libravatar Emil Sit1-1/+1
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-02-03Tests: let --valgrind imply --verbose and --teeLibravatar Johannes Schindelin1-1/+1
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-03t/Makefile: provide a 'valgrind' targetLibravatar Johannes Schindelin1-1/+4
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>
2008-08-08Enable parallel testsLibravatar Johannes Schindelin1-1/+0
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-08tests: Clarify dependencies between tests, 'aggregate-results' and 'clean'Libravatar Johannes Schindelin1-1/+6
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-07-16t/Makefile: use specified shell when running aggregation scriptLibravatar SungHyun Nam1-1/+1
Signed-off-by: SungHyun Nam <goweol@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-08Hook up the result aggregation in the test makefile.Libravatar Sverre Rabbelier1-2/+8
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-08Modify test-lib.sh to output stats to t/test-results/*Libravatar Sverre Rabbelier1-1/+1
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-05-18t/Makefile: "trash" directory was renamed recentlyLibravatar Brandon Casey1-1/+1
Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-14Use $(RM) in Makefiles instead of 'rm -f'Libravatar Emil Medve1-1/+2
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-07War on whitespaceLibravatar Junio C Hamano1-1/+0
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>
2006-12-28git-svn: remove non-delta fetch code pathsLibravatar Eric Wong1-2/+1
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-16git-svn: remove support for the svn command-line clientLibravatar Eric Wong1-7/+3
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-11-27git-svn: update tests for recent changesLibravatar Eric Wong1-1/+2
* Enable test for delta transfers in full-svn-test. * Run tests against the root of the repository so we won't have to revisit 308906fa6e98132cab839a4f42701386fba368ef and efe4631def181d32f932672a7ea31e52ee0ab308 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-21remove merge-recursive-oldLibravatar Junio C Hamano1-4/+0
This frees the Porcelain-ish that comes with the core Python-free. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-06git-svn: migrate out of contribLibravatar Eric Wong1-0/+10
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-06-19Fix setting config variables with an alternative GIT_CONFIGLibravatar Johannes Schindelin1-1/+1
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-04-16Makefile fixups.Libravatar A Large Angry SCM1-1/+1
Signed-off-by: A Large Angry SCM <gitzilla@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-18Fixes for ancient versions of GNU makeLibravatar Johannes Schindelin1-5/+2
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-18Optionally work without pythonLibravatar Johannes Schindelin1-0/+4
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>
2005-11-08make tests ignorable with "make -i"Libravatar Alex Riesen1-3/+8
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-10-10Deal with $(bindir) and friends with whitespaces.Libravatar Junio C Hamano1-1/+7
... using HPA's shellquote macro. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-01More portability.Libravatar Junio C Hamano1-0/+1
- 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-09-27[PATCH] Make the test more shell generic and fix missing Solaris find optionLibravatar Peter Eriksen1-1/+2
This is from Peter Eriksen, but further fixed. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-14t/Makefile: OPTS -> GIT_TEST_OPTSLibravatar Petr Baudis1-2/+3
This way, passing this variable through the environment actually makes sense.
2005-05-14t/Makefile cleanupLibravatar Petr Baudis1-4/+3
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[PATCH 1/2] Test framework take two.Libravatar Junio C Hamano1-0/+15
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>