Fix pretty printer tests for run-built-tests == no

Message ID 1482805594-29119-1-git-send-email-siddhesh@sourceware.org
State New, archived
Headers

Commit Message

Siddhesh Poyarekar Dec. 27, 2016, 2:26 a.m. UTC
  In my change to add configure tests for python I had a brainfart where
I tried to filter out unsupported tests from tests-printers-programs
instead of tests-printers to select tests to build.  I realize now
that all of that is completely unnecessary and it would be safe to
just build the tests as long as we don't try to run it.

This patch reverts that bit of the change.  Tested with
run-built-tests = no in config.make.

	* Rules (tests): Add tests-printers-programs to tests to be
	built.
---
 Rules | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
  

Comments

Adhemerval Zanella Dec. 28, 2016, 10:15 p.m. UTC | #1
LGTM, I have hit this issue and I was about to investigate. Thanks for
checking on it.

On 27/12/2016 00:26, Siddhesh Poyarekar wrote:
> In my change to add configure tests for python I had a brainfart where
> I tried to filter out unsupported tests from tests-printers-programs
> instead of tests-printers to select tests to build.  I realize now
> that all of that is completely unnecessary and it would be safe to
> just build the tests as long as we don't try to run it.
> 
> This patch reverts that bit of the change.  Tested with
> run-built-tests = no in config.make.
> 
> 	* Rules (tests): Add tests-printers-programs to tests to be
> 	built.
> ---
>  Rules | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/Rules b/Rules
> index 558924d..3195f59 100644
> --- a/Rules
> +++ b/Rules
> @@ -129,9 +129,9 @@ endif
>  others: $(py-const)
>  
>  ifeq ($(run-built-tests),no)
> -tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported),$(tests) \
> -			       $(tests-printers-programs)) \
> -			     $(test-srcs)) $(tests-special)
> +tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported),$(tests)) \
> +			     $(test-srcs)) $(tests-special) \
> +			     $(tests-printers-programs)
>  xtests: tests $(xtests-special)
>  else
>  tests: $(tests:%=$(objpfx)%.out) $(tests-special) $(tests-printers-out)
>
  
Aurelien Jarno Aug. 20, 2017, 8:03 p.m. UTC | #2
On 2016-12-27 07:56, Siddhesh Poyarekar wrote:
> In my change to add configure tests for python I had a brainfart where
> I tried to filter out unsupported tests from tests-printers-programs
> instead of tests-printers to select tests to build.  I realize now
> that all of that is completely unnecessary and it would be safe to
> just build the tests as long as we don't try to run it.

The problem is that the rules to build the tests programs are not
defined if python and python3 are not available. This lead to the
following error when trying to run the tests for a cross compiled
target:

make[3]: *** No rule to make target '/«PKGBUILDDIR»/build-tree/powerpc-ppc64/nptl/test-mutexattr-printers', needed by 'tests'.  Stop

Note those tests are not built for a non-cross compiled target if
python and python3 are not available.

Aurelien
  

Patch

diff --git a/Rules b/Rules
index 558924d..3195f59 100644
--- a/Rules
+++ b/Rules
@@ -129,9 +129,9 @@  endif
 others: $(py-const)
 
 ifeq ($(run-built-tests),no)
-tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported),$(tests) \
-			       $(tests-printers-programs)) \
-			     $(test-srcs)) $(tests-special)
+tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported),$(tests)) \
+			     $(test-srcs)) $(tests-special) \
+			     $(tests-printers-programs)
 xtests: tests $(xtests-special)
 else
 tests: $(tests:%=$(objpfx)%.out) $(tests-special) $(tests-printers-out)