]> arthur.barton.de Git - bup.git/commit
tgit.py: provoke ENOTDIR rather than EACCES in test_check_repo_or_die().
authorRob Browning <rlb@defaultvalue.org>
Mon, 21 Mar 2011 01:35:53 +0000 (20:35 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Mon, 21 Mar 2011 08:34:30 +0000 (01:34 -0700)
commit8be6d5b25ae32fb3b559d8b1c24fd1603c1647e6
treed8198c39cf706307da8b12cc9daf5c486d3eb538
parentd7b622412a8738c059f3ed5205d36bc0e52b9bac
tgit.py: provoke ENOTDIR rather than EACCES in test_check_repo_or_die().

Replace the objects/pack directory with an empty file to provoke an
ENOTDIR error from stat('objects/pack/.').

Previously the code changed the permissions of the test directory to
0000 in order to provoke an error other than ENOENT (i.e. EACCES), but
that doesn't work when the tests are run as root or fakeroot.

(As Gabriel Filion pointed out, the chmod of the testdir is no
longer necessary, so I removed it and squashed that into this patch.
-- apenwarr)

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Makefile
lib/bup/t/tgit.py