buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Assaf Arkin" <ar...@intalio.com>
Subject Re: Example of checks (specifically on test.classes)
Date Fri, 08 Feb 2008 00:29:01 GMT
On 2/6/08, David Saff <david@saff.net> wrote:
>
> Sorry for the late appreciation, but that cleared things up for me.
>
> Is it inappropriate to use check for things like asserting that some
> tests are run?



You can do that, but be careful, checks will be run even if tests are not
run (build package test=no) and before integration tests are run.


You'll probably want to check on the conditions that:
Buildr.options.test && !test.options[:integration]


Assaf

   David Saff
>
> On Jan 31, 2008 7:22 PM, Assaf Arkin <arkin@intalio.com> wrote:
> > David,
> >
> > The check task is intended for, amongst other things, verify that your
> > packages have the right contents.  It runs from the package task, so try
> > this:
> >
> > $ buildr package
> >
> > Assaf
> >
> >
> > On 1/31/08, David Saff <david@saff.net> wrote:
> > >
> > > All,
> > >
> > > I'm trying to restrict the test classes run by my project (which is
> > > JUnit itself), but still make sure that something is run.  Right now,
> > > I'm trying the following, and the check doesn't appear to fail, even
> > > through no tests appear to be running:
> > >
> > > desc "The Junit project"
> > > define "junit" do
> > >   project.version = VERSION_NUMBER
> > >   project.group = GROUP
> > >   manifest["Implementation-Vendor"] = COPYRIGHT
> > >   compile.with 'lib/hamcrest-core-1.1.jar' # Add classpath
> dependencies
> > >   test.compile.with # Add classpath dependencies
> > >   test.include "org.junit.tests.AllTests"
> > >   package(:jar)
> > >   check test.classes do
> > >     it.should_not be_empty
> > >   end
> > > end
> > >
> > > My output is:
> > >
> > > (in /Users/saff/Documents/workspaces/junit/junit)
> > > Building junit
> > > Compiling 122 source files in junit:compile
> > > Testing junit
> > > Compiling 124 source files in junit:test:compile
> > >
> > > I've purposely broken one of the tests, so I know they're not just
> > > silently passing.  AllTests is the suite that should include all of
> > > the tests I actually want to run.  I'm about 24 hours old as a buildr
> > > initiate, so gentle reproof appreciated.  Thanks,
> > >
> > >    David Saff
> > >
> >
> >
> >
> > --
> > CTO, Intalio
> > http://www.intalio.com
> >
>



-- 
CTO, Intalio
http://www.intalio.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message