[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tests/init.sh: new file to be used via most *.sh tests
From: |
Jim Meyering |
Subject: |
Re: [PATCH] tests/init.sh: new file to be used via most *.sh tests |
Date: |
Thu, 26 Nov 2009 09:43:03 +0100 |
Eric Blake wrote:
> According to Bruno Haible on 11/25/2009 3:24 PM:
>> + # Note that these commands are executed in a subdirectory, therefore you
>> + # need to prepend "../" to relative filenames in the build dir.
>> + # Set the exit code 0 for success, 77 for skipped, or 1 or other for
>> failure.
>
> Or use the skip_ and fail_ functions.
>
> But the advice looks sane to me. However, I'll let Jim decide to apply
> it. You can also use:
Thanks. I added your suggestion:
>From 9bb0a7e5780f8cc02b234981fa17cad396a0244f Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Thu, 26 Nov 2009 09:39:26 +0100
Subject: [PATCH] init.sh: suggest to use skip_ and fail_ functions in comments
* tests/init.sh: Add a sentence.
---
ChangeLog | 5 +++++
tests/init.sh | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d590bce..717c503 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-26 Eric Blake <address@hidden>
+
+ init.sh: suggest to use skip_ and fail_ functions in comments
+ * tests/init.sh: Add a sentence.
+
2009-11-25 Bruno Haible <address@hidden>
init.sh: add documentation in comments
diff --git a/tests/init.sh b/tests/init.sh
index c7e0425..368da6d 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -27,6 +27,7 @@
# Note that these commands are executed in a subdirectory, therefore you
# need to prepend "../" to relative filenames in the build directory.
# 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.
# Exit $?
--
1.6.6.rc0.54.gb073b
> srcdir=../tests bashdb test-foo.sh
>
> if you have the bash debugger installed, to avoid having to go into a
> subshell while still being able to single step through things.
I tried this, but it did not work well at all,
so I'd rather not recommend using bashdb just yet:
$ bashdb test-pread.sh
bash debugger, release 4.0-0.3
Copyright 2002, 2003, 2004, 2006, 2007, 2008 Rocky Bernstein
This is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
(/home/j/w/co/gnulib/tests/test-pread.sh:2):
2: : ${srcdir=.}
bashdb<0> n
(/home/j/w/co/gnulib/tests/test-pread.sh:3):
3: . "$srcdir/init.sh" --set-path=.
bashdb<1> n
** Internal debug error: null file to find
(:5):
5:
bashdb<2>
Re: [PATCH] tests/init.sh: new file to be used via most *.sh tests, Jim Meyering, 2009/11/26
Re: [PATCH] tests/init.sh: new file to be used via most *.sh tests, Ralf Wildenhues, 2009/11/27