There are many ways you can do this.  One way is to change your previous 
STAX job (the build job) so that if the build is successful, use a 
<stafcmd> element to submit the STAX EXECUTE request to run another STAX 
job that runs your regression tests.

Or, you could have use a couple of other services that STAF provides, the 
Event and EventManager services, which allow you to trigger things (e.g. 
executing a STAX job) when an event occurs (e.g. a build is ready).

The purpose of the EVENT service is to provide an interface to allow 
process communication based on events occuring. For instance, a process 
registers with the EVENT service that it is interested in builds 
completing. A different process tell the EVENT service when a build has 
completed. The EVENT service then notifies all processes that have 
registered interest in the build completing that the build has completed.

The EventManager service allows you to register with the Event service in 
order to execute STAF Commands. When an Event is generated, the Event 
Service (which normally sends messages to machines registered for 
specified events) will execute a STAF Command via the EventManager. The 
EventManager service also provides a User Interface to simplify 
interaction with the EventManager service Note that EventManager 
registration information is persistent data. This means that if you 
register with the EventManager service, if you shutdown STAF and restart 
it (even if you reboot the machine), the prior registration information 
will still be active. When STAF starts, it reads in the previous 
EventManager registration information, and again registers each STAF 
command with the Event service.

So, you could register with the EventManager service to submit a STAX 
EXECUTE reuest whenever a build event with a particular type/subtype is 
generated and when a build is complete, have it enerate a build event by 
submitting a GENERATE request to the EVENT service (which will trigger the 
STAX regression test job to run).

To find out more about these STAF services, go to 
http://staf.sourceforge.net/getservices.php and there are links to the 
STAF Event Service User's Guide and the EventManager Service User's Guide 
and links to download these services.  Note that the Event service is 
provided with STAX (as it is used by the STAX Monitior) and you may 
already have it registered in your STAF.cfg file.  You'll want to download 
and register the EventManager service in your STAF.cfg file in order to 
use it.

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




From:   Cindy Zhu <c...@fekete.com>
To:     "staf-users@lists.sourceforge.net" 
<staf-users@lists.sourceforge.net>
Date:   05/10/2011 10:42 AM
Subject:        [staf-users] How to put a STAX job in a queue



Hi,

I need to put a STAX job in a queue.

Currently, I have the following STAF command to run a STAX job:

STAF 1693W7.Fekete.com STAX EXECUTE FILE 
D:\DistributionTesting\SilkTestDistribution\RunOnTestPCs.xml MACHINE 
1693W7.Fekete.com JOBNAME "Silk" SCRIPT "VERSION='1.1.1.1'" SCRIPT 
"PRODUCT='HARMONY'"

1693W7.Fekete.com is the test host machine of the test clients. The STAX 
job here is to run the regression test on the test clients whenever a 
build is ready. We have specific machines to run the regression test for a 
specific application. We can only run the same STAX job on those machines 
only when the previous STAX job is finished.

Can you please help?

BTW, I searched the forum and I cannot get the exact answer of how to do 
this.


Thanks,

Cindy

 

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to