diff options
Diffstat (limited to 't')
-rw-r--r-- | t/Makefile | 40 | ||||
-rw-r--r-- | t/README | 73 | ||||
-rwxr-xr-x | t/harness | 21 | ||||
-rwxr-xr-x | t/t4150-am.sh | 2 | ||||
-rwxr-xr-x | t/t5560-http-backend-noserver.sh | 6 | ||||
-rwxr-xr-x | t/t6032-merge-large-rename.sh | 2 | ||||
-rwxr-xr-x | t/t9130-git-svn-authors-file.sh | 4 | ||||
-rwxr-xr-x | t/t9200-git-cvsexportcommit.sh | 2 | ||||
-rwxr-xr-x | t/t9808-git-p4-chdir.sh | 4 |
9 files changed, 11 insertions, 143 deletions
diff --git a/t/Makefile b/t/Makefile index 66ceefefcc..b5048ab77b 100644 --- a/t/Makefile +++ b/t/Makefile @@ -73,42 +73,4 @@ gitweb-test: valgrind: $(MAKE) GIT_TEST_OPTS="$(GIT_TEST_OPTS) --valgrind" -# Smoke testing targets --include ../GIT-VERSION-FILE -uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo unknown') -uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo unknown') - -test-results: - mkdir -p test-results - -test-results/git-smoke.tar.gz: test-results - $(PERL_PATH) ./harness \ - --archive="test-results/git-smoke.tar.gz" \ - $(T) - -smoke: test-results/git-smoke.tar.gz - -SMOKE_UPLOAD_FLAGS = -ifdef SMOKE_USERNAME - SMOKE_UPLOAD_FLAGS += -F username="$(SMOKE_USERNAME)" -F password="$(SMOKE_PASSWORD)" -endif -ifdef SMOKE_COMMENT - SMOKE_UPLOAD_FLAGS += -F comments="$(SMOKE_COMMENT)" -endif -ifdef SMOKE_TAGS - SMOKE_UPLOAD_FLAGS += -F tags="$(SMOKE_TAGS)" -endif - -smoke_report: smoke - curl \ - -H "Expect: " \ - -F project=Git \ - -F architecture="$(uname_M)" \ - -F platform="$(uname_S)" \ - -F revision="$(GIT_VERSION)" \ - -F report_file=@test-results/git-smoke.tar.gz \ - $(SMOKE_UPLOAD_FLAGS) \ - http://smoke.git.nix.is/app/projects/process_add_report/1 \ - | grep -v ^Redirecting - -.PHONY: pre-clean $(T) aggregate-results clean valgrind smoke smoke_report +.PHONY: pre-clean $(T) aggregate-results clean valgrind @@ -671,76 +671,3 @@ Then, at the top-level: That'll generate a detailed cover report in the "cover_db_html" directory, which you can then copy to a webserver, or inspect locally in a browser. - -Smoke testing -------------- - -The Git test suite has support for smoke testing. Smoke testing is -when you submit the results of a test run to a central server for -analysis and aggregation. - -Running a smoke tester is an easy and valuable way of contributing to -Git development, particularly if you have access to an uncommon OS on -obscure hardware. - -After building Git you can generate a smoke report like this in the -"t" directory: - - make clean smoke - -You can also pass arguments via the environment. This should make it -faster: - - GIT_TEST_OPTS='--root=/dev/shm' TEST_JOBS=10 make clean smoke - -The "smoke" target will run the Git test suite with Perl's -"TAP::Harness" module, and package up the results in a .tar.gz archive -with "TAP::Harness::Archive". The former is included with Perl v5.10.1 -or later, but you'll need to install the latter from the CPAN. See the -"Test coverage" section above for how you might do that. - -Once the "smoke" target finishes you'll see a message like this: - - TAP Archive created at <path to git>/t/test-results/git-smoke.tar.gz - -To upload the smoke report you need to have curl(1) installed, then -do: - - make smoke_report - -To upload the report anonymously. Hopefully that'll return something -like "Reported #7 added.". - -If you're going to be uploading reports frequently please request a -user account by E-Mailing gitsmoke@v.nix.is. Once you have a username -and password you'll be able to do: - - SMOKE_USERNAME=<username> SMOKE_PASSWORD=<password> make smoke_report - -You can also add an additional comment to attach to the report, and/or -a comma separated list of tags: - - SMOKE_USERNAME=<username> SMOKE_PASSWORD=<password> \ - SMOKE_COMMENT=<comment> SMOKE_TAGS=<tags> \ - make smoke_report - -Once the report is uploaded it'll be made available at -http://smoke.git.nix.is, here's an overview of Recent Smoke Reports -for Git: - - http://smoke.git.nix.is/app/projects/smoke_reports/1 - -The reports will also be mirrored to GitHub every few hours: - - http://github.com/gitsmoke/smoke-reports - -The Smolder SQLite database is also mirrored and made available for -download: - - http://github.com/gitsmoke/smoke-database - -Note that the database includes hashed (with crypt()) user passwords -and E-Mail addresses. Don't use a valuable password for the smoke -service if you have an account, or an E-Mail address you don't want to -be publicly known. The user accounts are just meant to be convenient -labels, they're not meant to be secure. diff --git a/t/harness b/t/harness deleted file mode 100755 index f5c02f49b7..0000000000 --- a/t/harness +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/perl -use strict; -use warnings; -use Getopt::Long (); -use TAP::Harness::Archive; - -Getopt::Long::Parser->new( - config => [ qw/ pass_through / ], -)->getoptions( - 'jobs:1' => \(my $jobs = $ENV{TEST_JOBS}), - 'archive=s' => \my $archive, -) or die "$0: Couldn't getoptions()"; - -TAP::Harness::Archive->new({ - jobs => $jobs, - archive => $archive, - ($ENV{GIT_TEST_OPTS} - ? (test_args => [ split /\s+/, $ENV{GIT_TEST_OPTS} ]) - : ()), - extra_properties => {}, -})->runtests(@ARGV); diff --git a/t/t4150-am.sh b/t/t4150-am.sh index 8807b602a5..f1b60b8560 100755 --- a/t/t4150-am.sh +++ b/t/t4150-am.sh @@ -136,7 +136,7 @@ test_expect_success setup ' git format-patch -M --stdout lorem^ >rename-add.patch && # reset time - unset test_tick && + sane_unset test_tick && test_tick ' diff --git a/t/t5560-http-backend-noserver.sh b/t/t5560-http-backend-noserver.sh index 0ad7ce07c4..ef98d95e00 100755 --- a/t/t5560-http-backend-noserver.sh +++ b/t/t5560-http-backend-noserver.sh @@ -17,7 +17,7 @@ run_backend() { GET() { REQUEST_METHOD="GET" && export REQUEST_METHOD && run_backend "/repo.git/$1" && - unset REQUEST_METHOD && + sane_unset REQUEST_METHOD && if ! grep "Status" act.out >act then printf "Status: 200 OK\r\n" >act @@ -30,8 +30,8 @@ POST() { REQUEST_METHOD="POST" && export REQUEST_METHOD && CONTENT_TYPE="application/x-$1-request" && export CONTENT_TYPE && run_backend "/repo.git/$1" "$2" && - unset REQUEST_METHOD && - unset CONTENT_TYPE && + sane_unset REQUEST_METHOD && + sane_unset CONTENT_TYPE && if ! grep "Status" act.out >act then printf "Status: 200 OK\r\n" >act diff --git a/t/t6032-merge-large-rename.sh b/t/t6032-merge-large-rename.sh index fdb6c25371..94f010be8a 100755 --- a/t/t6032-merge-large-rename.sh +++ b/t/t6032-merge-large-rename.sh @@ -95,7 +95,7 @@ test_expect_success 'setup large simple rename' ' ' test_expect_success 'massive simple rename does not spam added files' ' - unset GIT_MERGE_VERBOSITY && + sane_unset GIT_MERGE_VERBOSITY && git merge --no-stat simple-rename | grep -v Removing >output && test 5 -gt "$(wc -l < output)" ' diff --git a/t/t9130-git-svn-authors-file.sh b/t/t9130-git-svn-authors-file.sh index b324c491c5..c3443ceb25 100755 --- a/t/t9130-git-svn-authors-file.sh +++ b/t/t9130-git-svn-authors-file.sh @@ -96,8 +96,8 @@ test_expect_success 'fresh clone with svn.authors-file in config' ' rm -r "$GIT_DIR" && test x = x"$(git config svn.authorsfile)" && test_config="$HOME"/.gitconfig && - unset GIT_DIR && - unset GIT_CONFIG && + sane_unset GIT_DIR && + sane_unset GIT_CONFIG && git config --global \ svn.authorsfile "$HOME"/svn-authors && test x"$HOME"/svn-authors = x"$(git config svn.authorsfile)" && diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh index 518358aa64..b59be9a894 100755 --- a/t/t9200-git-cvsexportcommit.sh +++ b/t/t9200-git-cvsexportcommit.sh @@ -321,7 +321,7 @@ test_expect_success 'use the same checkout for Git and CVS' ' (mkdir shared && cd shared && - unset GIT_DIR && + sane_unset GIT_DIR && cvs co . && git init && git add " space" && diff --git a/t/t9808-git-p4-chdir.sh b/t/t9808-git-p4-chdir.sh index eb8cc9523e..f0022839c7 100755 --- a/t/t9808-git-p4-chdir.sh +++ b/t/t9808-git-p4-chdir.sh @@ -25,7 +25,7 @@ test_expect_success 'P4CONFIG and absolute dir clone' ' test_when_finished cleanup_git && ( P4CONFIG=p4config && export P4CONFIG && - unset P4PORT P4CLIENT && + sane_unset P4PORT P4CLIENT && "$GITP4" clone --verbose --dest="$git" //depot ) ' @@ -37,7 +37,7 @@ test_expect_success 'P4CONFIG and relative dir clone' ' test_when_finished cleanup_git && ( P4CONFIG=p4config && export P4CONFIG && - unset P4PORT P4CLIENT && + sane_unset P4PORT P4CLIENT && "$GITP4" clone --verbose --dest="git" //depot ) ' |