From d5ac8aafb19b5ca0cc0acb3724e9764304869c1e Mon Sep 17 00:00:00 2001 From: jay Date: Mon, 19 Dec 2005 04:15:51 +0000 Subject: [PATCH] Run every test twice, once with the old (non-fts) binary and once with the new (fts-enabled) binary. --- find/testsuite/config/unix.exp | 67 ++++++++++++++++++++++++++++++------------ 1 file changed, 48 insertions(+), 19 deletions(-) diff --git a/find/testsuite/config/unix.exp b/find/testsuite/config/unix.exp index 4bd2bbf..68c127f 100644 --- a/find/testsuite/config/unix.exp +++ b/find/testsuite/config/unix.exp @@ -22,13 +22,26 @@ # written by Rob Savoye . -global FIND -# look for FIND -if ![info exists FIND] { - set FIND [findfile $base_dir/../find $base_dir/../find [transform find]] - verbose "FIND defaulting to $FIND" 2 +global OLDFIND +global FTSFIND +# look for OLDFIND and FTSFIND +if { ![info exists OLDFIND] || ![info exists FTSFIND] } { + verbose "Searching for oldfind" + if ([findfile $base_dir/../oldfind 1 0]) { + verbose "found oldfind, so ftsfind must be called find" + set OLDFIND [findfile $base_dir/../oldfind $base_dir/../oldfind [transform oldfind]] + set FTSFIND [findfile $base_dir/../find $base_dir/../find [transform find ]] + } else { + verbose "did not find oldfind, so ftsfind must be called ftsfind" + set OLDFIND [findfile $base_dir/../find $base_dir/../find [transform find ]] + set FTSFIND [findfile $base_dir/../ftsfind $base_dir/../ftsfind [transform find ]] + } } +verbose "ftsfind is at $FTSFIND" 2 +verbose "oldfind is at $OLDFIND" 2 + + global FINDFLAGS if ![info exists FINDFLAGS] then { set FINDFLAGS "" @@ -37,40 +50,35 @@ if ![info exists FINDFLAGS] then { # Called by runtest. # Extract and print the version number of find. proc find_version {} { - global FIND + global FTSFIND global FINDFLAGS - if {[which $FIND] != 0} then { - set tmp [ eval exec $FIND $FINDFLAGS --version find.out" + set cmd "$findprogram $FINDFLAGS $options < $infile | sort > find.out" send_log "$cmd\n" if $verbose>1 then { send_user "Spawning \"$cmd\"\n" @@ -130,6 +138,27 @@ proc find_start { passfail options {infile ""}} { pass "$testname" } + +proc find_start { passfail options {infile ""}} { + global OLDFIND + global FTSFIND + global FINDFLAGS + global comp_output + + if {[which $FTSFIND] == 0} then { + error "$FTSFIND, program does not exist" + exit 1 + } + if {[which $OLDFIND] == 0} then { + error "$FTSFIND, program does not exist" + exit 1 + } + + # Run each test twice, once with the old binary and once with the new. + do_find_start old $OLDFIND $passfail $options $infile + do_find_start new $FTSFIND $passfail $options $infile +} + # Called by runtest. # Clean up (remove temporary files) before runtest exits. proc find_exit {} { -- 2.11.4.GIT