mirror of
git://sourceware.org/git/glibc.git
synced 2026-09-08 23:58:31 +08:00
nptl: Skip pretty-printer tests without python3 [BZ #34507]
The tests-printers-out rule in Rules wraps $(PYTHON) through
$(test-wrapper-env). Unlike ordinary tests, which wrap a freshly built
target binary, this wraps python3, a build-host tool. When cross-testing
with test-wrapper set (e.g. via scripts/cross-test-ssh.sh) the whole
command is forwarded to the target; if the target lacks python3 the shell
returns 127 and evaluate-test.sh reports the six nptl pretty-printer
tests as FAIL instead of UNSUPPORTED.
scripts/test_printers_common.py already exits UNSUPPORTED (77) when its
dependencies are missing, but that is unreachable when python3 itself is
absent.
Guard the invocation with a "command -v" check so the recipe exits 77
(UNSUPPORTED) when python3 is not found. Native builds are unaffected,
as configure requires python3.
Signed-off-by: Hemanth Kumar M D <Hemanth.KumarMD@windriver.com>
Suggested-by: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
(cherry picked from commit c958d789db)
This commit is contained in:
committed by
Adhemerval Zanella
parent
d407ace6e1
commit
6c453bb606
@@ -18,6 +18,8 @@ The following bugs were resolved with this release:
|
|||||||
[33361] nss: Group merge does not react to ERANGE during merge
|
[33361] nss: Group merge does not react to ERANGE during merge
|
||||||
[33814] glob: wordexp with WRDE_REUSE and WRDE_APPEND may return
|
[33814] glob: wordexp with WRDE_REUSE and WRDE_APPEND may return
|
||||||
uninitialized memory
|
uninitialized memory
|
||||||
|
[34507] nptl: Pretty-printer tests FAIL instead of UNSUPPORTED when
|
||||||
|
cross-testing without python3 on target
|
||||||
|
|
||||||
Version 2.42
|
Version 2.42
|
||||||
|
|
||||||
|
|||||||
@@ -423,8 +423,9 @@ py-env := PYTHONPATH=$(py-const-dir):$(..)scripts:$${PYTHONPATH}
|
|||||||
# The pretty printer files and test_common_printers.py must be present for all.
|
# The pretty printer files and test_common_printers.py must be present for all.
|
||||||
$(tests-printers-out): $(objpfx)%.out: $(objpfx)% %.py %.c $(pretty-printers) \
|
$(tests-printers-out): $(objpfx)%.out: $(objpfx)% %.py %.c $(pretty-printers) \
|
||||||
$(..)scripts/test_printers_common.py
|
$(..)scripts/test_printers_common.py
|
||||||
$(test-wrapper-env) $(py-env) \
|
$(test-wrapper-env) $(py-env) sh -c \
|
||||||
$(PYTHON) $*.py $*.c $(objpfx)$* $(pretty-printers) > $@; \
|
'command -v $(firstword $(PYTHON)) > /dev/null 2>&1 || exit 77; \
|
||||||
|
exec $(PYTHON) $*.py $*.c $(objpfx)$* $(pretty-printers)' > $@; \
|
||||||
$(evaluate-test)
|
$(evaluate-test)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user