[qmtest] Synchronization between multiple instances of QMTest

Mark Mitchell mark at codesourcery.com
Mon Sep 13 17:16:09 UTC 2004


Abhijeet Bisain wrote:

> So here's what I think might work, please let me know if I overlooked 
> something.
>
> I am thinking of adding a new outcome called BUSY, a new resource 
> called ExclusiveAccessResource in a new file called exclusive.py. In 
> the SetUp function, the resource will check for existence of a file 
> "/tmp/qmtest_exclusive" or some file like that and if it exists, set 
> the result outcome to BUSY, else it will create that file in Setup and 
> then remove it in Cleanup.
>
> I am planning on changing the CheckForResponse code in 
> execution_engine.py to check for the result, and if the result said 
> BUSY, then put the test back on the stack using the result id as the 
> test id. 

I think it would be much better to handle this is in the Target 
machinery, rather than changing the outcomes.  In particular, provide a 
mechanism for the Target to refuse to accept a new test.  In fact, you 
may already be able to reuse the existing mechanisms.  If the Target 
sees that the board has already been devoted to another test run, it 
would simply indicate that it cannot accept the test.

-- 
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark at codesourcery.com




More information about the qmtest mailing list