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>
This commit is contained in:
committed by
Adhemerval Zanella
parent
fe03757f67
commit
c958d789db
@@ -467,8 +467,9 @@ py-env := PYTHONPATH=$(py-const-dir):$(..)scripts:$${PYTHONPATH}
|
||||
# The pretty printer files and test_common_printers.py must be present for all.
|
||||
$(tests-printers-out): $(objpfx)%.out: $(objpfx)% %.py %.c $(pretty-printers) \
|
||||
$(..)scripts/test_printers_common.py
|
||||
$(test-wrapper-env) $(py-env) \
|
||||
$(PYTHON) $*.py $*.c $(objpfx)$* $(pretty-printers) > $@; \
|
||||
$(test-wrapper-env) $(py-env) sh -c \
|
||||
'command -v $(firstword $(PYTHON)) > /dev/null 2>&1 || exit 77; \
|
||||
exec $(PYTHON) $*.py $*.c $(objpfx)$* $(pretty-printers)' > $@; \
|
||||
$(evaluate-test)
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user