ATF-devel archive

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

Re: how to run a test, can build atf-run



On Thu, Oct 16, 2008 at 11:53 AM, Jeremy C. Reed <reed%reedmedia.net@localhost> 
wrote:
> So I was emailed a test but don't know how to use it. I am using NetBSD
> -current.
>
> So I tried to run a test already on my system:
>
>        cd /usr/src/tests/games
>        atf-run
>
> That failed with:
>
>        atf-run: ERROR: Cannot open Atffile

Hm, interesting.  You are not supposed to do that, but in case you are
wondering, this comes from the fact that atf-run is recursing into
CVS/ and not finding an Atffile there.

> So I tried to run with:
>
>        atf-run t_factor.sh

That is a source file which you can't run directly.  You must build
the tests to run them.

Which reminds me of a suggestion to add a 'make test' target in those
directories, which could just build the code and run them.  Should be
pretty easy to do and can come useful, so I might do that soon :)

> I realize a new version of atf-run is available, so updated all my source
> and tried to build src/usr.bin/atf-run
>
> And that failed:
>
> #   compile  atf-run/atf-run.o
> c++ -O2 -Wall -Wpointer-arith -Wno-sign-compare -Wreturn-type -Wswitch
> -Wshadow -Werror    -DHAVE_CONFIG_H
> -I/usr/src/usr.bin/atf-run/../../lib/libatf-c    -c -Wno-stack-protector
> /usr/src/dist/atf/tools/atf-run.cpp
> /usr/src/dist/atf/tools/atf-run.cpp:47:35: error: atf-c++/application.hpp:
> No such file or directory
> /usr/src/dist/atf/tools/atf-run.cpp:48:31: error: atf-c++/atffile.hpp: No
> such file or directory

Did you also reinstall the libraries from lib/libatf-c and
lib/libatf-c++?  I'd suggest you to rebuild the whole tree and update
your system.  postinstall will take care of removing a lot of files
obsoleted during the last ATF update.

> ATF seems very useful. But I have looked at it many times  and tried
> several times, but can't find the step-by-step documentation on how to use
> it. I also attended the ATF presentation at NYCBSDCon, but didn't write
> down the steps I saw. (They went by too fast.)

Yeah, I know... lack of documentation is an issue right now.

You have to run the *built* tests, which live in /usr/tests (or in the
object directories, if you have not installed them yet).  atf-run
should DTRT there.

Hope this helps a little bit,

-- 
Julio M. Merino Vidal <jmmv84%gmail.com@localhost>


Home | Main Index | Thread Index | Old Index