This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] testsuite: sort all filename globs


Hello!

When comparing testsuite results between two systems, I noticed that
there were differences in the tests' ordering for ld-scripts/script.exp.
Thusly fixed for better reproducibility between different runs.

Then, I did a quick find | xargs | grep, and came up with the additional
GAS testsuite patches -- totally untested, but they should be safe.
(Also, throughout the testsuites, there is enough precedence for using
[lsort [glob ...]], as well as it's recommended in the TCL
documentation.)


ld/testsuite/
2010-10-28  Thomas Schwinge  <thomas@schwinge.name>

	* ld-scripts/script.exp: Sort all filename globs.

gas/testsuite/
2010-10-28  Thomas Schwinge  <thomas@schwinge.name>

	* gas/iq2000/load-hazards.exp: Sort all filename globs.
	* gas/iq2000/yield.exp: Likewise.
	* gas/mt/errors.exp: Likewise.


Regards,
 Thomas

---
 gas/testsuite/gas/iq2000/load-hazards.exp |    2 +-
 gas/testsuite/gas/iq2000/yield.exp        |    2 +-
 gas/testsuite/gas/mt/errors.exp           |    2 +-
 ld/testsuite/ld-scripts/script.exp        |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gas/testsuite/gas/iq2000/load-hazards.exp b/gas/testsuite/gas/iq2000/load-hazards.exp
index 654c96a..1e8657e 100644
--- a/gas/testsuite/gas/iq2000/load-hazards.exp
+++ b/gas/testsuite/gas/iq2000/load-hazards.exp
@@ -29,7 +29,7 @@ proc iq2000_warning_test { file testname {warnpattern ""} } {
 }
 
 if [istarget iq2000*-*-*] {
-    foreach file [glob -nocomplain -- $srcdir/$subdir/hazard*.s] {
+    foreach file [lsort [glob -nocomplain -- $srcdir/$subdir/hazard*.s]] {
 	set file [file tail $file]
 	switch -- $file {
 	    "hazard0.s" {
diff --git a/gas/testsuite/gas/iq2000/yield.exp b/gas/testsuite/gas/iq2000/yield.exp
index c68095f..30fae38 100644
--- a/gas/testsuite/gas/iq2000/yield.exp
+++ b/gas/testsuite/gas/iq2000/yield.exp
@@ -28,7 +28,7 @@ proc iq2000_error_test { file testname {pattern ""} } {
 }
 
 if [istarget iq2000*-*-*] {
-    foreach file [glob -nocomplain -- $srcdir/$subdir/yield*.s] {
+    foreach file [lsort [glob -nocomplain -- $srcdir/$subdir/yield*.s]] {
 	set file [file tail $file]
 	iq2000_error_test $file \
 		"assembler emits yield instruction in delay slot error for $file" \
diff --git a/gas/testsuite/gas/mt/errors.exp b/gas/testsuite/gas/mt/errors.exp
index 30d217f..7b94bdb 100644
--- a/gas/testsuite/gas/mt/errors.exp
+++ b/gas/testsuite/gas/mt/errors.exp
@@ -28,7 +28,7 @@ proc mrisc1_error_test { file testname {warnpattern ""} } {
 }
 
 if [istarget mt-*-*] {
-    foreach file [glob -nocomplain -- $srcdir/$subdir/bad*.s] {
+    foreach file [lsort [glob -nocomplain -- $srcdir/$subdir/bad*.s]] {
 	set file [file tail $file]
 	switch -- $file {
 	    "badreg.s" {
diff --git a/ld/testsuite/ld-scripts/script.exp b/ld/testsuite/ld-scripts/script.exp
index 66c62f5..64eb418 100644
--- a/ld/testsuite/ld-scripts/script.exp
+++ b/ld/testsuite/ld-scripts/script.exp
@@ -127,7 +127,7 @@ if ![ld_simple_link $ld tmpdir/script "$flags -T $srcdir/$subdir/memory.t tmpdir
     check_script
 }
 
-set test_script_list [glob $srcdir/$subdir/region-alias-*.t]
+set test_script_list [lsort [glob $srcdir/$subdir/region-alias-*.t]]
 
 foreach test_script $test_script_list {
     if ![ld_simple_link $ld tmpdir/script "$flags -T $test_script tmpdir/script.o"] {
-- 
tg: (ae7a5b7..) sort_filename_globs (depends on: master)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]