dejagnu
[Top][All Lists]
Advanced

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

Re: Learning DejaGnu


From: Braden McDaniel
Subject: Re: Learning DejaGnu
Date: Sun, 29 Feb 2004 01:52:17 -0500

On Fri, 2004-02-27 at 10:10, Daniel Jacobowitz wrote:
> On Fri, Feb 27, 2004 at 01:34:04AM -0500, Braden McDaniel wrote:
> > I have gotten as far as getting DejaGnu to run the .exp file with my
> > test in it. But the test doesn't appear to register. In
> > parse/testsuite/parse.proto/parse.exp, I have (copied from the manual):
> > 
> >         set test "Local Hello World"
> >         send "echo Hello World"
> >         expect {
> >            -re "Hello World"  { pass "$test" }
> >         }
> 
> If this doesn't match, no test will have happened; you probably want a
> default case that uses fail.

Ah, I see. I still don't understand why this test wouldn't succeed,
though. But when I got some of my own tests working, I lost interest in
figuring that out.

I'm trying now to use the framework in dg.exp. I think my problem is
that I don't understand how to use the $tool variable correctly.

parse/testsuite/lib/parse-dg.exp looks like:

        load_lib dg.exp
        
        proc parse-dg-test { testfile do-what-keyword extra-flags } {
            parse_start $testfile
        }

parse/testsuite/config/unix.exp looks like:

        proc parse_start { world } {
            global tool
            exec ../../$tool < $world
        }

parse/testsuite/parse.proto/parse.exp looks like:

        load_lib parse-dg.exp
        
        dg-init
        dg-runtest [lsort [glob $srcdir/$subdir/*.wrl]] "" ""
        dg-finish

"make check" yields:

        Running 
/home/braden/src/openvrml/openvrml.node-init/test/parse/testsuite/parse.proto/parse.exp
 ...
        ERROR: tcl error sourcing 
/home/braden/src/openvrml/openvrml.node-init/test/parse/testsuite/parse.proto/parse.exp.
        ERROR: couldn't execute "../../parse": permission denied
            while executing
        "exec ../../$tool < $world"
            (procedure "parse_start" line 3)
            invoked from within
        "parse_start $testfile"
            (procedure "parse-dg-test" line 2)
            invoked from within
        "${tool}-dg-test $prog [lindex ${dg-do-what} 0] "$tool_flags 
${dg-extra-tool-flags}""
            (procedure "dg-test" line 106)
            invoked from within
        "dg-test $testcase $flags ${default-extra-flags}"
            (procedure "dg-runtest" line 10)
            invoked from within
        "dg-runtest [lsort [glob $srcdir/$subdir/*.wrl]] "" """
            (file 
"/home/braden/src/openvrml/openvrml.node-init/test/parse/testsuite/parse.proto/parse.exp"
 line 4)
            invoked from within
        "source 
/home/braden/src/openvrml/openvrml.node-init/test/parse/testsuite/parse.proto/parse.exp"
            ("uplevel" body line 1)
            invoked from within
        "uplevel #0 source 
/home/braden/src/openvrml/openvrml.node-init/test/parse/testsuite/parse.proto/parse.exp"
            invoked from within
        "catch "uplevel #0 source $test_file_name""

The permissions on "parse" seem fine; I have no trouble running it
manually.

-- 
Braden McDaniel                           e-mail: <address@hidden>
<http://endoframe.com>                    Jabber: <address@hidden>





reply via email to

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