Add check_effective_target_pytest3.
gcc/testsuite/ChangeLog: * lib/gcov.exp: Use check_effective_target_pytest3. * lib/target-supports.exp: Add check_effective_target_pytest3.
This commit is contained in:
parent
84eb13b9d6
commit
4460c638fa
2 changed files with 16 additions and 5 deletions
|
@ -17,6 +17,8 @@
|
|||
# Verify various kinds of gcov output: line counts, branch percentages,
|
||||
# and call return percentages. None of this is language-specific.
|
||||
|
||||
load_lib "target-supports.exp"
|
||||
|
||||
global GCOV
|
||||
|
||||
#
|
||||
|
@ -274,11 +276,8 @@ proc run-gcov-pytest { args } {
|
|||
set testcase [remote_download host $testcase]
|
||||
set result [remote_exec host $GCOV "$testcase -i"]
|
||||
|
||||
set pytest_cmd "python3 -m pytest --color=no -rap -s --tb=no"
|
||||
set result [remote_exec host "$pytest_cmd --version"]
|
||||
set status [lindex $result 0]
|
||||
if { $status != 0 } then {
|
||||
unsupported "$subdir/$testcase run-gcov-pytest python3 pytest missing"
|
||||
if { ![check_effective_target_pytest3] } {
|
||||
unsupported "$script pytest python3 is missing"
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -11734,3 +11734,15 @@ proc check_effective_target_python3 { } {
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
# Return 1 if pytest module is available for python3.
|
||||
|
||||
proc check_effective_target_pytest3 { } {
|
||||
set result [remote_exec host "python3 -m pytest --color=no -rap -s --tb=no --version"]
|
||||
set status [lindex $result 0]
|
||||
if { $status == 0 } then {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue