work around adjusted unlocked branch problem in test suite
This commit is contained in:
parent
aac0e187c5
commit
9e230cd448
2 changed files with 34 additions and 0 deletions
10
Test.hs
10
Test.hs
|
@ -1738,6 +1738,11 @@ test_export_import = intmpclonerepoInDirect $ do
|
|||
git_annex "get" [] @? "get of files failed"
|
||||
annexed_present annexedfile
|
||||
|
||||
-- When on an adjusted branch, this updates the master branch
|
||||
-- to match it, which is necessary since the master branch is going
|
||||
-- to be exported.
|
||||
git_annex "sync" [] @? "sync failed"
|
||||
|
||||
git_annex "export" ["master", "--to", "foo"] @? "export to dir failed"
|
||||
dircontains annexedfile (content annexedfile)
|
||||
|
||||
|
@ -1793,6 +1798,11 @@ test_export_import_subdir = intmpclonerepoInDirect $ do
|
|||
@? "git mv failed"
|
||||
boolSystem "git" [Param "commit", Param "-m", Param "moved"]
|
||||
@? "git commit failed"
|
||||
|
||||
-- When on an adjusted branch, this updates the master branch
|
||||
-- to match it, which is necessary since the master branch is going
|
||||
-- to be exported.
|
||||
git_annex "sync" [] @? "sync failed"
|
||||
|
||||
-- Run three times because there was a bug that took a couple
|
||||
-- of runs to lead to the wrong tree being written to the remote
|
||||
|
|
24
doc/bugs/windows_export_tree_exports_empty_tree.mdwn
Normal file
24
doc/bugs/windows_export_tree_exports_empty_tree.mdwn
Normal file
|
@ -0,0 +1,24 @@
|
|||
The test suite's `test_export_import` fails on Windows.
|
||||
It seems that exporting a tree that contains annexed files
|
||||
somehow ends up exporting an empty tree.
|
||||
|
||||
The test is running in an adjusted unlocked branch. But it exports
|
||||
the master branch. The master branch indeed contains an empty tree.
|
||||
|
||||
The origin repo is also using an adjusted unlocked branch. Some changes
|
||||
have been committed there, but not synced back to the master branch.
|
||||
|
||||
On clone from that, git-annex sets up an adjusted unlocked branch,
|
||||
and it merges origin's adjusted unlocked branch in. So the annexed files
|
||||
are present in that branch, but still not in master.
|
||||
|
||||
This is not really a windows-specific problem. Only on windows or perhaps
|
||||
on a crippled FS does the test suite actually test opeation in an unlocked
|
||||
adjusted branch, because it enters that mode only on demand. Arguably
|
||||
the test suite should run all the tests separately on an adjusted branch,
|
||||
but that would add a lot of extra time to the test suite and very few
|
||||
tests are likely to behave any differently there.
|
||||
|
||||
On balance, I think that making the test case run a git-annex sync
|
||||
before exporting is good enough.
|
||||
--[[Joey]]
|
Loading…
Reference in a new issue