diff mbox

linux-generic: validation: fix dependency for tests-validation.env

Message ID 1453826349-20235-1-git-send-email-stuart.haslam@linaro.org
State Accepted
Commit 000008f7f1de54a70d118f0ae56db48c47d60aff
Headers show

Commit Message

Stuart Haslam Jan. 26, 2016, 4:39 p.m. UTC
The tests-validation.env file lists the test binaries/scripts to be run
during post-install testing, but the Makefile dependencies are wrong so
it gets created once and never updated. This means the following
sequence doesn't actually peform testing as expected -

./configure
make
./configure --enable-test-vald --with-testdir --prefix=$(pwd)/mytests
make install installcheck

As the tests-environment.env file generated during the first make (with
test-vald disabled) isn't updated.

Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
---
 platform/linux-generic/test/Makefile.am | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

Comments

Mike Holmes Jan. 26, 2016, 6:17 p.m. UTC | #1
On 26 January 2016 at 11:39, Stuart Haslam <stuart.haslam@linaro.org> wrote:

> The tests-validation.env file lists the test binaries/scripts to be run

> during post-install testing, but the Makefile dependencies are wrong so

> it gets created once and never updated. This means the following

> sequence doesn't actually peform testing as expected -

>

> ./configure

> make

> ./configure --enable-test-vald --with-testdir --prefix=$(pwd)/mytests

> make install installcheck

>

> As the tests-environment.env file generated during the first make (with

> test-vald disabled) isn't updated.

>

> Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>

>


Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org>


> ---

>  platform/linux-generic/test/Makefile.am | 15 ++++++++++-----

>  1 file changed, 10 insertions(+), 5 deletions(-)

>

> diff --git a/platform/linux-generic/test/Makefile.am

> b/platform/linux-generic/test/Makefile.am

> index e629872..8c35c15 100644

> --- a/platform/linux-generic/test/Makefile.am

> +++ b/platform/linux-generic/test/Makefile.am

> @@ -36,14 +36,19 @@ TESTS += pktio/pktio_run_pcap

>  endif

>  endif

>

> -dist_check_SCRIPTS = run-test tests-validation.env $(LOG_COMPILER)

> +TEST_ENV = tests-validation.env

> +

> +dist_check_SCRIPTS = run-test $(TEST_ENV) $(LOG_COMPILER)

>

>  test_SCRIPTS = $(dist_check_SCRIPTS)

>

> -tests-validation.env:

> -       echo "TESTS=\"$(TESTS)\""    > $@

> -       echo "$(TESTS_ENVIRONMENT)" >> $@

> -       echo "$(LOG_COMPILER)"      >> $@

> +$(TEST_ENV): validation-test-env

> +

> +.PHONY: validation-test-env

> +validation-test-env:

> +       echo "TESTS=\"$(TESTS)\""    > $(TEST_ENV)

> +       echo "$(TESTS_ENVIRONMENT)" >> $(TEST_ENV)

> +       echo "$(LOG_COMPILER)"      >> $(TEST_ENV)

>

>  if test_installdir

>  installcheck-local:

> --

> 2.1.1

>

> _______________________________________________

> lng-odp mailing list

> lng-odp@lists.linaro.org

> https://lists.linaro.org/mailman/listinfo/lng-odp

>




-- 
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
"Work should be fun and collborative, the rest follows"
Maxim Uvarov Jan. 28, 2016, 10:59 a.m. UTC | #2
That is merged, but looks like this commit generates error:

make[2]: Leaving directory 
`/opt/Linaro/check-odp.git/build/odp-apply/opendataplane-1.6.0.0.git367.gc251351/_build/scripts'
make[2]: Entering directory 
`/opt/Linaro/check-odp.git/build/odp-apply/opendataplane-1.6.0.0.git367.gc251351/_build'
rm -rf .libs _libs
rm -f *.lo
test -z "pkgconfig/libodp.pc pkgconfig/libodphelper.pc" || rm -f 
pkgconfig/libodp.pc pkgconfig/libodphelper.pc
test . = ".." || test -z "" || rm -f
rm -f libtool config.lt
rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
rm -f cscope.out cscope.in.out cscope.po.out cscope.files
make[2]: Leaving directory 
`/opt/Linaro/check-odp.git/build/odp-apply/opendataplane-1.6.0.0.git367.gc251351/_build'
rm -f config.status config.cache config.log configure.lineno 
config.status.lineno
rm -f Makefile
ERROR: files left in build directory after distclean:
./platform/linux-generic/test/tests-validation.env
make[1]: *** [distcleancheck] Error 1
make[1]: Leaving directory 
`/opt/Linaro/check-odp.git/build/odp-apply/opendataplane-1.6.0.0.git367.gc251351/_build'
make: *** [distcheck] Error 1



On 01/26/2016 21:17, Mike Holmes wrote:
>
>
> On 26 January 2016 at 11:39, Stuart Haslam <stuart.haslam@linaro.org 
> <mailto:stuart.haslam@linaro.org>> wrote:
>
>     The tests-validation.env file lists the test binaries/scripts to
>     be run
>     during post-install testing, but the Makefile dependencies are
>     wrong so
>     it gets created once and never updated. This means the following
>     sequence doesn't actually peform testing as expected -
>
>     ./configure
>     make
>     ./configure --enable-test-vald --with-testdir --prefix=$(pwd)/mytests
>     make install installcheck
>
>     As the tests-environment.env file generated during the first make
>     (with
>     test-vald disabled) isn't updated.
>
>     Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org
>     <mailto:stuart.haslam@linaro.org>>
>
>
> Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org 
> <mailto:mike.holmes@linaro.org>>
>
>     ---
>      platform/linux-generic/test/Makefile.am | 15 ++++++++++-----
>      1 file changed, 10 insertions(+), 5 deletions(-)
>
>     diff --git a/platform/linux-generic/test/Makefile.am
>     b/platform/linux-generic/test/Makefile.am
>     index e629872..8c35c15 100644
>     --- a/platform/linux-generic/test/Makefile.am
>     +++ b/platform/linux-generic/test/Makefile.am
>     @@ -36,14 +36,19 @@ TESTS += pktio/pktio_run_pcap
>      endif
>      endif
>
>     -dist_check_SCRIPTS = run-test tests-validation.env $(LOG_COMPILER)
>     +TEST_ENV = tests-validation.env
>     +
>     +dist_check_SCRIPTS = run-test $(TEST_ENV) $(LOG_COMPILER)
>
>      test_SCRIPTS = $(dist_check_SCRIPTS)
>
>     -tests-validation.env:
>     -       echo "TESTS=\"$(TESTS)\""    > $@
>     -       echo "$(TESTS_ENVIRONMENT)" >> $@
>     -       echo "$(LOG_COMPILER)"      >> $@
>     +$(TEST_ENV): validation-test-env
>     +
>     +.PHONY: validation-test-env
>     +validation-test-env:
>     +       echo "TESTS=\"$(TESTS)\""    > $(TEST_ENV)
>     +       echo "$(TESTS_ENVIRONMENT)" >> $(TEST_ENV)
>     +       echo "$(LOG_COMPILER)"      >> $(TEST_ENV)
>
>      if test_installdir
>      installcheck-local:
>     --
>     2.1.1
>
>     _______________________________________________
>     lng-odp mailing list
>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>     https://lists.linaro.org/mailman/listinfo/lng-odp
>
>
>
>
> -- 
> Mike Holmes
> Technical Manager - Linaro Networking Group
> Linaro.org <http://www.linaro.org/>***│ *Open source software for ARM SoCs
> "Work should be fun and collborative, the rest follows"
>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
Stuart Haslam Jan. 28, 2016, 11:08 a.m. UTC | #3
On Thu, Jan 28, 2016 at 01:59:53PM +0300, Maxim Uvarov wrote:
> That is merged, but looks like this commit generates error:
> 
> make[2]: Leaving directory `/opt/Linaro/check-odp.git/build/odp-apply/opendataplane-1.6.0.0.git367.gc251351/_build/scripts'
> make[2]: Entering directory `/opt/Linaro/check-odp.git/build/odp-apply/opendataplane-1.6.0.0.git367.gc251351/_build'
> rm -rf .libs _libs
> rm -f *.lo
> test -z "pkgconfig/libodp.pc pkgconfig/libodphelper.pc" || rm -f
> pkgconfig/libodp.pc pkgconfig/libodphelper.pc
> test . = ".." || test -z "" || rm -f
> rm -f libtool config.lt
> rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
> rm -f cscope.out cscope.in.out cscope.po.out cscope.files
> make[2]: Leaving directory `/opt/Linaro/check-odp.git/build/odp-apply/opendataplane-1.6.0.0.git367.gc251351/_build'
> rm -f config.status config.cache config.log configure.lineno
> config.status.lineno
> rm -f Makefile
> ERROR: files left in build directory after distclean:
> ./platform/linux-generic/test/tests-validation.env
> make[1]: *** [distcleancheck] Error 1
> make[1]: Leaving directory `/opt/Linaro/check-odp.git/build/odp-apply/opendataplane-1.6.0.0.git367.gc251351/_build'
> make: *** [distcheck] Error 1
> 

Oops, there's a missing clean rule. I'll send a patch in a few minutes.
Maxim Uvarov Jan. 28, 2016, 11:22 a.m. UTC | #4
On 01/28/2016 14:08, Stuart Haslam wrote:
> On Thu, Jan 28, 2016 at 01:59:53PM +0300, Maxim Uvarov wrote:
>> That is merged, but looks like this commit generates error:
>>
>> make[2]: Leaving directory `/opt/Linaro/check-odp.git/build/odp-apply/opendataplane-1.6.0.0.git367.gc251351/_build/scripts'
>> make[2]: Entering directory `/opt/Linaro/check-odp.git/build/odp-apply/opendataplane-1.6.0.0.git367.gc251351/_build'
>> rm -rf .libs _libs
>> rm -f *.lo
>> test -z "pkgconfig/libodp.pc pkgconfig/libodphelper.pc" || rm -f
>> pkgconfig/libodp.pc pkgconfig/libodphelper.pc
>> test . = ".." || test -z "" || rm -f
>> rm -f libtool config.lt
>> rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
>> rm -f cscope.out cscope.in.out cscope.po.out cscope.files
>> make[2]: Leaving directory `/opt/Linaro/check-odp.git/build/odp-apply/opendataplane-1.6.0.0.git367.gc251351/_build'
>> rm -f config.status config.cache config.log configure.lineno
>> config.status.lineno
>> rm -f Makefile
>> ERROR: files left in build directory after distclean:
>> ./platform/linux-generic/test/tests-validation.env
>> make[1]: *** [distcleancheck] Error 1
>> make[1]: Leaving directory `/opt/Linaro/check-odp.git/build/odp-apply/opendataplane-1.6.0.0.git367.gc251351/_build'
>> make: *** [distcheck] Error 1
>>
> Oops, there's a missing clean rule. I'll send a patch in a few minutes.
>
I reverted original, please send v2.

Maxim.
diff mbox

Patch

diff --git a/platform/linux-generic/test/Makefile.am b/platform/linux-generic/test/Makefile.am
index e629872..8c35c15 100644
--- a/platform/linux-generic/test/Makefile.am
+++ b/platform/linux-generic/test/Makefile.am
@@ -36,14 +36,19 @@  TESTS += pktio/pktio_run_pcap
 endif
 endif
 
-dist_check_SCRIPTS = run-test tests-validation.env $(LOG_COMPILER)
+TEST_ENV = tests-validation.env
+
+dist_check_SCRIPTS = run-test $(TEST_ENV) $(LOG_COMPILER)
 
 test_SCRIPTS = $(dist_check_SCRIPTS)
 
-tests-validation.env:
-	echo "TESTS=\"$(TESTS)\""    > $@
-	echo "$(TESTS_ENVIRONMENT)" >> $@
-	echo "$(LOG_COMPILER)"      >> $@
+$(TEST_ENV): validation-test-env
+
+.PHONY: validation-test-env
+validation-test-env:
+	echo "TESTS=\"$(TESTS)\""    > $(TEST_ENV)
+	echo "$(TESTS_ENVIRONMENT)" >> $(TEST_ENV)
+	echo "$(LOG_COMPILER)"      >> $(TEST_ENV)
 
 if test_installdir
 installcheck-local: