From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Johannes Sixt" <j6t@kdbg.org>,
"Jonathan Nieder" <jrnieder@gmail.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 3/3] t/README: Document the predefined test prerequisites
Date: Fri, 6 Aug 2010 21:19:25 +0000 [thread overview]
Message-ID: <1281129565-26124-4-git-send-email-avarab@gmail.com> (raw)
In-Reply-To: <1281129565-26124-1-git-send-email-avarab@gmail.com>
The README for the test library suggested that you grep the
test-lib.sh for test_set_prereq to see what the preset prerequisites
were.
Remove that bit, and write a section explaining all the preset
prerequisites. Most of the text was lifted from from Junio C Hamano
and Johannes Sixt, See the "Tests in Cygwin" thread in May 2009 for
the originals:
http://thread.gmane.org/gmane.comp.version-control.git/116729/focus=118385
http://thread.gmane.org/gmane.comp.version-control.git/116729/focus=118434
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
t/README | 45 ++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 40 insertions(+), 5 deletions(-)
diff --git a/t/README b/t/README
index d07b67a..dc07939 100644
--- a/t/README
+++ b/t/README
@@ -410,11 +410,12 @@ library for your script to use.
- test_set_prereq SOME_PREREQ
Set a test prerequisite to be used later with test_have_prereq. The
- test-lib will set some prerequisites for you, e.g. PERL and PYTHON
- which are derived from ./GIT-BUILD-OPTIONS (grep test_set_prereq
- test-lib.sh for more). Others you can set yourself and use later
- with either test_have_prereq directly, or the three argument
- invocation of test_expect_success and test_expect_failure.
+ test-lib will set some prerequisites for you, see the
+ "Prerequisites" section below for a full list of these.
+
+ Others you can set yourself and use later with either
+ test_have_prereq directly, or the three argument invocation of
+ test_expect_success and test_expect_failure.
- test_have_prereq SOME PREREQ
@@ -487,6 +488,40 @@ library for your script to use.
...
'
+Prerequisites
+-------------
+
+These are the prerequisites that the test library predefines with
+test_have_prereq.
+
+See the prereq argument to the test_* functions in the "Test harness
+library" section above and the "test_have_prereq" function for how to
+use these, and "test_set_prereq" for how to define your own.
+
+ - PERL & PYTHON
+
+ Git wasn't compiled with NO_PERL=YesPlease or
+ NO_PYTHON=YesPlease. Wrap any tests that need Perl or Python in
+ these.
+
+ - POSIXPERM
+
+ The filesystem supports POSIX style permission bits.
+
+ - BSLASHPSPEC
+
+ Backslashes in pathspec are not directory separators. This is not
+ set on Windows. See 6fd1106a for details.
+
+ - EXECKEEPSPID
+
+ The process retains the same pid across exec(2). See fb9a2bea for
+ details.
+
+ - SYMLINKS
+
+ The filesystem we're on supports symbolic links. E.g. a FAT
+ filesystem doesn't support these. See 704a3143 for details.
Tips for Writing Tests
----------------------
--
1.7.1
prev parent reply other threads:[~2010-08-06 21:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-06 21:19 [PATCH 0/3] tests: Better prerequisite handling & documentation Ævar Arnfjörð Bjarmason
2010-08-06 21:19 ` [PATCH 1/3] test-lib: Add support for multiple test prerequisites Ævar Arnfjörð Bjarmason
2010-08-08 1:57 ` Jonathan Nieder
2010-08-08 2:03 ` Jonathan Nieder
2010-08-08 9:15 ` Johannes Sixt
2010-08-08 13:29 ` Ævar Arnfjörð Bjarmason
2010-08-06 21:19 ` [PATCH 2/3] test-lib: Print missing prerequisites in test output Ævar Arnfjörð Bjarmason
2010-08-06 21:19 ` Ævar Arnfjörð Bjarmason [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1281129565-26124-4-git-send-email-avarab@gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=jrnieder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).