[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PATCH: Eliminate unused temporary file in DejaGnu library tests

From: Jacob Bachmeyer
Subject: PATCH: Eliminate unused temporary file in DejaGnu library tests
Date: Thu, 16 May 2019 22:15:37 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20090807 MultiZilla/ SeaMonkey/1.1.17 Mnenhy/

This patch avoids creating a temporary file that is not actually used, since clone_output has avoided using sum_file if it is an empty string since the code was first imported into this repository.

This is part of initial efforts to isolate default_target_compile into a testing environment.

(Also, Emacs is complaining about whitespace in ChangeLog again.)

ChangeLog entry:
        * testsuite/runtest.libs/default_procs.tcl: Set sum_file to empty
        string instead of opening a temporary file named .tmp.
        * testsuite/runtest.libs/libs.exp: No longer need to remove .tmp.
diff --git a/testsuite/runtest.libs/default_procs.tcl 
index 1305672..e2e0c6b 100644
--- a/testsuite/runtest.libs/default_procs.tcl
+++ b/testsuite/runtest.libs/default_procs.tcl
@@ -1,4 +1,4 @@
-set sum_file [open .tmp w]
+set sum_file ""
set reboot 0
set errno ""

diff --git a/testsuite/runtest.libs/libs.exp b/testsuite/runtest.libs/libs.exp
index f42d3db..e688ab3 100644
--- a/testsuite/runtest.libs/libs.exp
+++ b/testsuite/runtest.libs/libs.exp
@@ -101,6 +101,3 @@ foreach i [glob [testsuite file -source -test *.test]] {
    if { [runtest_file_p $runtests $i] } { process_test $i }
-# Clean up behind ourselves.
-file delete .tmp

-- Jacob

reply via email to

[Prev in Thread] Current Thread [Next in Thread]