dejagnu
[Top][All Lists]
Advanced

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

Add basic load_lib to {remote,target}.test


From: Tom de Vries
Subject: Add basic load_lib to {remote,target}.test
Date: Sat, 3 Jun 2017 18:15:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

[ Fail verbosely when test fails in process_test ]

On 06/03/2017 06:10 PM, Tom de Vries wrote:
[ was: Re: Check if test has reportable output in process_test ]

On 06/03/2017 05:59 PM, Tom de Vries wrote:
Hi,

I found a problem in the dejagnu testsuite, with process_test.

If there is a problem running a .test file, then process_test is silent about it.

This minimal demonstrator patch adds basic reporting if there is a problem, by checking that at least a single clause in the expect command triggered. Using this patch we're able to demonstrate that there are problems in target.test and remote.test.


This patch tries to be verbose about what exactly goes wrong when running a .test file fails.

[ As we now can see, what currently goes wrong in both target.test and remote.test, is that load_lib is called, but not available. ]


This patch adds a basic load_lib version in both remote.test and target.test.

OK?

Thanks,
- Tom
Add basic load_lib to {remote,target}.test

2017-06-03  Tom de Vries  <address@hidden>

        * testsuite/runtest.all/remote.test (load_lib): New proc.
        * testsuite/runtest.all/target.test (load_lib): Same.

---
 testsuite/runtest.all/remote.test | 5 +++++
 testsuite/runtest.all/target.test | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/testsuite/runtest.all/remote.test 
b/testsuite/runtest.all/remote.test
index 23888c6..af72664 100644
--- a/testsuite/runtest.all/remote.test
+++ b/testsuite/runtest.all/remote.test
@@ -13,6 +13,11 @@ if [ file exists $srcdir/$subdir/default_procs.tcl ] {
     puts "ERROR: $srcdir/$subdir/default_procs.tcl doesn't exist"
 }
 
+proc load_lib { lib } {
+     global srcdir
+     source "$srcdir/../lib/$lib"
+}
+
 set file $srcdir/../lib/remote.exp
 if [ file exists $file] {
     source $file
diff --git a/testsuite/runtest.all/target.test 
b/testsuite/runtest.all/target.test
index 6826b26..fb30e35 100644
--- a/testsuite/runtest.all/target.test
+++ b/testsuite/runtest.all/target.test
@@ -13,6 +13,11 @@ if [ file exists $srcdir/$subdir/default_procs.tcl ] {
     puts "ERROR: $srcdir/$subdir/default_procs.tcl doesn't exist"
 }
 
+proc load_lib { lib } {
+     global srcdir
+     source "$srcdir/../lib/$lib"
+}
+
 set file $srcdir/../lib/target.exp
 if [ file exists $file] {
     source $file

reply via email to

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