On 1/18/22 08:59, Thomas Schwinge wrote:
Hi!
On 2022-01-10T17:14:00+0100, Martin Liška <mli...@suse.cz> wrote:
The script is capable of checking if MAINTAINER names are sorted
alphabetically.
Irrespective of the pre-existing issue that a concept of a first and a
last name doesn't exist in all cultures, and thus sorting by the latter
Sure, but most of them do have. And for the rest, we can add exceptions.
is questionable, there also seems to be some Python syntax issue here:
Running [...]/source-gcc/gcc/testsuite/gcc.src/maintainers.exp ...
Executing on host: python3 --version (timeout = 300)
spawn python3 --version
Python 3.4.3
Executing on host:
[...]/source-gcc/gcc/testsuite/../../contrib/check-MAINTAINERS.py
[...]/source-gcc/gcc/testsuite/../../MAINTAINERS (timeout = 300)
spawn [...]/source-gcc/gcc/testsuite/../../contrib/check-MAINTAINERS.py
[...]/source-gcc/gcc/testsuite/../../MAINTAINERS
File
"[...]/source-gcc/gcc/testsuite/../../contrib/check-MAINTAINERS.py", line 71
print(f'Line should not start with space: "{line}"')
^
SyntaxError: invalid syntax
1 { File
"[...]/source-gcc/gcc/testsuite/../../contrib/check-MAINTAINERS.py", line 71
print(f'Line should not start with space: "{line}"')
^
SyntaxError: invalid syntax
}
FAIL: check-MAINTAINERS.py
Ohh, an old Python 3 version. I'm going to fix it with the following patch.
Martin
Grüße
Thomas
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634
München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas
Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht
München, HRB 106955
From 50c3975129c5d97387bbe4976bea1931d3fad0b2 Mon Sep 17 00:00:00 2001
From: Martin Liska <mli...@suse.cz>
Date: Tue, 18 Jan 2022 09:16:26 +0100
Subject: [PATCH] Update check_effective_target_recent_python3
Require at least Python 3.6.
gcc/testsuite/ChangeLog:
* gcc.src/maintainers.exp: Use the new
check_effective_target_recent_python3.
* lib/target-supports.exp: Check for Python3 version >= 3.6.
---
gcc/testsuite/gcc.src/maintainers.exp | 4 ++--
gcc/testsuite/lib/target-supports.exp | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gcc/testsuite/gcc.src/maintainers.exp b/gcc/testsuite/gcc.src/maintainers.exp
index 63361dd5e4b..a4b3986be77 100644
--- a/gcc/testsuite/gcc.src/maintainers.exp
+++ b/gcc/testsuite/gcc.src/maintainers.exp
@@ -24,8 +24,8 @@ proc gcc_src_run_maintainers_verify_sh {} {
set contrib $rootdir/contrib
set maintainers $rootdir/MAINTAINERS
- if { ![check_effective_target_python3] } {
- unsupported "$script python3 is missing"
+ if { ![check_effective_target_recent_python3] } {
+ unsupported "$script recent python3 is missing"
return
}
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index fd48475a57c..fbb6c735223 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -11723,10 +11723,10 @@ proc check_effective_target___OPTIMIZE__ {} {
} [current_compiler_flags]]
}
-# Return 1 if python3 is available.
+# Return 1 if python3 (>= 3.6) is available.
-proc check_effective_target_python3 { } {
- set result [remote_exec host "python3 --version"]
+proc check_effective_target_recent_python3 { } {
+ set result [remote_exec host "python3 -c \"import sys; assert sys.version_info >= (3, 6)\""]
set status [lindex $result 0]
if { $status == 0 } then {
return 1;
--
2.34.1