From c5964e8fa2a8c3657cd6f6fef63d43451eedac7d Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Fri, 21 Jan 2022 21:09:10 -0600 Subject: [PATCH] Reset error and warning counters before running each test file --- ChangeLog | 5 +++++ runtest.exp | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9bf4259..5c9a10f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,11 @@ PR53427 + * runtest.exp (runtest): Reset the global warning and error + counters before running each test file. This prevents an error + "left over" from a previous test file from causing the first test + in the next file to be spuriously reported as UNRESOLVED. + * Makefile.am (TESTSUITE_FILES): Add new files. * testsuite/runtest.main/pr53427.exp: New file for regression test. diff --git a/runtest.exp b/runtest.exp index 4e4eb15..7c6018f 100644 --- a/runtest.exp +++ b/runtest.exp @@ -1,5 +1,5 @@ # runtest.exp -- Test framework driver -# Copyright (C) 1992-2019, 2020 Free Software Foundation, Inc. +# Copyright (C) 1992-2019, 2020, 2022 Free Software Foundation, Inc. # # This file is part of DejaGnu. # @@ -1594,7 +1594,7 @@ proc runtest { test_file_name } { global prms_id global bug_id global test_result - global errcnt + global errcnt warncnt global errorCode global errorInfo global tool @@ -1603,6 +1603,8 @@ proc runtest { test_file_name } { clone_output "Running $test_file_name ..." set prms_id 0 set bug_id 0 + set errcnt 0 + set warncnt 0 set test_result "" # set testdir so testsuite file -test has a starting point -- 2.11.4.GIT