From 1b7024bd7eef7bbefde905956d2d701c5b1ba203 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Mon, 15 Mar 2021 22:53:35 -0500 Subject: Clean up tree in preparation for release branch --- ChangeLog | 15 ++++++ Makefile.am | 3 +- Makefile.in | 3 +- contrib/compare_tests | 105 ------------------------------------ testsuite/runtest.libs/load_lib.exp | 45 ---------------- 5 files changed, 17 insertions(+), 154 deletions(-) delete mode 100755 contrib/compare_tests delete mode 100644 testsuite/runtest.libs/load_lib.exp diff --git a/ChangeLog b/ChangeLog index 1d81fe9..a4b374f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2021-03-15 Jacob Bachmeyer + + * Makefile.am, Makefile.in: Update accordingly. + + * contrib/compare_tests: Remove. This file lacked a GPL notice. + This file was imported from GCC many years ago. The GCC version + has benefited from continued development, while ours has not. + + * testsuite/runtest.libs/load_lib.exp: Remove. This file lacked a + GPL notice and an attempt to contact the contributor produced no + response. The tests in this file will need to be rewritten in any + case; there is a bug in load_lib that they should expose and there + is now additional infrastructure for tests of this type that was + not available when this file was written. + 2020-12-27 Jacob Bachmeyer * testsuite/runtest.libs/libs.exp (process_test): Report running diff --git a/Makefile.am b/Makefile.am index f949783..bd05a53 100644 --- a/Makefile.am +++ b/Makefile.am @@ -154,7 +154,7 @@ djlibexec_SCRIPTS = config.guess # Contributed scripts, etc. -CONTRIB = contrib/compare_tests contrib/sum2junit.sh \ +CONTRIB = contrib/sum2junit.sh \ contrib/mysql/create-db.sql contrib/mysql/importxml.sh \ contrib/mysql/make-datafile.sh contrib/mysql/plot.sh \ contrib/mysql/README contrib/mysql/sum2xml.sh \ @@ -179,7 +179,6 @@ TESTSUITE_FILES = \ testsuite/runtest.libs/topdir/subdir1/subfile1 \ testsuite/runtest.libs/topdir/subdir1/subfile2 \ testsuite/runtest.libs/topdir/subdir2/subfile2 \ - testsuite/runtest.libs/load_lib.exp \ testsuite/runtest.libs/libs.exp \ testsuite/runtest.libs/default_procs.tcl \ testsuite/runtest.libs/mockutil.tcl \ diff --git a/Makefile.in b/Makefile.in index fd45714..c2ff53b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -484,7 +484,7 @@ djlibexecdir = $(pkgdatadir)/libexec djlibexec_SCRIPTS = config.guess # Contributed scripts, etc. -CONTRIB = contrib/compare_tests contrib/sum2junit.sh \ +CONTRIB = contrib/sum2junit.sh \ contrib/mysql/create-db.sql contrib/mysql/importxml.sh \ contrib/mysql/make-datafile.sh contrib/mysql/plot.sh \ contrib/mysql/README contrib/mysql/sum2xml.sh \ @@ -509,7 +509,6 @@ TESTSUITE_FILES = \ testsuite/runtest.libs/topdir/subdir1/subfile1 \ testsuite/runtest.libs/topdir/subdir1/subfile2 \ testsuite/runtest.libs/topdir/subdir2/subfile2 \ - testsuite/runtest.libs/load_lib.exp \ testsuite/runtest.libs/libs.exp \ testsuite/runtest.libs/default_procs.tcl \ testsuite/runtest.libs/mockutil.tcl \ diff --git a/contrib/compare_tests b/contrib/compare_tests deleted file mode 100755 index 7c9e86b..0000000 --- a/contrib/compare_tests +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/sh -# This script automatically test the given tool with the tool's test cases, -# reporting anything of interest. - -# exits with 0 if there is nothing of interest -# exits with 1 if there is something interesting -# exits with 2 if an error occurred - -# Give two .sum files to compare them - -# Written by Mike Stump - -tool=gxx - -tmp1=/tmp/$tool-testing.$$a -tmp2=/tmp/$tool-testing.$$b -now_s=/tmp/$tool-testing.$$d -before_s=/tmp/$tool-testing.$$e - -if [ "$2" = "" ]; then - echo "Usage: $0 previous current" >&2 - exit 2 -fi - -sed 's/^XFAIL/FAIL/; s/^XPASS/PASS/' < "$1" | awk '/^Running target / {target = $3} { if (target != "unix") { sub(/: /, "&"target": " ); }; print $0; }' >$tmp1 -sed 's/^XFAIL/FAIL/; s/^XPASS/PASS/' < "$2" | awk '/^Running target / {target = $3} { if (target != "unix") { sub(/: /, "&"target": " ); }; print $0; }' >$tmp2 - -before=$tmp1 -now=$tmp2 - -exit_status=0 -trap 'rm -f $tmp1 $tmp2 $now_s $before_s' EXIT HUP INT QUIT TRAP PIPE TERM - -sort -t ':' +1 "$now" > "$now_s" -sort -t ':' +1 "$before" > "$before_s" - -grep '^FAIL:' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1 -grep '^PASS' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -12 $tmp1 - >$tmp2 - - -if grep -s . $tmp2 >/dev/null ; then - echo "Tests that now fail, but worked before:" - echo - cat $tmp2 - echo - exit_status=1 -fi - -grep '^PASS' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1 -grep '^FAIL' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -12 $tmp1 - >$tmp2 - - -if grep -s . $tmp2 >/dev/null ; then - echo "Tests that now work, but didn't before:" - echo - cat $tmp2 - echo -fi - -grep '^FAIL' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1 -grep '^[PF]A[SI][SL]' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -23 $tmp1 - >$tmp2 - - -if grep -s . $tmp2 >/dev/null ; then - echo "New tests that FAIL:" - echo - cat $tmp2 - echo - exit_status=1 -fi - -grep '^PASS' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1 -grep '^[PF]A[SI][SL]' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -23 $tmp1 - >$tmp2 - - -if grep -s . $tmp2 >/dev/null ; then - echo "New tests that PASS:" - echo - cat $tmp2 - echo -fi - -grep '^[PF]A[SI][SL]' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1 -grep '^PASS' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -13 $tmp1 - >$tmp2 - - -if grep -s . $tmp2 >/dev/null ; then - echo "Old tests that passed, that have disappeared: (Eeek!)" - echo - cat $tmp2 - echo -fi - -grep '^[PF]A[SI][SL]' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1 -grep '^FAIL' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -13 $tmp1 - >$tmp2 - - -if grep -s . $tmp2 >/dev/null ; then - echo "Old tests that failed, that have disappeared: (Eeek!)" - echo - cat $tmp2 - echo -fi - -exit $exit_status diff --git a/testsuite/runtest.libs/load_lib.exp b/testsuite/runtest.libs/load_lib.exp deleted file mode 100644 index 21e2824..0000000 --- a/testsuite/runtest.libs/load_lib.exp +++ /dev/null @@ -1,45 +0,0 @@ -# test load_lib - -# Verify that load_lib searches for a lib not only in its default -# search_dirs but also in the libdirs list of directories. - -# load_lib f exits with a failure if it does not find f. -# Arrange for the testcase to handle this: -rename exit saved_exit -proc exit { args } { return [lindex $args 0] } - -# The test right below is supposed to fail. -# Prettify default output by only printing the message in verbose mode. -rename send_error saved_send_error -proc send_error { args } { - verbose [lindex $args 0] 2 -} - -if { [ load_lib "subfile1" ] != 1} { - fail "load_lib subfile1 found per default" -} else { - pass "load_lib subfile1 not found per default" -} - -rename send_error "" -rename saved_send_error send_error - -set extradir [testsuite file -source -test "topdir" "subdir1"] -global libdirs -lappend libdirs $extradir -verbose "now added libdirs: $libdirs" 2 - -# In this testcase, we did not exit 1 from load_lib as per above -# rename. subfile1 thus is in the loaded_libs LUT and we won't walk -# the search_dirs again. Use another file for testing the lappend -# worked. - -if { [load_lib "subfile2"] eq ""} { - pass "load_lib subfile2 loaded" -} else { - fail "load_lib subfile2 not found" -} - -# cleanup after us -rename exit "" -rename saved_exit exit -- cgit v1.1