Jakub M.
Jakub M.

Reputation: 33857

run tests automatically after sources changed

I use Cxxtest for unit-testing my C++ code. I would like that each time I change and save my code, tests are run (simply, by make tests). I know that for Python there is Nosy that enables that. Is there some generic program that would allow this for Cxxtest or any other testing unit?

Simply, I just need running a single command of files` change. It wouldn't be difficult to write script like that, but maybe there is some tool already : )

Upvotes: 5

Views: 255

Answers (3)

Jakub M.
Jakub M.

Reputation: 33857

Annoyed that there is no ready and simple solution, i just created a simple tool: changerun to run commands when files' change. I hope someone will find it useful : )

Upvotes: 0

StevieG
StevieG

Reputation: 8719

You could use TeamCity for this. It can monitor your code repository and run automated builds + unit tests when changes are detected.. Includes a decent web style interface and emailing capability to notify of build/test failures..

It can also be configured for both windows and linux builds..

http://www.jetbrains.com/teamcity/

If thats a bit heavyweight for you, then you should be able to configure your build process to run the tests for you (e.g. edit your makefile on linux), but obviously this would still mean you manually kicking off a build when you make changes (which I guess you'd probably do anyway)..

Upvotes: 1

unutbu
unutbu

Reputation: 880547

On Linux you can use a filesystem monitoring daemon like incron to run a command (e.g. make tests) every time a file is changed in a directory (a so-called IN_CLOSE_WRITE event).

Upvotes: 2

Related Questions