bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] init.sh: improve comments


From: Jim Meyering
Subject: [PATCH] init.sh: improve comments
Date: Fri, 07 May 2010 09:22:11 +0200

FYI,

>From cd2b137d95b850c778efb956d7901533787afa92 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 7 May 2010 09:19:41 +0200
Subject: [PATCH] init.sh: improve comments

* tests/init.sh: Recommend the one-line init.sh-sourcing idiom:
. "${srcdir=.}/init.sh"; path_prepend_ .
Add a note about path_prepend_ and the alternative of using
TESTS_ENVIRONMENT.
---
 ChangeLog     |    8 ++++++++
 tests/init.sh |    9 +++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4581ef9..1f55576 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-05-07  Jim Meyering  <address@hidden>
+
+       init.sh: improve comments
+       * tests/init.sh: Recommend the one-line init.sh-sourcing idiom:
+       . "${srcdir=.}/init.sh"; path_prepend_ .
+       Add a note about path_prepend_ and the alternative of using
+       TESTS_ENVIRONMENT.
+
 2010-05-06  Sergey Poznyakoff  <address@hidden>

        exclude: Unescape hashed patterns in wildcard mode.
diff --git a/tests/init.sh b/tests/init.sh
index 512e876..7772736 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -21,11 +21,16 @@
 # The typical skeleton of a test looks like this:
 #
 #   #!/bin/sh
-#   : ${srcdir=.}
-#   . "$srcdir/init.sh"; path_prepend_ .
+#   . "${srcdir=.}/init.sh"; path_prepend_ .
 #   Execute some commands.
 #   Note that these commands are executed in a subdirectory, therefore you
 #   need to prepend "../" to relative filenames in the build directory.
+#   Note that the "path_prepend_ ." is useful only if the body of your
+#   test invokes programs residing in the initial directory.
+#   For example, if the programs you want to test are in src/, and this test
+#   script is named tests/test-1, then you would use "path_prepend_ ../src",
+#   or perhaps export PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH"
+#   to all tests via automake's TESTS_ENVIRONMENT.
 #   Set the exit code 0 for success, 77 for skipped, or 1 or other for failure.
 #   Use the skip_ and fail_ functions to print a diagnostic and then exit
 #   with the corresponding exit code.
--
1.7.1.166.gf2086




reply via email to

[Prev in Thread] Current Thread [Next in Thread]