* More information on git for Cygwin x86-64
@ 2006-06-01 23:44 Tim O'Callaghan
2006-06-02 6:37 ` Alex Riesen
0 siblings, 1 reply; 2+ messages in thread
From: Tim O'Callaghan @ 2006-06-01 23:44 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]
After some investigation, it looks like the problem is to do with the
index.lock file. I think it may have something to do with with the
rename function in index.c.
As far as i can tell index.lock should not exist after any git
call. An atexit() call is registered remove it when it is created, so
this should ensure it gets removed. Unfortunately that is not what
happens in this case.
A quick check with an unlink() before the rename in index.c, worked
for the first failure in t0000-basic, but not the next one.
The only relevant reference I could find in the list archives is:
http://www.gelato.unsw.edu.au/archives/git/0510/10188.html
The attached patch has two fixes. The first is a check to see if
cygwin is installed, and if so, to ensure that the script uses cygwin
Unix style find, rather than the win2k find.
The second adds a test_warning_ function to the test library. Not sure
how useful th may be to everyone else, but it works for me. This
checks to see if the index.lock still exists, and adds a simple
'warning' category to the tests.
Tim.
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 2233 bytes --]
diff --git a/t/README b/t/README
index ac5a3ac..d278702 100644
--- a/t/README
+++ b/t/README
@@ -52,7 +52,7 @@ (or -i) command line argument to the tes
--immediate::
This causes the test to immediately exit upon the first
- failed test.
+ failed test or warning.
Naming Tests
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 05f6e79..e24cab0 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -80,6 +80,7 @@ fi
test_failure=0
test_count=0
+warning_count=0
trap 'echo >&5 "FATAL: Unexpected exit with code $?"; exit 1' exit
@@ -101,6 +102,17 @@ test_failure_ () {
test "$immediate" = "" || { trap - exit; exit 1; }
}
+test_warning_ () {
+ if [ -e ".git/index.lock" ]
+ then
+ say "Warn $warning_count: file .git/index.lock exists"
+ warning_count=$(expr "$warning_count" + 1)
+ fi
+ if [ "$immediate" != "" -a $warning_count -gt 0 ]
+ then
+ trap - exit; exit 1;
+ fi
+}
test_debug () {
test "$debug" = "" || eval "$1"
@@ -123,6 +135,7 @@ test_expect_failure () {
else
test_failure_ "$@"
fi
+ test_warning_
}
test_expect_success () {
@@ -136,6 +149,7 @@ test_expect_success () {
else
test_failure_ "$@"
fi
+ test_warning_
}
test_expect_code () {
@@ -149,6 +163,7 @@ test_expect_code () {
else
test_failure_ "$@"
fi
+ test_warning_
}
# Most tests can use the created repository, but some amy need to create more.
@@ -178,13 +193,12 @@ test_done () {
# The Makefile provided will clean this test area so
# we will leave things as they are.
- say "passed all $test_count test(s)"
+ say "passed all $test_count test(s) with $warning_count warning(s)"
exit 0 ;;
*)
- say "failed $test_failure among $test_count test(s)"
+ say "failed $test_failure among $test_count test(s) with $warning_count warning(s)"
exit 1 ;;
-
esac
}
@@ -210,6 +224,13 @@ test -d ../templates/blt || {
error "You haven't built things yet, have you?"
}
+# make sure the cygwin find is used instead of the win2k find.
+if [ $(uname -o 2>/dev/null || echo not) = "Cygwin" ]
+then
+ alias find="/bin/find"
+fi
+
+
# Test repository
test=trash
rm -fr "$test"
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: More information on git for Cygwin x86-64
2006-06-01 23:44 More information on git for Cygwin x86-64 Tim O'Callaghan
@ 2006-06-02 6:37 ` Alex Riesen
0 siblings, 0 replies; 2+ messages in thread
From: Alex Riesen @ 2006-06-02 6:37 UTC (permalink / raw)
To: Tim O'Callaghan, git
On 6/2/06, Tim O'Callaghan <timo@dspsrv.com> wrote:
> After some investigation, it looks like the problem is to do with the
> index.lock file. I think it may have something to do with with the
> rename function in index.c.
Does setting "NO_MMAP = YesPlease" in config.mak helps you?
The problem this option solves has to do with stupid open
file behaviour in windows.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-02 6:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-01 23:44 More information on git for Cygwin x86-64 Tim O'Callaghan
2006-06-02 6:37 ` Alex Riesen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).