monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] two patches to get `make check' to pass


From: Jim Meyering
Subject: [Monotone-devel] two patches to get `make check' to pass
Date: Wed, 07 Sep 2005 18:01:24 +0200

Hello,

I've been lurking, updating, looking at diffs, and building
`make check' occasionally.  I was surprised to see many test
failures.  Today I investigated and found that it was due to
the fact that `testsuite' is running the monotone binary in
my path (/usr/bin/monotone == 0.22) rather than the one I'd
just built.  I don't have `.' in my PATH, btw.

Once I set TESTS_ENVIRONMENT, that solved almost all of those problems.
One failure remained: #98.  It's failing probably because I'm using a
newer version of `mv' from the GNU coreutils.

When you run `mv DIR_NAME NONEXISTENT_DIR_NAME/',
where the nonexistent target directory doesn't exist yet
is specified with a trailing slash, POSIX says mv must treat
that argument as if it were `NONEXISTENT_DIR_NAME/.'.
Hence the failure.

  mv: target `subdir2/target_dir/the_dir/' is not a directory: No such file or 
directory

Here are the patches:

2005-09-07  Jim Meyering  <address@hidden>

        * tests/t_rename_dir_cross_level.at: When invoking mv to rename
        a directory, do not include a trailing slash on the target -- that
        is not portable.

        * Makefile.am (TESTS_ENVIRONMENT): Ensure that PATH starts with
        the current directory, so we test the just-built monotone binary,
        not some older version.

# patch "Makefile.am"
#  from [8aefb7ba1e9e19ac619b8828bbcdd8106ee3e7fa]
#    to [684a8b27485402f1a0cd8e0ca29e84434ffa1daa]
#
# patch "tests/t_rename_dir_cross_level.at"
#  from [11a1751be8693f71676c8c047c1a81b0d4ed2940]
#    to [400f1b82f0f9594a2c6592c420a9728a9b75f250]
#

=================================================================================
--- Makefile.am 8aefb7ba1e9e19ac619b8828bbcdd8106ee3e7fa
+++ Makefile.am 684a8b27485402f1a0cd8e0ca29e84434ffa1daa
@@ -379,6 +379,9 @@
 
 TESTS = unit_tests $(srcdir)/testsuite
 
+TESTS_ENVIRONMENT = \
+  PATH="`pwd`$(PATH_SEPARATOR)$$PATH"
+
 mostlyclean-local:
        rm -rf testsuite.dir testsuite.log package_full_revision_dist.txt
 
=================================================================================
--- tests/t_rename_dir_cross_level.at   11a1751be8693f71676c8c047c1a81b0d4ed2940
+++ tests/t_rename_dir_cross_level.at   400f1b82f0f9594a2c6592c420a9728a9b75f250
@@ -50,7 +50,7 @@
 REVERT_TO($BASE_R)
 
 AT_CHECK(MONOTONE rename $OLD_DIR/ $NEW_DIR/, [], [ignore], [ignore])
-AT_CHECK(mv $OLD_DIR/ $NEW_DIR/)
+AT_CHECK(mv $OLD_DIR $NEW_DIR)
 COMMIT(testbranch)
 RIGHT_R=`BASE_REVISION`
 




reply via email to

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