ATF-devel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ATF confusion with improperly terminated script



On Mon, Feb 07, 2011 at 11:26:32AM -0800, Giorgos Keramidas wrote:
> On Sun, 6 Feb 2011 13:36:48 -0800, Garrett Cooper 
> <yanegomi%gmail.com@localhost> wrote:
> > On Sun, Feb 6, 2011 at 12:03 PM, Julio Merino 
> > <jmmv%homeworld.netbsd.org@localhost> wrote:
> >>> #!/usr/bin/env atf-sh
> >>
> >> The way we do this in NetBSD is through some build magic that adds the
> >> shebang header and makes it point to the exact atf-sh binary that ships
> >> with the system. ?Dunno if it is a good idea to make it rely on the path.
> >
> > It's not really so much of an issue with us, but some projects (like
> > the python setuputils project) use a shebang like above and replace at
> > install time.
> >
> > I was just following Giorgos's lead to make sure I was on a similar track.
> 
> That's probably my Python influence sipping through the cracks.  I don't
> really mind pointing to the full path of atf-sh, but it would require
> build-time logic to generate the test script sources and then run the
> auto-generated shell code.
> 
> This means that it would probably be a bit more convoluted to run the
> test than just typing:
> 
>     cd /usr/src/tools/regression/bin/sh
>     make && atf-run
> 
> Since binaries and auto-generated files may end up in ${.OBJDIR} and
> atf-run would have to somehow be able to find them :-/

But you will have this issue anyway with C test programs.  Better to
be consistent, I think!

Take a look at the "make test" in NetBSD to see how we deal with this.
Scroll down the bsd.test.mk file up to the big fat comment:

http://cvsweb.netbsd.org/bsdweb.cgi/src/share/mk/bsd.test.mk?rev=1.14&content-type=text/x-cvsweb-markup&only_with_tag=MAIN

-- 
Julio Merino


Home | Main Index | Thread Index | Old Index