diff options
author | Martin Liska <mliska@suse.cz> | 2022-01-18 10:31:15 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-01-18 10:32:39 +0100 |
commit | e8feb059ca2b3fb50a1ccec01a49f119ec223084 (patch) | |
tree | 286b6410020c17cd7f816d04e0baba11a1965ebe /gcc/testsuite/lib | |
parent | 00dc7877ee02634d4837d024e36b55bef6b9d49c (diff) |
Add check_effective_target_python3_module.
gcc/testsuite/ChangeLog:
* gcc.src/maintainers.exp: Use
check_effective_target_python3_module for checking of unicode
module.
* lib/target-supports.exp: Add
check_effective_target_python3_module.
Diffstat (limited to 'gcc/testsuite/lib')
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index fbb6c735223..cffcdb5f049 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -11735,6 +11735,18 @@ proc check_effective_target_recent_python3 { } { } } +# Return 1 if python3 contains a module + +proc check_effective_target_python3_module { module } { + set result [remote_exec host "python3 -c \"import $module\""] + set status [lindex $result 0] + if { $status == 0 } then { + return 1; + } else { + return 0; + } +} + # Return 1 if pytest module is available for python3. proc check_effective_target_pytest3 { } { |