On Sun, 2008-06-22 at 19:13 +0200, Ralf Wildenhues wrote: > Has anybody ever looked at using threading capabilities of tcl directly? > Parallel DejaGNU could benefit other packages too. There is a thread > pools package (tpool.html, linked from <http://wiki.tcl.tk/2770>) but I > have no idea how functional it is in practice; likely the GCC testsuite > would need at least a bit of restructuring, too.
Yes, I tried it about 5 years ago. I used Tcl safe interpreters to run each .exp script in isolation. It immediately raised some problems, namely that you have to decide what variables and procs should be available to the interpreter. This is nice, in that it makes you decide what the public interface between DejaGnu and a test script should be. Its failing is that DejaGnu does not have well-defined interfaces. ;-) In principle, it should work. It was just a lot more work than I bargained for. Keep in mind that GCC does not have a huge number of .exp scripts. Some (eg. execute.exp) run many individual tests and, if one wanted to, these scripts could be parallelised. This just means that there won't be wins for other scripts or other packages using DejaGnu. Ben