Commit graph

62 commits

Author SHA1 Message Date
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
Joey Hess
c3e19d65e4 cleanup 2013-05-15 19:58:40 -04:00
Joey Hess
ecca55ae85 more fixes for test suite in direct mode
Still quite a few failures.
2013-05-15 19:33:27 -04:00
Joey Hess
ee942c876f a few fixes for the test suite in direct mode
Still far from working.
2013-05-15 17:44:30 -04:00
Joey Hess
9a2f8b02e9 thread env through test suite
This will allow porting it to Windows, which cannot set environment except
when forking processes.

This is nasty, but HUnit can only test the IO monad, so
I cannot use a Reader monad.
2013-05-15 17:22:45 -04:00
Joey Hess
92910f5107 fix build 2013-05-12 19:13:38 -04:00
Joey Hess
abe8d549df fix permission damage (thanks, Windows) 2013-05-11 23:54:25 -04:00
Joey Hess
1e2ddcb68a use setCurrentDirectory
On POSIX, this just calls changeWorkingDirectory.
2013-05-11 19:14:30 -04:00
Joey Hess
18bdff3fae clean up from windows porting 2013-05-11 18:23:41 -04:00
Joey Hess
3c7e30a295 git-annex now builds on Windows (doesn't work) 2013-05-11 15:03:00 -05:00
Joey Hess
763cbda14f fixup #if 0 stubs to use #ifndef mingw32_HOST_OS
That's needed in files used to build the configure program.
For the other files, I'm keeping my __WINDOWS__ define, as I find that much easier to type.
I may search and replace it to use the mingw32_HOST_OS thing later.
2013-05-10 16:57:21 -05:00
Joey Hess
6c74a42cc6 stub out POSIX stuff 2013-05-10 16:29:59 -05:00
Joey Hess
2acd981b6e update for initremote changes 2013-05-01 02:23:52 -04:00
guilhem
00fc21bfec Generate ciphers with a better entropy.
Unless highRandomQuality=false (or --fast) is set, use Libgcypt's
'GCRY_VERY_STRONG_RANDOM' level by default for cipher generation, like
it's done for OpenPGP key generation.

On the assistant side, the random quality is left to the old (lower)
level, in order not to scare the user with an enless page load due to
the blocking PRNG waiting for IO actions.
2013-04-06 16:09:51 -04:00