Description
I was about to update python-git package in Debian, and since I am a paranoid fella I wanted to enable build time unittesting. For that I have updated gitdb
to 0.6.0 and smmap to 0.8.3 but now I am getting a plethora of tests failing with 0.3.2.1 (btw -- please use annotated tags for the releases!) and even with tip of 0.3 (0.3.2.1-24-g891b124). Here are erroring and failing tests on my jessie/sid box
======================================================================
ERROR: test_index_merge_tree (git.test.test_index.TestIndex)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/lib/helper.py", line 111, in repo_creator
return func(self, rw_repo)
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/test_index.py", line 217, in test_index_merge_tree
unmerged_tree = IndexFile.from_tree(rw_repo, parent_commit, tree, next_commit)
File "/home/yoh/deb/gits/python-git.gitsvn/git/index/base.py", line 335, in from_tree
repo.git.read_tree(*arg_list, **kwargs)
File "/home/yoh/deb/gits/python-git.gitsvn/git/cmd.py", line 242, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/home/yoh/deb/gits/python-git.gitsvn/git/cmd.py", line 540, in _call_process
return self.execute(make_call(), **_kwargs)
File "/home/yoh/deb/gits/python-git.gitsvn/git/cmd.py", line 403, in execute
raise GitCommandError(command, status, stderr_value)
GitCommandError: 'git read-tree --reset --aggressive --index-output=/home/yoh/.tmp/tmp4i1jT3non_bare_test_index_merge_tree/.git/z53Ynf c76852d0bff115720af3f27acdb084c59361e5f6 dbf49515b3c9357beddebdd45994e69690386934 4c39f9da792792d4e73fc3a5effde66576ae128c' returned exit status 128: error: cache entry has null sha1: MANIFEST.in
fatal: unable to write new index file
that directory /home/yoh/.tmp/tmp4i1jT3non_bare_test_index_merge_tree/.git/ is there, and there is MANIFEST.in:
ls /home/yoh/.tmp/tmp4i1jT3non_bare_test_index_merge_tree/
AUTHORS CHANGES LICENSE MANIFEST.in README VERSION doc/ ez_setup.py lib/ setup.py test/
======================================================================
ERROR: test_index_mutation (git.test.test_index.TestIndex)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/lib/helper.py", line 111, in repo_creator
return func(self, rw_repo)
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/test_index.py", line 463, in test_index_mutation
[os.path.abspath(os.path.join('lib', 'git', 'head.py'))] * 2, fprogress=self._fprogress_add)
File "/home/yoh/deb/gits/python-git.gitsvn/git/index/base.py", line 690, in add
paths, entries = self._preprocess_add_items(items)
File "/home/yoh/deb/gits/python-git.gitsvn/git/index/base.py", line 552, in _preprocess_add_items
paths.append(self._to_relative_path(item))
File "/home/yoh/deb/gits/python-git.gitsvn/git/index/base.py", line 542, in _to_relative_path
raise ValueError("Absolute path %r is not in git repository at %r" % (path, self.repo.working_tree_dir))
ValueError: Absolute path '/tmp/tmpE34FxXnon_bare_test_index_mutation/lib/git/head.py' is not in git repository at '/home/yoh/.tmp/tmpE34FxXnon_bare_test_index_mutation'
lie:
(git)hopa:~/.tmp/tmpE34FxXnon_bare_test_index_mutation[upstream-0.3]git
$> git status
On branch upstream-0.3
Your branch and 'origin/upstream-0.3' have diverged,
and have 3 and 791 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Untracked files:
(use "git add <file>..." to include in what will be committed)
lib/
nothing added to commit but untracked files present (use "git add" to track)
3
======================================================================
ERROR: test_base (git.test.test_reflog.TestRefLog)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/test_reflog.py", line 42, in test_base
reflog = RefLog.from_file(rlp_master_ro)
File "/home/yoh/deb/gits/python-git.gitsvn/git/refs/log.py", line 157, in from_file
return cls(filepath)
File "/home/yoh/deb/gits/python-git.gitsvn/git/refs/log.py", line 131, in __init__
self._read_from_file()
File "/home/yoh/deb/gits/python-git.gitsvn/git/refs/log.py", line 143, in _read_from_file
self._deserialize(fmap)
File "/home/yoh/deb/gits/python-git.gitsvn/git/refs/log.py", line 293, in _deserialize
self.extend(self.iter_entries(stream))
File "/home/yoh/deb/gits/python-git.gitsvn/git/refs/log.py", line 183, in iter_entries
yield new_entry(line.strip())
File "/home/yoh/deb/gits/python-git.gitsvn/git/refs/log.py", line 89, in from_line
raise ValueError("line is missing tab separator")
ValueError: line is missing tab separator
not sure what to check/report
similar one(s):
======================================================================
ERROR: test_reflog (git.test.test_refs.TestRefs)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/test_refs.py", line 538, in test_reflog
assert isinstance(self.rorepo.heads.master.log(), RefLog)
File "/home/yoh/deb/gits/python-git.gitsvn/git/refs/symbolic.py", line 351, in log
return RefLog.from_file(RefLog.path(self))
File "/home/yoh/deb/gits/python-git.gitsvn/git/refs/log.py", line 157, in from_file
return cls(filepath)
File "/home/yoh/deb/gits/python-git.gitsvn/git/refs/log.py", line 131, in __init__
self._read_from_file()
File "/home/yoh/deb/gits/python-git.gitsvn/git/refs/log.py", line 143, in _read_from_file
self._deserialize(fmap)
File "/home/yoh/deb/gits/python-git.gitsvn/git/refs/log.py", line 293, in _deserialize
self.extend(self.iter_entries(stream))
File "/home/yoh/deb/gits/python-git.gitsvn/git/refs/log.py", line 183, in iter_entries
yield new_entry(line.strip())
File "/home/yoh/deb/gits/python-git.gitsvn/git/refs/log.py", line 89, in from_line
raise ValueError("line is missing tab separator")
ValueError: line is missing tab separator
4
======================================================================
ERROR: test_fetch_info (git.test.test_remote.TestRemote)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/test_remote.py", line 454, in test_fetch_info
fetch_info_line_fmt % 'remote-tracking branch')
File "/home/yoh/deb/gits/python-git.gitsvn/git/remote.py", line 260, in _from_line
raise ValueError("Failed to parse FETCH__HEAD line: %r" % fetch_line)
ValueError: Failed to parse FETCH__HEAD line: "c437ee5deb8d00cf02f03720693e4c802e99f390 not-for-merge remote-tracking branch '0.3' of git://github.com/gitpython-developers/GitPython"
probably has to do that local branch is called upstream-0.3. Was initiated with git co --track -b upstream-0.3 upstream/0.3
5
======================================================================
ERROR: test_rev_parse (git.test.test_repo.TestRepo)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/test_repo.py", line 502, in test_rev_parse
obj = self._assert_rev_parse(path_section)
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/test_repo.py", line 451, in _assert_rev_parse
self._assert_rev_parse_types(rev, obj2)
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/test_repo.py", line 432, in _assert_rev_parse_types
obj = rev_parse(name + ':CHANGES')
File "/home/yoh/deb/gits/python-git.gitsvn/git/repo/fun.py", line 296, in rev_parse
obj = obj[rev[start:]]
File "/home/yoh/deb/gits/python-git.gitsvn/git/objects/tree.py", line 238, in __getitem__
return self.__div__(item)
File "/home/yoh/deb/gits/python-git.gitsvn/git/objects/tree.py", line 192, in __div__
raise KeyError(msg % file)
KeyError: "Blob or Tree named 'CHANGES' not found"
6
======================================================================
ERROR: test_base_rw (git.test.test_submodule.TestSubmodule)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/lib/helper.py", line 111, in repo_creator
return func(self, rw_repo)
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/test_submodule.py", line 381, in test_base_rw
self._do_base_tests(rwrepo)
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/test_submodule.py", line 203, in _do_base_tests
sm.update(recursive=True)
File "/home/yoh/deb/gits/python-git.gitsvn/git/objects/submodule/base.py", line 476, in update
submodule.update(recursive, init, to_latest_revision, progress=progress, dry_run=dry_run)
File "/home/yoh/deb/gits/python-git.gitsvn/git/objects/submodule/base.py", line 391, in update
mrepo = git.Repo.clone_from(self.url, module_path, n=True)
File "/home/yoh/deb/gits/python-git.gitsvn/git/repo/base.py", line 753, in clone_from
return cls._clone(Git(os.getcwd()), url, to_path, GitCmdObjectDB, progress, **kwargs)
File "/home/yoh/deb/gits/python-git.gitsvn/git/repo/base.py", line 705, in _clone
finalize_process(proc)
File "/home/yoh/deb/gits/python-git.gitsvn/git/util.py", line 132, in finalize_process
proc.wait()
File "/home/yoh/deb/gits/python-git.gitsvn/git/cmd.py", line 114, in wait
raise GitCommandError(self.args, status, self.proc.stderr.read())
GitCommandError: 'git clone -n -v /home/yoh/deb/gits/python-git.gitsvn/git/ext/gitdb/gitdb/ext/async /home/yoh/.tmp/tmpprVOajnon_bare_test_base_rw/git/ext/gitdb/gitdb/ext/async' returned exit status 128: fatal: repository '/home/yoh/deb/gits/python-git.gitsvn/git/ext/gitdb/gitdb/ext/async' does not exist
I do not see anything about defining this one (only gitdb/ext/smmap) in gitdb submodule
7
======================================================================
ERROR: test_root_module (git.test.test_submodule.TestSubmodule)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/lib/helper.py", line 111, in repo_creator
return func(self, rw_repo)
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/test_submodule.py", line 464, in test_root_module
nsm = Submodule.add(rwrepo, nsmn, nsmp, url=async_url)
File "/home/yoh/deb/gits/python-git.gitsvn/git/objects/submodule/base.py", line 286, in add
mrepo = git.Repo.clone_from(url, path, **kwargs)
File "/home/yoh/deb/gits/python-git.gitsvn/git/repo/base.py", line 753, in clone_from
return cls._clone(Git(os.getcwd()), url, to_path, GitCmdObjectDB, progress, **kwargs)
File "/home/yoh/deb/gits/python-git.gitsvn/git/repo/base.py", line 705, in _clone
finalize_process(proc)
File "/home/yoh/deb/gits/python-git.gitsvn/git/util.py", line 132, in finalize_process
proc.wait()
File "/home/yoh/deb/gits/python-git.gitsvn/git/cmd.py", line 114, in wait
raise GitCommandError(self.args, status, self.proc.stderr.read())
GitCommandError: 'git clone -v /home/yoh/deb/gits/python-git.gitsvn/git/ext/gitdb/gitdb/ext/smmap submrepo' returned exit status 128: fatal: repository '/home/yoh/deb/gits/python-git.gitsvn/git/ext/gitdb/gitdb/ext/smmap' does not exist
because I apparently didn't recurse into init/update submodules within gitdb submod. May be test could be improved to report "Please init/update submodules under git/ext/gitdb" (I found no init --recursive, although there is update --recursive)
8-11
======================================================================
FAIL: test_with_rw_remote_and_rw_repo (git.test.test_base.TestBase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/lib/helper.py", line 199, in remote_repo_creator
'Please start a git-daemon to run this test, execute: git-daemon "%s"' % os.path.dirname(_mktemp()))
AssertionError: Please start a git-daemon to run this test, execute: git-daemon "/home/yoh/.tmp"
======================================================================
FAIL: test_iteration (git.test.test_commit.TestCommit)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/test_commit.py", line 183, in test_iteration
assert len(ltd_commits) < len(less_ltd_commits)
AssertionError
======================================================================
FAIL: test_base (git.test.test_remote.TestRemote)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/lib/helper.py", line 199, in remote_repo_creator
'Please start a git-daemon to run this test, execute: git-daemon "%s"' % os.path.dirname(_mktemp()))
AssertionError: Please start a git-daemon to run this test, execute: git-daemon "/home/yoh/.tmp"
======================================================================
FAIL: test_parse_date (git.test.test_util.TestUtils)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/test_util.py", line 107, in test_parse_date
assert_rval(parse_date(date), veri_time, offset)
File "/home/yoh/deb/gits/python-git.gitsvn/git/test/test_util.py", line 90, in assert_rval
assert rval[0] == veri_time
AssertionError
Activity
Byron commentedon Dec 18, 2014
It's a known issue that git-python currently has failing tests, which are supposed to get fixed for the v0.3.3 release. It's interesting to see that there are different issues than there are on OSX, as I see only 3 errors and 3 failures, whereas you appear to have 8 and 4 respectively.
However, gitdb and smmap, should work fine on OSX and linux. My linux testing is currently only done regularly via travis ci though, as I work on OSX.
async
has been removed and is no dependency anymore, the submodule tests related to it might fail because they have not been updated yet. git-submodule support in git-python is also heavily outdated due to the changes done to how git handles submodules by now.Also, what kind of information would you expect in an annotated tag ?
My test results for comparison
All tests performed on 750e967, and I ran the
git daemon /tmp
as stated in one of the failing tests and made sure git-python was checked out with--init --recursive
. In one of the tests listed by you, it says it wantsgit daemon "/home/yoh/.tmp"
to make this test work.It seems that linux shows no more regression than OSX, judging from comparison with xubuntu at least , and I would have expected the debian box you are using to be somewhat comparable to that.
OSX (git 1.9.3, python 2.7.6)
Xubuntu (git 1.9.1, python 2.7.6)
Centos 6.5 (git 1.7.1, python 2.6.6)
Fedora 17 (git 1.7.11.7, python 2.7.3)
This one shows errors related to a nonesense e-mail which is auto-generated by the test - certainly a bug worth fixing too.
yarikoptic commentedon Dec 18, 2014
Thanks for the detailed answer!!!
whatever you wish ;) the point is that it would become a "proper tag" instead of a mere pointer, and "git describe" would use it without necessity to specify
--tags
yarikoptic commentedon Dec 18, 2014
btw -- "and I ran the git daemon /tmp as stated in one of the failing tests" -- might be better to start it automagically ? I do smth like that with a decorator in another project for starting web server for some tests -- if of any help: https://github.com/datalad/datalad/blob/HEAD/datalad/tests/utils.py#L164
Byron commentedon Dec 18, 2014
git describe
was confusing me plenty of times before because it didn't work out of the box as I expected. Tags are tags, I thought, at least git didn't ever make it clear to me that ref based tags are somehow considered minor. Next time, I will try to remember to use proper tags though, thanks for the hint.yarikoptic commentedon Dec 18, 2014
"0.3 and package it as 0.3.2.1 "
no no no ;)
so it will become 0.3.2.1+git24-g891b124, unless you give it a 0.3.2.2 tag ;)
Byron commentedon Dec 18, 2014
:D ! Yes, I was sloppy there, but you got my point. It would be a bad thing not to be able to figure out exactly which commit the debian version was made from.
As I don't want to re-release for minor changes just yet, I believe
0.3.2.1+git24-g891b124
it is then.yarikoptic commentedon Dec 18, 2014
or may be lazy me should just wait for tests to get fixed... --exclude becomes too long atm :-/
btw -- here is the one on date parsing -- seems to be an issue of GMT vs local zone (I am in EDT)
yarikoptic commentedon Dec 18, 2014
as for 3: (missing tab separator)
so indeed no tabs -- spaces (git 2.1.3)
yarikoptic commentedon Dec 18, 2014
btw -- are you working on the .travis.yml or should I try? ;-)
Byron commentedon Dec 18, 2014
This file does exist, and I didn't trust myself there at all either ;).
Are you talking about the excludes you wanted to add ? I thought these are related to your package scripts.
yarikoptic commentedon Dec 18, 2014
re travis: sorry!! I was blind (or just was looking in the wrong place doing too many things at once). Indeed it is failing with 2 of the tests which fail for me. I have provided info on the date one , and here is for the test_iteration:
if of any help... should I bisect them if that would be of any help?
Byron commentedon Dec 18, 2014
This would certainly be helpful if you want to invest the time. Nonetheless, I don't think we will get the next release done today as I have to get to a meetup soon.
As I wanted to get 0.3.3 out of the door ... 30 days ago ... I guess I can just get going tomorrow and make sure this happens this year ! Sorry for that, it's just this "I don't really want to do anything even though doing the opposite would actually help" syndrome I have to overcome :) !
yarikoptic commentedon Dec 18, 2014
bisect - ok -- I will try! and no problem that "not today" -- thank you very much for this project and pushing it full steam forward! hopefully at some point I could become a more useful contributor ;)
Byron commentedon Dec 18, 2014
Thanks !
Alright, tomorrow is the day, something tells me that fixing the remaining issues will not be rocket science at all (except for submodule support, which is scheduled for a later release anyway).
5 remaining items