Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
0c2ba6f1
Commit
0c2ba6f1
authored
Sep 07, 2001
by
Janis Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for a .x file to control XFAIL and wich kinds of gcov output
to verify. From-SVN: r45466
parent
ebe0d266
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
6 deletions
+32
-6
gcc/testsuite/gcc.misc-tests/gcov.exp
+32
-6
No files found.
gcc/testsuite/gcc.misc-tests/gcov.exp
View file @
0c2ba6f1
...
...
@@ -253,11 +253,29 @@ proc verify-calls { testcase file } {
proc run-gcov { args } {
global GCOV
global subdir
global s
rcdir s
ubdir
# Extract the test name from the arguments.
set testcase [lindex $args end]
# Get special options for this test from the .x script, if present.
# This can include:
# gcov_execute_xfail string to pass to setup_xfail
# gcov_verify_xfail string to pass to setup_xfail
# gcov_verify_branches if defined, check branch percentages
# gcov_verify_calls if defined, check call return percentages
if [file exists [file rootname $srcdir/$subdir/$testcase].x] {
set done_p 0
catch "set done_p \[source [file rootname $srcdir/$subdir/$testcase].x\]"
if { $done_p } {
return
}
}
if [info exists gcov_execute_xfail] {
setup_xfail $gcov_execute_xfail
}
verbose "Running $GCOV $testcase" 2
set testcase [remote_download host $testcase];
set result [remote_exec host $GCOV $args];
...
...
@@ -276,22 +294,30 @@ proc run-gcov { args } {
}
remote_upload host $testcase.gcov $testcase.gcov;
if [info exists gcov_verify_xfail] {
setup_xfail $gcov_verify_xfail
}
# Check that line execution counts are as expected.
set loutput [verify-lines $testcase $testcase.gcov]
set lfailed [lindex $loutput 0]
set lmessage [lindex $loutput 1]
# If we asked for branch and call information, check that it is correct.
if [regexp -- "-b" $args] {
# If requested via the .x file, check that branch and call information
# is correct.
if [info exists gcov_verify_branches] {
set boutput [verify-branches $testcase $testcase.gcov]
set bfailed [lindex $boutput 0]
set bmessage [lindex $boutput 1]
} else {
set bfailed 0
set bmessage ""
}
if [info exists gcov_verify_calls] {
set coutput [verify-calls $testcase $testcase.gcov]
set cfailed [lindex $coutput 0]
set cmessage [lindex $coutput 1]
} else {
set bfailed 0
set bmessage ""
set cfailed 0
set cmessage ""
}
...
...
@@ -300,7 +326,7 @@ proc run-gcov { args } {
# Report whether the gcov test passed or failed. If there were
# multiple failures then the message is a summary.
set tfailed [expr $lfailed +
[expr $bfailed + $cfailed]
]
set tfailed [expr $lfailed +
$bfailed + $cfailed
]
if { $tfailed > 0 } {
if { $tfailed == 1 } {
set vmessage "$lmessage$bmessage$cmessage"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment