summaryrefslogtreecommitdiffstats
path: root/binutils/testsuite
diff options
context:
space:
mode:
authorRichard Earnshaw <richard.earnshaw@arm.com>2007-04-21 19:01:20 +0000
committerRichard Earnshaw <richard.earnshaw@arm.com>2007-04-21 19:01:20 +0000
commitd3013035494f047c4c1b21c5ddacbf564b2e4a38 (patch)
tree2a9fb30e9534f10e835f7fa37df58f743a38dd62 /binutils/testsuite
parent541d2ffd365ca39533b78edc9aadd70ad4791163 (diff)
downloadppe42-binutils-d3013035494f047c4c1b21c5ddacbf564b2e4a38.tar.gz
ppe42-binutils-d3013035494f047c4c1b21c5ddacbf564b2e4a38.zip
* binutils-all/readelf.exp (regexp_diff): Delete.
Diffstat (limited to 'binutils/testsuite')
-rw-r--r--binutils/testsuite/ChangeLog4
-rw-r--r--binutils/testsuite/binutils-all/readelf.exp102
2 files changed, 4 insertions, 102 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index f2970ba97e..3dfd768c5a 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2007-04-21 Richard Earnshaw <rearnsha@arm.com>
+
+ * binutils-all/readelf.exp (regexp_diff): Delete.
+
2007-04-20 Richard Earnshaw <rearnsha@arm.com>
* binutils-all/arm/thumb2-cond.s: Allow for tab expansion by the pty.
diff --git a/binutils/testsuite/binutils-all/readelf.exp b/binutils/testsuite/binutils-all/readelf.exp
index cbc54e4f7b..814ae7caa5 100644
--- a/binutils/testsuite/binutils-all/readelf.exp
+++ b/binutils/testsuite/binutils-all/readelf.exp
@@ -31,108 +31,6 @@ proc file_contents { filename } {
return $contents
}
-# regexp_diff, based on simple_diff taken from ld test suite
-# compares two files line-by-line
-# file1 contains strings, file2 contains regexps and #-comments
-# blank lines are ignored in either file
-# returns non-zero if differences exist
-#
-proc regexp_diff { file_1 file_2 } {
-
- set eof -1
- set end_1 0
- set end_2 0
- set differences 0
- set diff_pass 0
-
- if [file exists $file_1] then {
- set file_a [open $file_1 r]
- } else {
- warning "$file_1 doesn't exist"
- return 1
- }
-
- if [file exists $file_2] then {
- set file_b [open $file_2 r]
- } else {
- fail "$file_2 doesn't exist"
- close $file_a
- return 1
- }
-
- verbose " Regexp-diff'ing: $file_1 $file_2" 2
-
- while { 1 } {
- set line_a ""
- set line_b ""
- while { [string length $line_a] == 0 } {
- if { [gets $file_a line_a] == $eof } {
- set end_1 1
- break
- }
- }
- while { [string length $line_b] == 0 || [string match "#*" $line_b] } {
- if [ string match "#pass" $line_b ] {
- set end_2 1
- set diff_pass 1
- break
- } elseif [ string match "#..." $line_b ] {
- if { [gets $file_b line_b] == $eof } {
- set end_2 1
- break
- }
- verbose "looking for \"^$line_b$\"" 3
- while { ![regexp "^$line_b$" "$line_a"] } {
- verbose "skipping \"$line_a\"" 3
- if { [gets $file_a line_a] == $eof } {
- set end_1 1
- break
- }
- }
- break
- }
- if { [gets $file_b line_b] == $eof } {
- set end_2 1
- break
- }
- }
-
- if { $diff_pass } {
- break
- } elseif { $end_1 && $end_2 } {
- break
- } elseif { $end_1 } {
- send_log "extra regexps in $file_2 starting with \"^$line_b$\"\nEOF from $file_1\n"
- verbose "extra regexps in $file_2 starting with \"^$line_b$\"\nEOF from $file_1" 3
- set differences 1
- break
- } elseif { $end_2 } {
- send_log "extra lines in $file_1 starting with \"^$line_a$\"\nEOF from $file_2\n"
- verbose "extra lines in $file_1 starting with \"^$line_a$\"\nEOF from $file_2\n" 3
- set differences 1
- break
- } else {
- verbose "regexp \"^$line_b$\"\nline \"$line_a\"" 3
- if ![regexp "^$line_b$" "$line_a"] {
- send_log "regexp_diff match failure\n"
- send_log "regexp \"^$line_b$\"\nline \"$line_a\"\n"
- set differences 1
- }
- }
- }
-
- if { $differences == 0 && !$diff_pass && [eof $file_a] != [eof $file_b] } {
- send_log "$file_1 and $file_2 are different lengths\n"
- verbose "$file_1 and $file_2 are different lengths" 3
- set differences 1
- }
-
- close $file_a
- close $file_b
-
- return $differences
-}
-
# Find out the size by reading the output of the EI_CLASS field.
# Similar to the test for readelf -h, but we're just looking for the
# EI_CLASS line here.
OpenPOWER on IntegriCloud