From Eclipsepedia

Revision as of 11:46, 13 October 2006 by (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Setting up a test cvs server to run the cvs tests included in the Eclipse-Automated-Tests-${BuildId}.zip

Initialize your cvs repository

For instance if your test repo is /home/repo

mkdir /home/repo

Initialize the repo for cvs

cvs -d  /home/repo init 

Edit the CVS config file to disable the history file and specify the lock directory

Edit /home/repo/CVSROOT/config

Add a comment to the beginning of this line to ensure the history file is not used, this will just create a giant file that eventually needs to be deleted. The cvs tests don't use a history file.

# Set `LogHistory' to `all' or `TOEFWUPCGMAR' to log all transactions to the
# history file, or a subset as needed (ie `TMAR' logs all write operations)

Remove the comment at the beginning of this line to ensure the lockfiles are written here.

# Put CVS lock files in this directory rather than directly in the repository.

Change the permissions so the cvs user can access the files in the repo

chown -R tests.tests repo
chmod 777 repo

(The permissions don't actually need to be that lenient but it's just a test repo with bogus content so security isn't an issue).

ls -ld repo drwxrwxrwx  4051 tests tests 1073152 Oct  6 21:47 repo

The cvs_user in the document below must have permission to write to the repo.

@cvs_user@ - the account used to connect to the cvs repository
@cvs_password@- the account password
@cvs_host@- the name of the cvs server
@cvs_root@- the repository path

The cvs tests use two types of access to the cvs server


pserver access must be set up as a service in xinetd.d

cat /etc/xinetd.d/cvspserver
service cvspserver
   socket_type          = stream
   wait                 = no
   user                 = root
   cps                  = 10000
   server               = /usr/bin/cvs
   server_args          = --allow-root=/home/sdimitro/repo -f pserver

To verify that pserver has started

service xinetd restart netstat -l | grep cvspserver


If you have the cvs repository initialized as I described above and the sshd server daemon is running, your cvs tests using ssh should work fine.

Housecleaning tips for your test cvs repo

Run a script every so often to clean up the test repo. Otherwise the tests will fail because there are too many files in the directory. As root, add this to the crontab to clean up the repo and the lock directory

0 7 * * 0  cd /home/repo;  /usr/bin/find . -name '*test*' | xargs rm -rf
0 6 * * 0  cd /var/lock/cvs;  /usr/bin/find . -name '*test*' | xargs rm -rf