environ is supposed to be declared by <unistd.h>.
[gnulib.git] / tests / test-vc-list-files-cvs.sh
index 91bdeac..12c9366 100755 (executable)
@@ -16,9 +16,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-PATH="$abs_top_srcdir/build-aux":$PATH
-export PATH
-
 tmpdir=vc-cvs-$$
 trap 'st=$?; cd '"`pwd`"' && rm -rf $tmpdir; exit $st' 0
 trap '(exit $?); exit $?' 1 2 13 15
@@ -47,7 +44,9 @@ for i in with-cvsu without; do
   ok=0
   mkdir $tmpdir && cd $tmpdir &&
     # without cvs, skip the test
-    { cvs -Q -d "$repo" init || exit 77; } &&
+    # The double use of 'exit' is needed for the reference to $? inside the trap.
+    { ( cvs -Q -d "$repo" init ) > /dev/null 2>&1 \
+      || { echo "Skipping test: cvs not found in PATH"; (exit 77); exit 77; }; } &&
     mkdir w && cd w &&
     mkdir d &&
     touch d/a b c &&