automake
[Top][All Lists]
Advanced

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

Re: How to run TESTS automatically on each source code change?


From: Gavin Smith
Subject: Re: How to run TESTS automatically on each source code change?
Date: Thu, 31 Jul 2014 11:12:02 +0100

On Thu, Jul 24, 2014 at 4:48 PM, Steffen Dettmer
<address@hidden> wrote:
> Hi,
>
> I have a test that generates a log file, which I can manually run via
> "make check". Is there a simple way to automate that? For the moment I
> just created a pragmatic target "autotest", but I think it is ugly
> (and too specific).
>
What do you want to happen? The test to be automatically run whenever
"make" is run?

> Any pointers appreciated!
>
> Regards,
> Steffen
>
>
> autotest:
>         @echo "Will run \`make check' after each change, stop with INT." ; \
>         while true ; do \
>           if ! make --question -s -j4 testrunner ; then \
>             echo "Rechecking..." ; \
>               make -s check || { \
>                 echo "failed to run `date`" >> testrunner.log ; \
>               } ; \
>           fi ; \
>           sleep 1 ; \
>         done
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]