From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Elliston To: sid@sources.redhat.com Subject: Testsuite improvement patch Date: Mon, 10 Dec 2001 15:48:00 -0000 Message-ID: <15381.7613.416810.99371@scooby.brisbane.redhat.com> X-SW-Source: 2001-q4/msg00047.html Message-ID: <20011210154800.gmVSEo_APOySFxlMKQ3xwnuU1fy79qraLoqXt6taUCU@z> The following patch makes SID's component/cgen-cpu testsuites behave like testsuites such as GCC's: if the test case passes, any object code generated by the assembler or linker is subsequently removed. This leaves the testsuite directory in a tidier state at the end of a test run. It is not necessary to wrap a Tcl catch{} command around "file delete" commands -- according to the manual page: ``Trying to delete a non-existent file is not considered an error.'' Okay to commit? 2001-12-11 Ben Elliston * lib/cpudefs.exp (run-one-sid-test): Delete object code if the test case passes. *************** *** 390,395 **** --- 390,396 ---- if { "$opts(xerror)" == "no" } { if [string match $opts(output) $output] { pass "$test \#$iter" + file delete ${name}.o ${exe-name} } else { verbose -log "output: $output" 3 verbose -log "pattern: $opts(output)" 3 *************** *** 408,413 **** --- 409,415 ---- } else { if [string match $opts(output) $output] { pass "$test \#$iter" + file delete ${name}.o ${exe-name} } else { verbose -log "output: $output" 3 verbose -log "pattern: $opts(output)" 3