Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How should I manage Test Harnesses in Git - Should they be in a separate repo?

I have a large(ish) project [90 files 650kb code] that I now manage in Git. I have a few independent test harnesses used to try/test new low level bits of computation which are later merged into the main code and its branches (currently via copy-paste!).

What is the recommended best practice for managing the Test Harnesses?

Should they be in a separate repository, or should I create an empty branch in the main repo to start it, or just create a "Test Harness" branch and overwrite the old code?

The hoped for benefit is that the tested code in the main branch would be demonstrably 'the same' as that that was tested.

I'm on Windows (msysgit) and I'm the lead 'explorer' for using Git in the company.

like image 202
Philip Oakley Avatar asked Apr 21 '11 14:04

Philip Oakley


2 Answers

The usual structure I've seen in most projects is to include a test/ directory hierarchy parallel to src/, and store them there (in the same repo).

like image 200
Daenyth Avatar answered Sep 28 '22 02:09

Daenyth


90 files and 650KB of source code is definitely not large. It is better to keep the test harness/test suite etc. along with your source code in the same repository. Check some of the repositories in github (for example: PLY) and decide on how you organize your source code and test suite.

like image 20
sateesh Avatar answered Sep 28 '22 03:09

sateesh