Re: Splitting "make check" into separate build and run targets

2012-11-21 Thread Stefano Lattarini
On 11/20/2012 04:06 PM, Björn Stenberg wrote: > Stefano Lattarini wrote: >> First, a smaller nit: >> >> -check-TESTS: $(TESTS) >> +AM_RECURSIVE_TARGETS += buildtest runtest >> + >> +buildtest-TESTS: $(TESTS) >> + >> +check-TESTS: buildtest-TESTS >> + $(MAKE) $(AM_MAKEFLAGS) runtest-TEST

Re: Splitting "make check" into separate build and run targets

2012-11-20 Thread Björn Stenberg
Stefano Lattarini wrote: > First, a smaller nit: > > -check-TESTS: $(TESTS) > +AM_RECURSIVE_TARGETS += buildtest runtest > + > +buildtest-TESTS: $(TESTS) > + > +check-TESTS: buildtest-TESTS > + $(MAKE) $(AM_MAKEFLAGS) runtest-TESTS > + > +runtest-TESTS: > @failed=0; all=0; xfai

Re: Splitting "make check" into separate build and run targets

2012-11-19 Thread Stefano Lattarini
On 11/19/2012 01:03 PM, Björn Stenberg wrote: > Stefano Lattarini wrote: >> You could add a dummy dependency for these missing sources, so that make >> won't try to rebuild them (and fail, because there are no rules to do so): > > Yay, that is a neat workaround which I hadn't seen before. > > How

Re: Splitting "make check" into separate build and run targets

2012-11-19 Thread Björn Stenberg
Stefano Lattarini wrote: > You could add a dummy dependency for these missing sources, so that make > won't try to rebuild them (and fail, because there are no rules to do so): Yay, that is a neat workaround which I hadn't seen before. However, this requires me to create a custom input for each p

Re: Splitting "make check" into separate build and run targets

2012-11-19 Thread Björn Stenberg
NightStrike wrote: > > The "check" target depends on the test programs, which in turn depend on > > their source code files. > > make check-TESTS should suffice to do the actual running of the tests, no? No. The check-TESTS target depends on $(TESTS), which in turn depend on their respective sou

Re: Splitting "make check" into separate build and run targets

2012-11-17 Thread Stefano Lattarini
On 11/16/2012 08:38 AM, Björn Stenberg wrote: > Stefano Lattarini wrote: >> Couldn't you simply add a 'buil-tests' target that creates >> all the programs in $(TESTS)? Something as simple as: >> >> build-tests: $(TESTS) >> >> Then run it on the build system, before running "make check" on >> t

Re: Splitting "make check" into separate build and run targets

2012-11-16 Thread NightStrike
On Fri, Nov 16, 2012 at 2:38 AM, Björn Stenberg wrote: > Stefano Lattarini wrote: >> Couldn't you simply add a 'buil-tests' target that creates >> all the programs in $(TESTS)? Something as simple as: >> >> build-tests: $(TESTS) >> >> Then run it on the build system, before running "make chec

Re: Splitting "make check" into separate build and run targets

2012-11-15 Thread Björn Stenberg
Stefano Lattarini wrote: > Couldn't you simply add a 'buil-tests' target that creates > all the programs in $(TESTS)? Something as simple as: > > build-tests: $(TESTS) > > Then run it on the build system, before running "make check" on > the embedded target. Or am I missing something? The

Re: Splitting "make check" into separate build and run targets

2012-11-15 Thread Stefano Lattarini
On 11/15/2012 10:40 AM, Björn Stenberg wrote: > Hi. > > I'm working on making package tests run on embedded targets, > for which the code is cross-compiled and where there are no > compilers installed. > > For this to work, I need to split "make check" into two > targets, so I can build the tests

Splitting "make check" into separate build and run targets

2012-11-15 Thread Björn Stenberg
Hi. I'm working on making package tests run on embedded targets, for which the code is cross-compiled and where there are no compilers installed. For this to work, I need to split "make check" into two targets, so I can build the tests on host and run them on the embedded target. This is my cu