Commit graph

75 commits

Author SHA1 Message Date
Joey Hess
ecd9b6731e try harder to delete test dir on windows 2014-02-03 11:45:31 -04:00
Joey Hess
29bb04aa0d Windows: Fix deletion of repositories by test suite and webapp.
On Windows, a file that is not writable cannot be deleted even if in a
directory with write perms. So git object files were not getting deleted
when removing a git repository.
2014-02-03 11:19:41 -04:00
Joey Hess
1669e80e85 Windows: Avoid using unix-compat's rename, which refuses to rename directories.
Opened a bug about this: https://github.com/jystic/unix-compat/issues/10
2014-01-29 15:19:03 -04:00
Joey Hess
998d76ae04 Revert "temporarily revert tasty-rerun support for this release"
This reverts commit 8fcf041159.
2014-01-27 14:22:44 -04:00
Joey Hess
8fcf041159 temporarily revert tasty-rerun support for this release
revert c340d9506c

tasty-rerun is stuck in NEW in debian
2014-01-27 13:58:43 -04:00
Joey Hess
74b101d1dd reorg 2014-01-26 16:36:31 -04:00
Joey Hess
86ffeb73d1 reorganize some files and imports 2014-01-26 16:25:55 -04:00
Joey Hess
c340d9506c tasty-rerun! make rerest runs much much faster than running whole test suite 2014-01-24 12:21:30 -04:00
Joey Hess
ae3cd632bd add timestamps to unused log files
This will be used in expiring old unused objects. The timestamp is when it
was first noticed it was unused.

Backwards compatability: It supports reading old format unused log files.
The old version of git-annex will ignore lines in log files written by the
new version, so the worst interop problem would be git annex dropunused not
knowing some numbers that git-annex unused reported.
2014-01-22 15:33:02 -04:00
Joey Hess
e38a21a768 tests should now all run independently, without needing any prior tests to have run
Should be ready now for tasty-rerun.
2014-01-21 14:26:13 -04:00
Joey Hess
4a4e2f9a6c use tasty resources 2014-01-21 14:04:50 -04:00
Joey Hess
d1bf61464f expose tasty test suite's option parser 2014-01-21 00:08:43 -04:00
Joey Hess
d66535f065 global numcopies setting
* numcopies: New command, sets global numcopies value that is seen by all
  clones of a repository.
* The annex.numcopies git config setting is deprecated. Once the numcopies
  command is used to set the global number of copies, any annex.numcopies
  git configs will be ignored.
* assistant: Make the prefs page set the global numcopies.

This global numcopies setting is needed to let preferred content
expressions operate on numcopies.

It's also convenient, because typically if you want git-annex to preserve N
copies of files in a repo, you want it to do that no matter which repo it's
running in. Making it global avoids needing to warn the user about gotchas
involving inconsistent annex.numcopies settings.
(See changes to doc/numcopies.mdwn.)

Added a new variety of git-annex branch log file, that holds only 1 value.
Will probably be useful for other stuff later.

This commit was sponsored by Nicolas Pouillard.
2014-01-20 16:47:56 -04:00
Joey Hess
7e311a00d0 Fix typo in test suite. 2013-12-24 14:02:02 -04:00
Joey Hess
cee4c9a11d Fix test suite to cover lock --force change. 2013-12-15 13:33:09 -04:00
Joey Hess
bc0517fc86 test direct mode first (it breaks more often) 2013-11-26 17:05:13 -04:00
Joey Hess
7323770d8a run each quickcheck test 1000, rather than 100 times
I've had one or two fails sent to me involving cases QuickCheck didh't
easily find, and tasty makes this easy.
2013-11-15 17:04:40 -04:00
Joey Hess
27fb2b6126 add test case for b0f85b3e22 2013-11-15 15:42:31 -04:00
Joey Hess
238fa05545 tasty fully working 2013-11-14 20:09:47 -04:00
Joey Hess
cf93636df8 finished converting test suite for tasty
Also merged in Test.hs from master.
2013-11-14 17:03:49 -04:00
Joey Hess
8189738b13 test suite partially converted to use tasty test framework
This is a win. Will need to wait for tasty getting into Debian,
and do a trivial conversion of the remainder of the hunit tests.
2013-08-06 00:12:06 -04:00
Joey Hess
fc96861084 enable 2 more tests on Windows 2013-08-04 13:54:05 -04:00
Joey Hess
38022f4f49 Windows: Fixed permissions problem that prevented removing files from directory special remote.
Directory special remotes now fully usable.
2013-08-04 13:43:48 -04:00
Joey Hess
6a97896b47 missed some __WINDOWS__ defines 2013-08-04 13:07:55 -04:00
Joey Hess
f59a2f8e82 regression test for 7b0970b340 2013-07-30 17:04:05 -04:00
Joey Hess
147a9f8882 Improve test suite on Windows; now tests git annex sync. 2013-07-30 17:03:32 -04:00
Joey Hess
6ac595f8b5 update test suite for dropunused behavior change 2013-07-30 14:17:09 -04:00
Joey Hess
f353f13c9d Support unannex and uninit in direct mode.
In direct mode, it's best to whenever possible not move direct mode files
out of the way, and so I made unannex avoid touching the direct mode file at
all.

That actually turns out to be easy, because in direct mode, unlike indirect
mode, the pre-commit hook won't get confused if the unannexed file later
gets added back by git add. So there's no need to commit the unannex right
away; it can be staged for the user to commit later. This also means that
unannex in direct mode is a lot faster than in indirect mode!

Another subtle bit is the bookkeeping that is done when unannexing a direct
mode file. The inode cache needs to be removed so that when uninit runs
getKeysPresent, it doesn't see the cache and think the key is still
present and crash when it's not.

This commit is sponsored by Douglas Butts. Thanks!
2013-07-22 17:28:53 -04:00
Joey Hess
8661dba587 adjust test suite for changed dropunused behavior with bogus numbers 2013-07-09 14:46:20 -04:00
Joey Hess
bab49ac7c6 few final bits for fully working test suite on windows 2013-06-18 16:37:54 -04:00
Joey Hess
8b3427c52e Windows: The test suite now passes on Windows (a few broken parts are disabled).
Better to have a working test suite that doesn't test a few things
than no working test suite.

Most of the disabled stuff is because for some reason "git annex sync"
doesn't work when run inside the test suite. Looks like PATH problems.

The directory and rsync special remotes seem broken on Windows, or
maybe the tests are. Pretty sure the hook special remote test is broken.
2013-06-18 16:16:25 -04:00
Joey Hess
55f971de3c disable a test that windows git doesn't support 2013-06-18 15:21:13 -04:00
Joey Hess
4e28e84baf more slash fixes 2013-06-18 15:15:00 -04:00
Joey Hess
8063d68b02 couple path separator fixes 2013-06-18 14:08:35 -04:00
Joey Hess
6ac3d33445 allow test temp dir removal to fail (working around some problem on Windows) 2013-06-18 13:41:33 -04:00
Joey Hess
09edbd5df2 some basic tests of preferred content expressions and standard groups 2013-05-25 13:51:36 -04:00
Joey Hess
f8e940eb8e Fix bug in parsing of parens in some preferred content expressions. This fixes the behavior of the manual mode group.
The current manual mode preferred content expression is:

"present and (((exclude=*/archive/* and exclude=archive/*) or (not (copies=archive:1 or copies=smallarchive:1))) or (not copies=semitrusted+:1))"

The old matcher misparsed this, to basically:

OR (present and (...)) (not copies=semitrusted+:1))

The paren handling and indeed the whole conversion from tokens to the
matcher was just wrong. The new way may not be the cleverest, but I think
it is correct, and you can see how it pattern matches structurally against
the expressions when parsing them.

That expression is now parsed to:

MAnd (MOp <function>)
  (MOr (MOr (MAnd (MOp <function>) (MOp <function>)) (MNot (MOr (MOp <function>) (MOp <function>))))
    (MNot (MOp <function>)))

Which appears correct, and behaves correct in testing.

Also threw in a simplifier, so the final generated Matcher has less
unnecessary clutter in it. Mostly so that I could more easily read &
confirm them.

Also, added a simple test of the Matcher to the test suite.

There is a small chance of badly formed preferred content expressions
behaving differently than before due to this rewrite.
2013-05-24 21:46:33 -04:00
Joey Hess
46eb1ea1e7 add a test case for merge conflict automatic resolution 2013-05-20 16:28:22 -04:00
Joey Hess
475e705643 run the test suite twice, once in direct mode
On a filesystem that only supports direct mode, it will test
direct mode twice, but oh well.
2013-05-20 14:09:50 -04:00
Joey Hess
19715b9cff fix windows build 2013-05-19 21:07:47 -04:00
Joey Hess
d5ba9cb728 Allow building with gpg2. 2013-05-19 17:59:58 -04:00
Joey Hess
de3853375e better message 2013-05-17 16:52:50 -04:00
Joey Hess
142bd163a2 ssh warnings 2013-05-17 16:51:46 -04:00
Joey Hess
7f6a82df67 can't test gpg on Windows yet 2013-05-17 16:49:34 -04:00
Joey Hess
b26e20fa59 use posixcompat 2013-05-17 16:47:25 -04:00
Joey Hess
8779ad1be9 try building test suite on windows 2013-05-17 16:45:44 -04:00
Joey Hess
ba0c165704 fsck behavior varies in direct mode when the file is modified 2013-05-17 15:20:21 -04:00
Joey Hess
a5dc269cd7 disable unused test in direct mode
This test is actually pointing at a problem, with
getKeysPresent in direct mode. When a file is git rm -f'd,
this removes its content, but it's still listed by getKeysPresent.

However, unused is fairly useless in direct mode, and the test
needs to be updated to handle other differences, so disable it for now
2013-05-17 15:16:28 -04:00
Joey Hess
bc2dcee514 disable stuff that is not supported in direct mode
Also fixed a git rm that failed due to seeing modified file content
in direct mode.
2013-05-17 15:00:33 -04:00
Joey Hess
26923b5d64 fix test 2013-05-15 22:10:49 -04:00