[Top][All Lists]

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

Probelm in creating a new testsuite

From: Gupta, Usha
Subject: Probelm in creating a new testsuite
Date: Fri, 8 Jul 2011 14:39:22 +0800



I am new to dejagnu and have been trying to understand how I can create a testsuite and use dejagnu.

I want to make a testsuite for gcc. I followed the steps explained in the calc example in the manual.

But I dont have an interactive program like calc in my case. What I have is a set of C files that I want to

compile and execute using gcc.


Is it necessary to add my tests in the gcc testsuite directory?

Is it possible to keep my testsuite separately and still use gcc as a tool?


Sorry for posting a long ques. But I am not sure whether without these deatils my question would be clear.


I have a directory structure like this


            - testsuite

                        - config

                                    - unix.exp

                        - simple.test


                                    - simple.c and more C files








I am wondering what this file should contain. I don’t have a tool like calc in the example.

So I have put some dummy procs.


proc simple_exit {} {

    puts "Quitting simple"



proc simple_start { } {

    puts "starting simple"







My simple.exp only says how and what to compile. But this doesn't work. My C file doesn't compile.

But it doen't give any error also. What is required here? could anyone help?

I want to get the compilation result (PASS/FAIL) in the log and sum file.





foreach test [lsort [glob -nocomplain ./*.c]] {

            if {[catch {exec gcc -c $test} errmsg ]} {

                        puts "FAIL: $errmsg"

                } else {

                        puts "PASS: Compilation passed for $test"







RUNTESTDEFAULTFLAGS = --tool simple  --srcdir ./testsuite


same as calc



Please help me out if I am missing something here.


Thanks in advance




reply via email to

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