bug-automake
[Top][All Lists]
Advanced

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

Re: DJGPP & destdir.test failure


From: Alexandre Duret-Lutz
Subject: Re: DJGPP & destdir.test failure
Date: Thu, 20 Feb 2003 12:27:00 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

>>> "Richard" == Richard Dawe <address@hidden> writes:

[...]


 Richard> The install-data-hook could check for the existence of
 Richard> the file and fail if it does exist.  This works, but
 Richard> defeats the point of the test. 

Yeah.  With such a change we would fail to notice the day we break
distcheck in a way it no longer detect $(DESTDIR) omissions.

I'd rather conclude that this feature isn't supported on DJGPP
(meaning distcheck will detect less bugs) and skip this test
when read-only directories aren't available.  Does the following
patch achieve this?  (Don't forget to rebuild `tests/defs' if
you run the test case manually.)

2003-02-20  Alexandre Duret-Lutz  <address@hidden>

        * tests/defs.in: Handle required=ro-dir.
        * tests/destdir.test: Use this.

Index: tests/defs.in
===================================================================
RCS file: /cvs/automake/automake/tests/defs.in,v
retrieving revision 1.4.2.7
diff -u -r1.4.2.7 defs.in
--- tests/defs.in       12 Feb 2003 16:26:53 -0000      1.4.2.7
+++ tests/defs.in       20 Feb 2003 11:25:00 -0000
@@ -122,6 +122,17 @@
        echo "$me: running python -V"
        ( python -V ) || exit 77
        ;;
+      ro-dir)
+       # Skip this test case if read-only directories aren't supported
+       # (e.g., under DOS.)
+       ro_dir_temp=ro_dir.$$
+       mkdir $ro_dir_temp || exit 1
+       chmod a-w $ro_dir_temp || exit 1
+       (: > $ro_dir_temp/probe) >/dev/null 2>/dev/null
+       create_status=$?
+       rm -rf $ro_dir_temp
+       test $create_status = 0 && exit 77
+       ;;
       tex)
         # No all versions of Tex support `--version', so we use
         # a configure check.
Index: tests/destdir.test
===================================================================
RCS file: /cvs/automake/automake/tests/destdir.test,v
retrieving revision 1.3
diff -u -r1.3 destdir.test
--- tests/destdir.test  8 Sep 2002 13:07:55 -0000       1.3
+++ tests/destdir.test  20 Feb 2003 11:25:00 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -21,9 +21,9 @@
 # Make sure that `make distcheck' can find some $(DESTDIR) omissions.
 # PR/186.
 
-# The feature we test here relies on read-only files.
+# The feature we test here relies on read-only directories.
 # It will only work for non-root users.
-required='non-root'
+required='ro-dir'
 
 . ./defs || exit 1
 

-- 
Alexandre Duret-Lutz





reply via email to

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