cvs tests: skip tests that call "cvs commit" when running as root
commita78d9258dc1fdfbecf0a60f21a8bb1594a07c442
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 27 Feb 2017 11:26:28 +0000 (27 11:26 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Feb 2017 19:34:53 +0000 (27 11:34 -0800)
tree6a34048d71cad6152870cb36eee6d8d8385f02c9
parent3b9e3c2cede15057af3ff8076c45ad5f33829436
cvs tests: skip tests that call "cvs commit" when running as root

Change the tests that fail to when we run the test suite as root, due
to calling "cvs commit".

The GNU cvs package has an optional compile-time CVS_BADROOT
flag. When compiled with this flag "cvs commit" will refuse to commit
anything as root. On my Debian box this isn't compiled in[1] in, but
on CentOS it is.

I've run all the t/t*cvs*.sh tests, and these are the only two that
fail. For some reason e.g. t9402-git-cvsserver-refs.sh still works as
root despite doing "cvs commit", I haven't dug into why.

This commit is technically being overzealous, we could do better by
making a mock cvs commit as root and run the tests if that works, but
I don't see any compelling reason to bend over backwards to run these
tests in all cases, just skipping them as root seems good enough.

1. Per: strings /usr/bin/cvs|grep 'is not allowed to commit'
   Using cvs 1.11.23 on CentOS, 1.12.13-MirDebian-18 on Debian.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9200-git-cvsexportcommit.sh
t/t9600-cvsimport.sh