Merge branch 'jn/scripts-updates'

* jn/scripts-updates:
  remove #!interpreter line from shell libraries
  test: replace shebangs with descriptions in shell libraries
  test: make FILEMODE a lazy prereq
  contrib: remove git-p4import
  mark contributed hooks executable
  mark perl test scripts executable
  mark Windows build scripts executable
This commit is contained in:
Junio C Hamano
2013-12-12 14:22:59 -08:00
53 changed files with 87 additions and 600 deletions

0
t/Git-SVN/00compile.t Normal file → Executable file
View File

0
t/Git-SVN/Utils/add_path_to_url.t Normal file → Executable file
View File

0
t/Git-SVN/Utils/can_compress.t Normal file → Executable file
View File

0
t/Git-SVN/Utils/canonicalize_url.t Normal file → Executable file
View File

0
t/Git-SVN/Utils/collapse_dotdot.t Normal file → Executable file
View File

0
t/Git-SVN/Utils/fatal.t Normal file → Executable file
View File

0
t/Git-SVN/Utils/join_paths.t Normal file → Executable file
View File

View File

@ -1,4 +1,5 @@
#!/bin/sh
# Initialization and helpers for Gitweb tests, which source this
# shell library instead of test-lib.sh.
#
# Copyright (c) 2007 Jakub Narebski
#

View File

@ -1,7 +1,6 @@
#!/bin/sh
#
# Ensures that tests are run under Bash; primarily intended for running tests
# of the completion script.
# Shell library sourced instead of ./test-lib.sh by tests that need
# to run under Bash; primarily intended for tests of the completion
# script.
if test -n "$BASH" && test -z "$POSIXLY_CORRECT"; then
# we are in full-on bash mode

View File

@ -1,4 +1,4 @@
#!/bin/sh
# Shell library sourced instead of ./test-lib.sh by cvsimport tests.
. ./test-lib.sh

View File

@ -1,4 +1,5 @@
#!/bin/sh
# Helpers shared by the test scripts for diff algorithms (patience,
# histogram, etc).
test_diff_frobnitz() {
cat >file1 <<\EOF

View File

@ -1,4 +1,5 @@
#!/bin/sh
# Initialization and Icelandic locale for basic git i18n tests,
# which source this scriptlet instead of ./test-lib.sh.
#
# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
#

View File

@ -1,4 +1,20 @@
#!/bin/sh
# Shell library to run git-daemon in tests. Ends the test early if
# GIT_TEST_GIT_DAEMON is not set.
#
# Usage:
#
# . ./test-lib.sh
# . "$TEST_DIRECTORY"/lib-git-daemon.sh
# start_git_daemon
#
# test_expect_success '...' '
# ...
# '
#
# test_expect_success ...
#
# stop_git_daemon
# test_done
if test -z "$GIT_TEST_GIT_DAEMON"
then

View File

@ -1,4 +1,31 @@
#!/bin/sh
# Shell library to run an HTTP server for use in tests.
# Ends the test early if httpd tests should not be run,
# for example because the user has not enabled them.
#
# Usage:
#
# . ./test-lib.sh
# . "$TEST_DIRECTORY"/lib-httpd.sh
# start_httpd
#
# test_expect_success '...' '
# ...
# '
#
# test_expect_success ...
#
# stop_httpd
# test_done
#
# Can be configured using the following variables.
#
# GIT_TEST_HTTPD enable HTTPD tests
# LIB_HTTPD_PATH web server path
# LIB_HTTPD_MODULE_PATH web server modules path
# LIB_HTTPD_PORT listening port
# LIB_HTTPD_DAV enable DAV
# LIB_HTTPD_SVN enable SVN
# LIB_HTTPD_SSL enable SSL
#
# Copyright (c) 2008 Clemens Buchacher <drizzd@aon.at>
#

View File

@ -1,5 +1,3 @@
#!/bin/sh
#
# Support routines for hand-crafting weird or malicious packs.
#
# You can make a complete pack like:

View File

@ -1,4 +1,4 @@
#!/bin/sh
# Helpers for tests of git's choice of pager.
test_expect_success 'determine default pager' '
test_might_fail git config --unset core.pager &&

View File

@ -1,11 +0,0 @@
#!/bin/sh
#
# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
#
if test "$(git config --bool core.filemode)" = false
then
say 'filemode disabled on the filesystem'
else
test_set_prereq FILEMODE
fi

View File

@ -1,5 +1,3 @@
#!/bin/sh
#
# Helper functions to check if read-tree would succeed/fail as expected with
# and without the dry-run option. They also test that the dry-run does not
# write the index and that together with -u it doesn't touch the work tree.

View File

@ -1,4 +1,4 @@
#!/bin/sh
# Helper functions used by interactive rebase tests.
# After setting the fake editor with this function, you can
#

View File

@ -1,4 +1,4 @@
#!/bin/sh
# Helpers for terminal output tests.
test_expect_success PERL 'set up terminal for tests' '
# Reading from the pty master seems to get stuck _sometimes_

View File

@ -1,4 +1,6 @@
#!/bin/sh
# Performance testing framework. Each perf script starts much like
# a normal test script, except it sources this library instead of
# test-lib.sh. See t/perf/README for documentation.
#
# Copyright (c) 2011 Thomas Rast
#

0
t/t0202/test.pl Normal file → Executable file
View File

View File

@ -2,7 +2,6 @@
test_description='add -i basic tests'
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
if ! test_have_prereq PERL
then

View File

@ -7,7 +7,6 @@ test_description='git apply handling copy/rename patch.
'
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
# setup

View File

@ -6,7 +6,6 @@
test_description='git apply -p handling.'
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
test_expect_success setup '
mkdir sub &&

View File

@ -3,7 +3,6 @@
test_description='applying patch with mode bits'
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
test_expect_success setup '
echo original >file &&

View File

@ -2,7 +2,6 @@
test_description='merge-recursive: handle file mode'
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
test_expect_success 'mode change in one branch: keep changed version' '
: >file1 &&

0
t/t9150/make-svk-dump Normal file → Executable file
View File

0
t/t9151/make-svnmerge-dump Normal file → Executable file
View File

View File

@ -5,7 +5,6 @@
test_description='Test export of commits to CVS'
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
if ! test_have_prereq PERL; then
skip_all='skipping git cvsexportcommit tests, perl not available'

View File

@ -1,4 +1,5 @@
#!/bin/sh
# Library of functions shared by all tests scripts, included by
# test-lib.sh.
#
# Copyright (c) 2005 Junio C Hamano
#

View File

@ -1,4 +1,4 @@
#!/bin/sh
# Test framework for git. See t/README for usage.
#
# Copyright (c) 2005 Junio C Hamano
#
@ -577,11 +577,9 @@ then
make_valgrind_symlink () {
# handle only executables, unless they are shell libraries that
# need to be in the exec-path. We will just use "#!" as a
# guess for a shell-script, since we have no idea what the user
# may have configured as the shell path.
# need to be in the exec-path.
test -x "$1" ||
test "#!" = "$(head -c 2 <"$1")" ||
test "# " = "$(head -c 2 <"$1")" ||
return;
base=$(basename "$1")
@ -834,6 +832,10 @@ test_lazy_prereq SYMLINKS '
ln -s x y && test -h y
'
test_lazy_prereq FILEMODE '
test "$(git config --bool core.filemode)" = true
'
test_lazy_prereq CASE_INSENSITIVE_FS '
echo good >CamelCase &&
echo bad >camelcase &&