buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rhett Sutphin <>
Subject Suppressing retesting when the buildfile changes and/or only running tests for one project
Date Wed, 18 Feb 2009 00:51:09 GMT

I've noticed a couple of minor annoyances related to test running as  
I've been building my first buildfile for a largish project.  I wonder  
if anyone has any workarounds for them.

The project I'm working on has 5 modules with java code, plus a  
separate integration test module.  When I'm trying to get something to  
work in module 4 (which depends on 1, 2, and 3), it's time consuming  
to wait for the tests for 1, 2, and 3 to run every time I change the  
buildfile.  Don't get me wrong -- I think that the general idea of  
both tracking the last successful test run and invalidating it when  
the buildfile changes (or any other relevant dependency) is  
excellent.  But when I'm just trying to figure out buildr, it's a bit  
excessive.  Most of the time, I can do test=no and be spared.  But  
when the thing I'm trying to get to work is the tests for module 4,  
test=no isn't an option.  Is there a way to turn off the dependency on  
the buildfile for tests?

Another solution to that problem would be to have an option to only  
run the tests for a single module -- sort of like test:pattern, except  
that the constraint would be the module.  This would help with another  
minor issue I've noticed: when you specify a pattern, all the tests in  
all the modules that match that pattern are run, even if you invoke  
test (or integration) from a submodule.  Pattern execution appears to  
ignore the successful test check, too.  The case where this has been a  
problem for me is running integration tests.  I have several  
integration tests with "activity" in the filename.  I also have a  
large number of unit tests with activity in their filenames.  So if I  
want to run just the integration tests for "activity," I have to wait  
for several dozen unit tests, across several other modules, to complete.

The latter issue is less of a problem than the former, but I mention  
it since they have a possible common solution.  Is there an existing  
solution for any of these?


View raw message