From: Ashish A. <aaw...@us...> - 2004-05-12 11:49:48
|
Update of /cvsroot/smartfrog/core/components/arithmetic-testharness/src/org/smartfrog/tools/testharness/templategen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6534/src/org/smartfrog/tools/testharness/templategen Added Files: Daemon.java doAll doAll.bat doAll.nt hosts.all templateDLSerrano.sf TemplateGen.java templateSecureDLSerrano.sf templateSecureSerrano.sf templateSerrano.sf templateSerrano.vm velocity.log Log Message: Adding arithmetic test harness to CVS. Ported to latest code base - Yes Running - Not yet --- NEW FILE: doAll.nt --- if ! test $SFHOME; then export SFHOME=$PWD; fi for i in $SFHOME/lib/*.jar; do CLASSPATH=$i";"$CLASSPATH; done export CLASSPATH java org.smartfrog.tools.testharness.templategen.TemplateGen -h hosts.all -o templateSerrano.sf -t templateSerrano.vm java org.smartfrog.tools.testharness.templategen.TemplateGen -s -h hosts.all -o templateSecureSerrano.sf -t templateSerrano.vm java org.smartfrog.tools.testharness.templategen.TemplateGen -d -h hosts.all -o templateDLSerrano.sf -t templateSerrano.vm java org.smartfrog.tools.testharness.templategen.TemplateGen -s -d -h hosts.all -o templateSecureDLSerrano.sf -t templateSerrano.vm --- NEW FILE: Daemon.java --- package org.smartfrog.tools.testharness.templategen; /** A bean class to store information about a daemon. * */ public class Daemon { /** A host in which this daemon is located.*/ String host; /** A logical name for this daemon.*/ String name; /** PrincipalMonitoredDaemon or just plain MonitoredDaemon*/ String type; /** Smartfrog home directory for this daemon.*/ String sfHome; /** OS (Windows or Linux) of the daemon.*/ String os; /** A daemon with special behaviour like hosting a web server.*/ public final static String PRINCIPAL_TYPE="PrincipalMonitoredDaemon"; /** A common daemon type.*/ public final static String NORMAL_TYPE="MonitoredDaemon"; /** An identifier for a windows machine. */ public final static String WINDOWS="windows"; /** An identifier for a linux machine. */ public final static String LINUX="linux"; public Daemon(String name,String host, String sfHome, String os, boolean isPrincipal) { if ((name==null) || (host==null) || (sfHome ==null) ||(os ==null)) throw new IllegalArgumentException("invalid inputs "+name+host+ sfHome+os); if (!((os.equals(WINDOWS) || (os.equals(LINUX))))) { throw new IllegalArgumentException("invalid OS "+os); } this.host = host; this.name = name; this.sfHome = sfHome; this.type = ((isPrincipal) ? PRINCIPAL_TYPE : NORMAL_TYPE); this.os = os; } public String getHost() { return host;} public String getName() { return name;} public String getType() { return type;} public String getSfHome() { return sfHome;} public boolean isWindows() { return os.equals(WINDOWS);} public boolean isLinux() { return os.equals(LINUX);} } --- NEW FILE: doAll.bat --- @echo off setlocal call %SFHOME%\bin\setClassPath java org.smartfrog.tools.testharness.templategen.TemplateGen -h hosts.all -o templateSerrano.sf -t templateSerrano.vm java org.smartfrog.tools.testharness.templategen.TemplateGen -s -h hosts.all -o templateSecureSerrano.sf -t templateSerrano.vm java org.smartfrog.tools.testharness.templategen.TemplateGen -d -h hosts.all -o templateDLSerrano.sf -t templateSerrano.vm java org.smartfrog.tools.testharness.templategen.TemplateGen -s -d -h hosts.all -o templateSecureDLSerrano.sf -t templateSerrano.vm --- NEW FILE: templateSerrano.sf --- #include "org/smartfrog/components.sf" #include "org/smartfrog/sfcore/workflow/components.sf" #include "org/smartfrog/services/runcmd/components.sf" #include "org/smartfrog/tools/testharness/components.sf" #include "org/smartfrog/services/trace/components.sf" TestRunCommand extends RunCommand { startCmd ATTRIB command; shouldTerminate "true"; workDir ATTRIB workingDirectory; envProperties ATTRIB allEnvProperties; outputStream LAZY ATTRIB globalOutput; logLevel 5; } MonitoredDaemon extends Compound { daemonOutput extends NotifyOutputFilterPrim { scheduler LAZY ATTRIB globalScheduler; processId ATTRIB daemonName; fileNameOutput ATTRIB daemonFileOutput; } doStartDaemon extends TestRunCommand { //RunCommand processName ATTRIB daemonName; startAtt_01 "-cp"; startAtt_02 ATTRIB classPath; startAtt_03a "-Dorg.smartfrog.sfcore.processcompound.sfRootLocatorPort="; startAtt_03b ATTRIB port; startAtt_04a "";// startAtt_04a "-Dorg.smartfrog.iniFile="; startAtt_04b ""; //startAtt_04b ATTRIB iniFile; startAtt_05a ""; //-Dorg.smartfrog.sfcore.iniSFFile="; startAtt_05b ""; // ATTRIB iniSFFile; startAtt_06a "-Dorg.smartfrog.sfcore.processcompound.sfProcessName="; startAtt_06b "rootProcess"; startAtt_12a ""; startAtt_12b ""; startAtt_14a ""; startAtt_14b ""; startAtt_20 "org.smartfrog.SFSystem"; startAtt_21 ""; startAtt_22 ""; startAtt_31 ""; outputStream LAZY ATTRIB daemonOutput; } } Scheduler extends SchedulerCompound { // bind global variables. numberOfAcks ATTRIB numDaemons; globalOutput extends NotifyOutputFilterPrim { processId ATTRIB globalProcess; fileNameOutput ATTRIB globalFileOutput; } // mainOutput extends NotifyOutputFilterPrim { // fileNameOutput "main.out"; //} main extends Sequence { actions extends LAZY { // Just wait until daemons ready waitForDaemons extends SynchCompound { terminateTag "waitForDaemons"; reallyDoNothing extends DoNothing { time 0; } } // Do the sfStarts. startApps extends SynchCompound { terminateTag "startApps"; doStartApps extends TestRunCommand { processName "startApps"; startAtt_01 "-cp"; startAtt_02 ATTRIB classPath; startAtt_03a "-Dorg.smartfrog.sfcore.processcompound.sfRootLocatorPort="; startAtt_03b ATTRIB port; startAtt_17 "org.smartfrog.SFSystem"; startAtt_18 "-h"; startAtt_19 "localhost";//ATTRIB sfProcessHost; startAtt_20 "-n"; startAtt_21 "sfConfig"; startAtt_22 ATTRIB appName; startAtt_23 "-e"; startAtt_24 ""; } } // Do the sfStops. stopApps extends SynchCompound { terminateTag "stopApps"; doStopApps extends TestRunCommand { processName "stopApps"; startAtt_01 "-cp"; startAtt_02 ATTRIB classPath; startAtt_03a "-Dorg.smartfrog.sfcore.processcompound.sfRootLocatorPort="; startAtt_03b ATTRIB port; startAtt_07 "org.smartfrog.SFSystem"; startAtt_08 "-h"; startAtt_09 "localhost";//ATTRIB sfProcessHost; startAtt_10 "-t"; startAtt_11 "sfConfig"; startAtt_12 "-e"; startAtt_13 ""; } } } } allDaemons extends Parallel { actions extends LAZY { daemon1 extends MonitoredDaemon { sfProcessHost "r001s001e01.sfcluster.hpl.hp.com"; daemonFileOutput "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distdaemon.out"; daemonName "daemon1"; workingDirectory "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/dist"; allEnvProperties ["SFHOME=/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/dist", "JAVA_HOME=/usr/java/j2sdk1.4.2_03", "PATH=/usr/java/j2sdk1.4.2_03/bin:/usr/local/bin:/usr/bin:/bin:."]; classPath "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distlib/smartfrog.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distlib/sfServices.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distlib/sfTools.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distlib/sfRegTest.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distlib/bsh-1.1a17.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distlib/SFGuiTools.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distlib/SFGuiBrowser.jar"; } daemon2 extends MonitoredDaemon { sfProcessHost "r001s002e01.sfcluster.hpl.hp.com"; daemonFileOutput "/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distdaemon.out"; daemonName "daemon2"; workingDirectory "/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/dist"; allEnvProperties ["SFHOME=/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/dist", "JAVA_HOME=/usr/java/j2sdk1.4.2_03", "PATH=/usr/java/j2sdk1.4.2_03/bin:/usr/local/bin:/usr/bin:/bin:."]; classPath "/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distlib/smartfrog.jar:/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distlib/sfServices.jar:/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distlib/sfTools.jar:/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distlib/sfRegTest.jar:/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distlib/bsh-1.1a17.jar:/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distlib/SFGuiTools.jar:/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distlib/SFGuiBrowser.jar"; } daemon3 extends MonitoredDaemon { sfProcessHost "r001s005e01.sfcluster.hpl.hp.com"; daemonFileOutput "/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distdaemon.out"; daemonName "daemon3"; workingDirectory "/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/dist"; allEnvProperties ["SFHOME=/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/dist", "JAVA_HOME=/usr/java/j2sdk1.4.2_03", "PATH=/usr/java/j2sdk1.4.2_03/bin:/usr/local/bin:/usr/bin:/bin:."]; classPath "/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distlib/smartfrog.jar:/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distlib/sfServices.jar:/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distlib/sfTools.jar:/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distlib/sfRegTest.jar:/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distlib/bsh-1.1a17.jar:/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distlib/SFGuiTools.jar:/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distlib/SFGuiBrowser.jar"; } daemonNT5 extends MonitoredDaemon { sfProcessHost "r001s004e01.sfcluster.hpl.hp.com"; daemonFileOutput "e:/testharness/daemons/win-demo-53/core/smartfrog/distdaemon.out"; daemonName "daemonNT5"; workingDirectory "e:/testharness/daemons/win-demo-53/core/smartfrog/dist"; command "java"; allEnvProperties ["SFHOME=e:/testharness/daemons/win-demo-53/core/smartfrog/dist", "JAVA_HOME=C:\\j2sdk1.4.2_03","WINDIR=C:\\WINNT", "systemroot=C:\\WINNT", "PATH=C:\\j2sdk1.4.2_03\\bin;.;"]; classPath "e:/testharness/daemons/win-demo-53/core/smartfrog/distlib/smartfrog.jar;e:/testharness/daemons/win-demo-53/core/smartfrog/distlib/sfServices.jar;e:/testharness/daemons/win-demo-53/core/smartfrog/distlib/sfTools.jar;e:/testharness/daemons/win-demo-53/core/smartfrog/distlib/sfRegTest.jar;e:/testharness/daemons/win-demo-53/core/smartfrog/distlib/bsh-1.1a17.jar;e:/testharness/daemons/win-demo-53/core/smartfrog/distlib/SFGuiTools.jar;e:/testharness/daemons/win-demo-53/core/smartfrog/distlib/SFGuiBrowser.jar"; } } } } TemplateSerrano extends Compound { // Default values for all the runCommand sfProcessHost "r001s001e01.sfcluster.hpl.hp.com"; command "java"; workingDirectory "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/dist"; allEnvProperties ["SFHOME=/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/dist", "JAVA_HOME=/usr/java/j2sdk1.4.2_03", "PATH=/usr/java/j2sdk1.4.2_03/bin:/usr/local/bin:/usr/bin:/bin:."]; classPath "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distlib/smartfrog.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distlib/sfServices.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distlib/sfTools.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distlib/sfRegTest.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distlib/bsh-1.1a17.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distlib/SFGuiTools.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distlib/SFGuiBrowser.jar"; port 3801; //iniSFFile "org/smartfrog/sfcore/default.sf"; // Application that we are testing. this is set from outside. // appName "org/smartfrog/examples/example1TH.sf"; globalProcess "Scheduler"; globalFileOutput "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distscheduler"; globalScheduler extends Scheduler; // trace extends Trace; // Global definitions... numDaemons 4; } --- NEW FILE: templateSerrano.vm --- #set ($mainJar = "smartfrog.jar") #if ($securityOn) #set ($libSubdir = "signedLib/") #if ($dynamicLoadingOn) #set ($libJars = []) #set ($httpJars = ["sfRegTest.jar","bsh-1.1a17.jar","sfTools.jar","sfServices.jar"]) #else ## security is ON and DL is OFF #set ($libJars = ["sfTools.jar","sfRegTest.jar","bsh-1.1a17.jar","sfServices.jar"]) #end #else ## security is NOT on #set ($libSubdir = "lib/") #if ($dynamicLoadingOn) #set ($libJars = []) #set ($httpJars = ["sfRegTest.jar","sfServices.jar","sfTools.jar","bsh-1.1a17.jar","SFGuiTools.jar","SFGuiBrowser.jar"]) #else ## security AND DL are OFF #set ($libJars = ["sfServices.jar","sfTools.jar","sfRegTest.jar","bsh-1.1a17.jar","SFGuiTools.jar","SFGuiBrowser.jar"]) #end #end \#include "org/smartfrog/components.sf" \#include "org/smartfrog/sfcore/workflow/components.sf" \#include "org/smartfrog/services/runcmd/components.sf" \#include "org/smartfrog/tools/testharness/components.sf" \#include "org/smartfrog/services/trace/components.sf" TestRunCommand extends RunCommand { startCmd ATTRIB command; shouldTerminate "true"; workDir ATTRIB workingDirectory; envProperties ATTRIB allEnvProperties; outputStream LAZY ATTRIB globalOutput; logLevel 5; } MonitoredDaemon extends Compound { daemonOutput extends NotifyOutputFilterPrim { scheduler LAZY ATTRIB globalScheduler; processId ATTRIB daemonName; fileNameOutput ATTRIB daemonFileOutput; } doStartDaemon extends TestRunCommand { //RunCommand processName ATTRIB daemonName; startAtt_01 "-cp"; startAtt_02 ATTRIB classPath; startAtt_03a "-Dorg.smartfrog.sfcore.processcompound.sfRootLocatorPort="; startAtt_03b ATTRIB port; startAtt_04a "";// startAtt_04a "-Dorg.smartfrog.iniFile="; startAtt_04b ""; //startAtt_04b ATTRIB iniFile; startAtt_05a ""; //-Dorg.smartfrog.sfcore.iniSFFile="; startAtt_05b ""; // ATTRIB iniSFFile; startAtt_06a "-Dorg.smartfrog.sfcore.processcompound.sfProcessName="; startAtt_06b "rootProcess"; #if ($securityOn) startAtt_07a "-Djava.security.policy=="; startAtt_07b ATTRIB secPolicy; startAtt_08a "-Dorg.smartfrog.sfcore.security.keyStoreName="; startAtt_08b ATTRIB secKeyStore; startAtt_09a "-Dorg.smartfrog.sfcore.security.propFile="; startAtt_09b ATTRIB secPropFile; // startAtt_47 "-Dorg.smartfrog.sfcore.security.debug=true"; // startAtt_48 "-Djava.security.debug=policy"; // startAtt_49 "-Djavax.net.debug=ssl"; #end #if ($dynamicLoadingOn) startAtt_10a "-Dorg.smartfrog.sfcore.codebase="; startAtt_10b ATTRIB httpCodebase; #if ($securityOn) // startAtt_90a "-Djava.rmi.server.codebase="; // startAtt_90b ATTRIB httpCodebase; #end #end startAtt_12a ""; startAtt_12b ""; startAtt_14a ""; startAtt_14b ""; startAtt_20 "org.smartfrog.SFSystem"; startAtt_21 ""; startAtt_22 ""; startAtt_31 ""; outputStream LAZY ATTRIB daemonOutput; } } #if ($dynamicLoadingOn) PrincipalMonitoredDaemon extends MonitoredDaemon { // doStartDaemon:startAtt_12a "-Dorg.smartfrog.iniSFFile="; // doStartDaemon:startAtt_12b "org/smartfrog/SFDynaServer/dynadaemon.sf"; //tocheck doStartDaemon:startAtt_21 "-c"; doStartDaemon:startAtt_22 "org/smartfrog/services/codeserver/dynadaemon.sf"; //tocheck doStartDaemon:startAtt_14a "-DDSHOMEBASE="; doStartDaemon:startAtt_14b "${principalDaemon.sfHome}$libSubdir"; } #end Scheduler extends SchedulerCompound { // bind global variables. numberOfAcks ATTRIB numDaemons; globalOutput extends NotifyOutputFilterPrim { processId ATTRIB globalProcess; fileNameOutput ATTRIB globalFileOutput; } // mainOutput extends NotifyOutputFilterPrim { // fileNameOutput "main.out"; //} main extends Sequence { actions extends LAZY { // Just wait until daemons ready waitForDaemons extends SynchCompound { terminateTag "waitForDaemons"; reallyDoNothing extends DoNothing { time 0; } } // Do the sfStarts. startApps extends SynchCompound { terminateTag "startApps"; doStartApps extends TestRunCommand { processName "startApps"; startAtt_01 "-cp"; startAtt_02 ATTRIB classPath; startAtt_03a "-Dorg.smartfrog.sfcore.processcompound.sfRootLocatorPort="; startAtt_03b ATTRIB port; #if ($securityOn) startAtt_04a "-Djava.security.policy=="; startAtt_04b ATTRIB secPolicy; startAtt_05a "-Dorg.smartfrog.sfcore.security.keyStoreName="; startAtt_05b ATTRIB secKeyStore; startAtt_06a "-Dorg.smartfrog.sfcore.security.propFile="; startAtt_06b ATTRIB secPropFile; // startAtt_47 "-Dorg.smartfrog.sfcore.security.debug=true"; // startAtt_48 "-Djava.security.debug=policy"; #end #if ($dynamicLoadingOn) startAtt_10a "-Dorg.smartfrog.sfcore.codebase="; startAtt_10b ATTRIB httpCodebase; #if ($securityOn) // startAtt_90a "-Djava.rmi.server.codebase="; // startAtt_90b ATTRIB httpCodebase; #end #end startAtt_17 "org.smartfrog.SFSystem"; startAtt_18 "-h"; startAtt_19 "localhost";//ATTRIB sfProcessHost; startAtt_20 "-n"; startAtt_21 "sfConfig"; startAtt_22 ATTRIB appName; startAtt_23 "-e"; startAtt_24 ""; } } // Do the sfStops. stopApps extends SynchCompound { terminateTag "stopApps"; doStopApps extends TestRunCommand { processName "stopApps"; startAtt_01 "-cp"; startAtt_02 ATTRIB classPath; startAtt_03a "-Dorg.smartfrog.sfcore.processcompound.sfRootLocatorPort="; startAtt_03b ATTRIB port; #if ($securityOn) startAtt_04a "-Djava.security.policy=="; startAtt_04b ATTRIB secPolicy; startAtt_05a "-Dorg.smartfrog.sfcore.security.keyStoreName="; startAtt_05b ATTRIB secKeyStore; startAtt_06a "-Dorg.smartfrog.sfcore.security.propFile="; startAtt_06b ATTRIB secPropFile; #end startAtt_07 "org.smartfrog.SFSystem"; startAtt_08 "-h"; startAtt_09 "localhost";//ATTRIB sfProcessHost; startAtt_10 "-t"; startAtt_11 "sfConfig"; startAtt_12 "-e"; startAtt_13 ""; } } } } allDaemons extends Parallel { actions extends LAZY { #foreach ($daemon in $allDaemons) $daemon.name extends $daemon.type { sfProcessHost "$daemon.host"; daemonFileOutput "${daemon.sfHome}daemon.out"; daemonName "$daemon.name"; workingDirectory "${daemon.sfHome}"; #if ($daemon.isLinux()) allEnvProperties ["SFHOME=${daemon.sfHome}", "JAVA_HOME=/usr/java/j2sdk1.4.2_03", "PATH=/usr/java/j2sdk1.4.2_03/bin:/usr/local/bin:/usr/bin:/bin:."]; classPath "${daemon.sfHome}${libSubdir}${mainJar}#foreach ($jar in $libJars):${daemon.sfHome}${libSubdir}${jar}#end"; #else command "java"; allEnvProperties ["SFHOME=${daemon.sfHome}", "JAVA_HOME=C:\\j2sdk1.4.2_03","WINDIR=C:\\WINNT", "systemroot=C:\\WINNT", "PATH=C:\\j2sdk1.4.2_03\\bin;.;"]; classPath "${daemon.sfHome}${libSubdir}${mainJar}#foreach ($jar in $libJars);${daemon.sfHome}${libSubdir}${jar}#end"; #end #if ($securityOn) secPolicy "${daemon.sfHome}private/sf.policy"; secKeyStore "${daemon.sfHome}private/local/mykeys.st"; secPropFile "${daemon.sfHome}private/local/SFsecurity.properties"; #end } #end } } } TemplateSerrano extends Compound { // Default values for all the runCommand sfProcessHost "${principalDaemon.host}"; command "java"; workingDirectory "${principalDaemon.sfHome}"; allEnvProperties ["SFHOME=${principalDaemon.sfHome}", "JAVA_HOME=/usr/java/j2sdk1.4.2_03", "PATH=/usr/java/j2sdk1.4.2_03/bin:/usr/local/bin:/usr/bin:/bin:."]; classPath "${principalDaemon.sfHome}${libSubdir}${mainJar}#foreach ($jar in $libJars):${principalDaemon.sfHome}${libSubdir}${jar}#end"; #if ($dynamicLoadingOn) httpCodebase "#foreach ($jar in $httpJars)http://${principalDaemon.host}:8080/${jar} #end"; #end #if ($securityOn) secPolicy "${principalDaemon.sfHome}private/sf.policy"; secKeyStore "${principalDaemon.sfHome}private/local/mykeys.st"; secPropFile "${principalDaemon.sfHome}private/local/SFsecurity.properties"; #end port 3801; //iniSFFile "org/smartfrog/sfcore/default.sf"; // Application that we are testing. this is set from outside. // appName "org/smartfrog/examples/example1TH.sf"; globalProcess "Scheduler"; globalFileOutput "${principalDaemon.sfHome}scheduler"; globalScheduler extends Scheduler; // trace extends Trace; // Global definitions... numDaemons ${numberDaemons}; } --- NEW FILE: templateSecureDLSerrano.sf --- #include "org/smartfrog/components.sf" #include "org/smartfrog/sfcore/workflow/components.sf" #include "org/smartfrog/services/runcmd/components.sf" #include "org/smartfrog/tools/testharness/components.sf" #include "org/smartfrog/services/trace/components.sf" TestRunCommand extends RunCommand { startCmd ATTRIB command; shouldTerminate "true"; workDir ATTRIB workingDirectory; envProperties ATTRIB allEnvProperties; outputStream LAZY ATTRIB globalOutput; logLevel 5; } MonitoredDaemon extends Compound { daemonOutput extends NotifyOutputFilterPrim { scheduler LAZY ATTRIB globalScheduler; processId ATTRIB daemonName; fileNameOutput ATTRIB daemonFileOutput; } doStartDaemon extends TestRunCommand { //RunCommand processName ATTRIB daemonName; startAtt_01 "-cp"; startAtt_02 ATTRIB classPath; startAtt_03a "-Dorg.smartfrog.sfcore.processcompound.sfRootLocatorPort="; startAtt_03b ATTRIB port; startAtt_04a "";// startAtt_04a "-Dorg.smartfrog.iniFile="; startAtt_04b ""; //startAtt_04b ATTRIB iniFile; startAtt_05a ""; //-Dorg.smartfrog.sfcore.iniSFFile="; startAtt_05b ""; // ATTRIB iniSFFile; startAtt_06a "-Dorg.smartfrog.sfcore.processcompound.sfProcessName="; startAtt_06b "rootProcess"; startAtt_07a "-Djava.security.policy=="; startAtt_07b ATTRIB secPolicy; startAtt_08a "-Dorg.smartfrog.sfcore.security.keyStoreName="; startAtt_08b ATTRIB secKeyStore; startAtt_09a "-Dorg.smartfrog.sfcore.security.propFile="; startAtt_09b ATTRIB secPropFile; // startAtt_47 "-Dorg.smartfrog.sfcore.security.debug=true"; // startAtt_48 "-Djava.security.debug=policy"; // startAtt_49 "-Djavax.net.debug=ssl"; startAtt_10a "-Dorg.smartfrog.sfcore.codebase="; startAtt_10b ATTRIB httpCodebase; // startAtt_90a "-Djava.rmi.server.codebase="; // startAtt_90b ATTRIB httpCodebase; startAtt_12a ""; startAtt_12b ""; startAtt_14a ""; startAtt_14b ""; startAtt_20 "org.smartfrog.SFSystem"; startAtt_21 ""; startAtt_22 ""; startAtt_31 ""; outputStream LAZY ATTRIB daemonOutput; } } PrincipalMonitoredDaemon extends MonitoredDaemon { // doStartDaemon:startAtt_12a "-Dorg.smartfrog.iniSFFile="; // doStartDaemon:startAtt_12b "org/smartfrog/SFDynaServer/dynadaemon.sf"; //tocheck doStartDaemon:startAtt_21 "-c"; doStartDaemon:startAtt_22 "org/smartfrog/services/codeserver/dynadaemon.sf"; //tocheck doStartDaemon:startAtt_14a "-DDSHOMEBASE="; doStartDaemon:startAtt_14b "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distsignedLib/"; } Scheduler extends SchedulerCompound { // bind global variables. numberOfAcks ATTRIB numDaemons; globalOutput extends NotifyOutputFilterPrim { processId ATTRIB globalProcess; fileNameOutput ATTRIB globalFileOutput; } // mainOutput extends NotifyOutputFilterPrim { // fileNameOutput "main.out"; //} main extends Sequence { actions extends LAZY { // Just wait until daemons ready waitForDaemons extends SynchCompound { terminateTag "waitForDaemons"; reallyDoNothing extends DoNothing { time 0; } } // Do the sfStarts. startApps extends SynchCompound { terminateTag "startApps"; doStartApps extends TestRunCommand { processName "startApps"; startAtt_01 "-cp"; startAtt_02 ATTRIB classPath; startAtt_03a "-Dorg.smartfrog.sfcore.processcompound.sfRootLocatorPort="; startAtt_03b ATTRIB port; startAtt_04a "-Djava.security.policy=="; startAtt_04b ATTRIB secPolicy; startAtt_05a "-Dorg.smartfrog.sfcore.security.keyStoreName="; startAtt_05b ATTRIB secKeyStore; startAtt_06a "-Dorg.smartfrog.sfcore.security.propFile="; startAtt_06b ATTRIB secPropFile; // startAtt_47 "-Dorg.smartfrog.sfcore.security.debug=true"; // startAtt_48 "-Djava.security.debug=policy"; startAtt_10a "-Dorg.smartfrog.sfcore.codebase="; startAtt_10b ATTRIB httpCodebase; // startAtt_90a "-Djava.rmi.server.codebase="; // startAtt_90b ATTRIB httpCodebase; startAtt_17 "org.smartfrog.SFSystem"; startAtt_18 "-h"; startAtt_19 "localhost";//ATTRIB sfProcessHost; startAtt_20 "-n"; startAtt_21 "sfConfig"; startAtt_22 ATTRIB appName; startAtt_23 "-e"; startAtt_24 ""; } } // Do the sfStops. stopApps extends SynchCompound { terminateTag "stopApps"; doStopApps extends TestRunCommand { processName "stopApps"; startAtt_01 "-cp"; startAtt_02 ATTRIB classPath; startAtt_03a "-Dorg.smartfrog.sfcore.processcompound.sfRootLocatorPort="; startAtt_03b ATTRIB port; startAtt_04a "-Djava.security.policy=="; startAtt_04b ATTRIB secPolicy; startAtt_05a "-Dorg.smartfrog.sfcore.security.keyStoreName="; startAtt_05b ATTRIB secKeyStore; startAtt_06a "-Dorg.smartfrog.sfcore.security.propFile="; startAtt_06b ATTRIB secPropFile; startAtt_07 "org.smartfrog.SFSystem"; startAtt_08 "-h"; startAtt_09 "localhost";//ATTRIB sfProcessHost; startAtt_10 "-t"; startAtt_11 "sfConfig"; startAtt_12 "-e"; startAtt_13 ""; } } } } allDaemons extends Parallel { actions extends LAZY { daemon1 extends PrincipalMonitoredDaemon { sfProcessHost "r001s001e01.sfcluster.hpl.hp.com"; daemonFileOutput "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distdaemon.out"; daemonName "daemon1"; workingDirectory "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/dist"; allEnvProperties ["SFHOME=/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/dist", "JAVA_HOME=/usr/java/j2sdk1.4.2_03", "PATH=/usr/java/j2sdk1.4.2_03/bin:/usr/local/bin:/usr/bin:/bin:."]; classPath "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distsignedLib/smartfrog.jar"; secPolicy "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distprivate/sf.policy"; secKeyStore "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distprivate/local/mykeys.st"; secPropFile "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distprivate/local/SFsecurity.properties"; } daemon2 extends MonitoredDaemon { sfProcessHost "r001s002e01.sfcluster.hpl.hp.com"; daemonFileOutput "/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distdaemon.out"; daemonName "daemon2"; workingDirectory "/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/dist"; allEnvProperties ["SFHOME=/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/dist", "JAVA_HOME=/usr/java/j2sdk1.4.2_03", "PATH=/usr/java/j2sdk1.4.2_03/bin:/usr/local/bin:/usr/bin:/bin:."]; classPath "/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distsignedLib/smartfrog.jar"; secPolicy "/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distprivate/sf.policy"; secKeyStore "/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distprivate/local/mykeys.st"; secPropFile "/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distprivate/local/SFsecurity.properties"; } daemon3 extends MonitoredDaemon { sfProcessHost "r001s005e01.sfcluster.hpl.hp.com"; daemonFileOutput "/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distdaemon.out"; daemonName "daemon3"; workingDirectory "/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/dist"; allEnvProperties ["SFHOME=/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/dist", "JAVA_HOME=/usr/java/j2sdk1.4.2_03", "PATH=/usr/java/j2sdk1.4.2_03/bin:/usr/local/bin:/usr/bin:/bin:."]; classPath "/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distsignedLib/smartfrog.jar"; secPolicy "/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distprivate/sf.policy"; secKeyStore "/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distprivate/local/mykeys.st"; secPropFile "/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distprivate/local/SFsecurity.properties"; } daemonNT5 extends MonitoredDaemon { sfProcessHost "r001s004e01.sfcluster.hpl.hp.com"; daemonFileOutput "e:/testharness/daemons/win-demo-53/core/smartfrog/distdaemon.out"; daemonName "daemonNT5"; workingDirectory "e:/testharness/daemons/win-demo-53/core/smartfrog/dist"; command "java"; allEnvProperties ["SFHOME=e:/testharness/daemons/win-demo-53/core/smartfrog/dist", "JAVA_HOME=C:\\j2sdk1.4.2_03","WINDIR=C:\\WINNT", "systemroot=C:\\WINNT", "PATH=C:\\j2sdk1.4.2_03\\bin;.;"]; classPath "e:/testharness/daemons/win-demo-53/core/smartfrog/distsignedLib/smartfrog.jar"; secPolicy "e:/testharness/daemons/win-demo-53/core/smartfrog/distprivate/sf.policy"; secKeyStore "e:/testharness/daemons/win-demo-53/core/smartfrog/distprivate/local/mykeys.st"; secPropFile "e:/testharness/daemons/win-demo-53/core/smartfrog/distprivate/local/SFsecurity.properties"; } } } } TemplateSerrano extends Compound { // Default values for all the runCommand sfProcessHost "r001s001e01.sfcluster.hpl.hp.com"; command "java"; workingDirectory "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/dist"; allEnvProperties ["SFHOME=/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/dist", "JAVA_HOME=/usr/java/j2sdk1.4.2_03", "PATH=/usr/java/j2sdk1.4.2_03/bin:/usr/local/bin:/usr/bin:/bin:."]; classPath "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distsignedLib/smartfrog.jar"; httpCodebase "http://r001s001e01.sfcluster.hpl.hp.com:8080/sfRegTest.jar http://r001s001e01.sfcluster.hpl.hp.com:8080/bsh-1.1a17.jar http://r001s001e01.sfcluster.hpl.hp.com:8080/sfTools.jar http://r001s001e01.sfcluster.hpl.hp.com:8080/sfServices.jar "; secPolicy "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distprivate/sf.policy"; secKeyStore "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distprivate/local/mykeys.st"; secPropFile "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distprivate/local/SFsecurity.properties"; port 3801; //iniSFFile "org/smartfrog/sfcore/default.sf"; // Application that we are testing. this is set from outside. // appName "org/smartfrog/examples/example1TH.sf"; globalProcess "Scheduler"; globalFileOutput "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distscheduler"; globalScheduler extends Scheduler; // trace extends Trace; // Global definitions... numDaemons 4; } --- NEW FILE: hosts.all --- daemon1 r001s001e01.sfcluster.hpl.hp.com /home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/dist linux daemon2 r001s002e01.sfcluster.hpl.hp.com /home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/dist linux daemon3 r001s005e01.sfcluster.hpl.hp.com /home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/dist linux daemonNT5 r001s004e01.sfcluster.hpl.hp.com e:/testharness/daemons/win-demo-53/core/smartfrog/dist windows --- NEW FILE: templateSecureSerrano.sf --- #include "org/smartfrog/components.sf" #include "org/smartfrog/sfcore/workflow/components.sf" #include "org/smartfrog/services/runcmd/components.sf" #include "org/smartfrog/tools/testharness/components.sf" #include "org/smartfrog/services/trace/components.sf" TestRunCommand extends RunCommand { startCmd ATTRIB command; shouldTerminate "true"; workDir ATTRIB workingDirectory; envProperties ATTRIB allEnvProperties; outputStream LAZY ATTRIB globalOutput; logLevel 5; } MonitoredDaemon extends Compound { daemonOutput extends NotifyOutputFilterPrim { scheduler LAZY ATTRIB globalScheduler; processId ATTRIB daemonName; fileNameOutput ATTRIB daemonFileOutput; } doStartDaemon extends TestRunCommand { //RunCommand processName ATTRIB daemonName; startAtt_01 "-cp"; startAtt_02 ATTRIB classPath; startAtt_03a "-Dorg.smartfrog.sfcore.processcompound.sfRootLocatorPort="; startAtt_03b ATTRIB port; startAtt_04a "";// startAtt_04a "-Dorg.smartfrog.iniFile="; startAtt_04b ""; //startAtt_04b ATTRIB iniFile; startAtt_05a ""; //-Dorg.smartfrog.sfcore.iniSFFile="; startAtt_05b ""; // ATTRIB iniSFFile; startAtt_06a "-Dorg.smartfrog.sfcore.processcompound.sfProcessName="; startAtt_06b "rootProcess"; startAtt_07a "-Djava.security.policy=="; startAtt_07b ATTRIB secPolicy; startAtt_08a "-Dorg.smartfrog.sfcore.security.keyStoreName="; startAtt_08b ATTRIB secKeyStore; startAtt_09a "-Dorg.smartfrog.sfcore.security.propFile="; startAtt_09b ATTRIB secPropFile; // startAtt_47 "-Dorg.smartfrog.sfcore.security.debug=true"; // startAtt_48 "-Djava.security.debug=policy"; // startAtt_49 "-Djavax.net.debug=ssl"; startAtt_12a ""; startAtt_12b ""; startAtt_14a ""; startAtt_14b ""; startAtt_20 "org.smartfrog.SFSystem"; startAtt_21 ""; startAtt_22 ""; startAtt_31 ""; outputStream LAZY ATTRIB daemonOutput; } } Scheduler extends SchedulerCompound { // bind global variables. numberOfAcks ATTRIB numDaemons; globalOutput extends NotifyOutputFilterPrim { processId ATTRIB globalProcess; fileNameOutput ATTRIB globalFileOutput; } // mainOutput extends NotifyOutputFilterPrim { // fileNameOutput "main.out"; //} main extends Sequence { actions extends LAZY { // Just wait until daemons ready waitForDaemons extends SynchCompound { terminateTag "waitForDaemons"; reallyDoNothing extends DoNothing { time 0; } } // Do the sfStarts. startApps extends SynchCompound { terminateTag "startApps"; doStartApps extends TestRunCommand { processName "startApps"; startAtt_01 "-cp"; startAtt_02 ATTRIB classPath; startAtt_03a "-Dorg.smartfrog.sfcore.processcompound.sfRootLocatorPort="; startAtt_03b ATTRIB port; startAtt_04a "-Djava.security.policy=="; startAtt_04b ATTRIB secPolicy; startAtt_05a "-Dorg.smartfrog.sfcore.security.keyStoreName="; startAtt_05b ATTRIB secKeyStore; startAtt_06a "-Dorg.smartfrog.sfcore.security.propFile="; startAtt_06b ATTRIB secPropFile; // startAtt_47 "-Dorg.smartfrog.sfcore.security.debug=true"; // startAtt_48 "-Djava.security.debug=policy"; startAtt_17 "org.smartfrog.SFSystem"; startAtt_18 "-h"; startAtt_19 "localhost";//ATTRIB sfProcessHost; startAtt_20 "-n"; startAtt_21 "sfConfig"; startAtt_22 ATTRIB appName; startAtt_23 "-e"; startAtt_24 ""; } } // Do the sfStops. stopApps extends SynchCompound { terminateTag "stopApps"; doStopApps extends TestRunCommand { processName "stopApps"; startAtt_01 "-cp"; startAtt_02 ATTRIB classPath; startAtt_03a "-Dorg.smartfrog.sfcore.processcompound.sfRootLocatorPort="; startAtt_03b ATTRIB port; startAtt_04a "-Djava.security.policy=="; startAtt_04b ATTRIB secPolicy; startAtt_05a "-Dorg.smartfrog.sfcore.security.keyStoreName="; startAtt_05b ATTRIB secKeyStore; startAtt_06a "-Dorg.smartfrog.sfcore.security.propFile="; startAtt_06b ATTRIB secPropFile; startAtt_07 "org.smartfrog.SFSystem"; startAtt_08 "-h"; startAtt_09 "localhost";//ATTRIB sfProcessHost; startAtt_10 "-t"; startAtt_11 "sfConfig"; startAtt_12 "-e"; startAtt_13 ""; } } } } allDaemons extends Parallel { actions extends LAZY { daemon1 extends MonitoredDaemon { sfProcessHost "r001s001e01.sfcluster.hpl.hp.com"; daemonFileOutput "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distdaemon.out"; daemonName "daemon1"; workingDirectory "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/dist"; allEnvProperties ["SFHOME=/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/dist", "JAVA_HOME=/usr/java/j2sdk1.4.2_03", "PATH=/usr/java/j2sdk1.4.2_03/bin:/usr/local/bin:/usr/bin:/bin:."]; classPath "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distsignedLib/smartfrog.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distsignedLib/sfTools.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distsignedLib/sfRegTest.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distsignedLib/bsh-1.1a17.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distsignedLib/sfServices.jar"; secPolicy "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distprivate/sf.policy"; secKeyStore "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distprivate/local/mykeys.st"; secPropFile "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distprivate/local/SFsecurity.properties"; } daemon2 extends MonitoredDaemon { sfProcessHost "r001s002e01.sfcluster.hpl.hp.com"; daemonFileOutput "/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distdaemon.out"; daemonName "daemon2"; workingDirectory "/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/dist"; allEnvProperties ["SFHOME=/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/dist", "JAVA_HOME=/usr/java/j2sdk1.4.2_03", "PATH=/usr/java/j2sdk1.4.2_03/bin:/usr/local/bin:/usr/bin:/bin:."]; classPath "/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distsignedLib/smartfrog.jar:/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distsignedLib/sfTools.jar:/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distsignedLib/sfRegTest.jar:/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distsignedLib/bsh-1.1a17.jar:/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distsignedLib/sfServices.jar"; secPolicy "/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distprivate/sf.policy"; secKeyStore "/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distprivate/local/mykeys.st"; secPropFile "/home/sf/shared/testharness/daemons/demo-linux-51/core/smartfrog/distprivate/local/SFsecurity.properties"; } daemon3 extends MonitoredDaemon { sfProcessHost "r001s005e01.sfcluster.hpl.hp.com"; daemonFileOutput "/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distdaemon.out"; daemonName "daemon3"; workingDirectory "/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/dist"; allEnvProperties ["SFHOME=/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/dist", "JAVA_HOME=/usr/java/j2sdk1.4.2_03", "PATH=/usr/java/j2sdk1.4.2_03/bin:/usr/local/bin:/usr/bin:/bin:."]; classPath "/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distsignedLib/smartfrog.jar:/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distsignedLib/sfTools.jar:/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distsignedLib/sfRegTest.jar:/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distsignedLib/bsh-1.1a17.jar:/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distsignedLib/sfServices.jar"; secPolicy "/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distprivate/sf.policy"; secKeyStore "/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distprivate/local/mykeys.st"; secPropFile "/home/sf/shared/testharness/daemons/demo-linux-54/core/smartfrog/distprivate/local/SFsecurity.properties"; } daemonNT5 extends MonitoredDaemon { sfProcessHost "r001s004e01.sfcluster.hpl.hp.com"; daemonFileOutput "e:/testharness/daemons/win-demo-53/core/smartfrog/distdaemon.out"; daemonName "daemonNT5"; workingDirectory "e:/testharness/daemons/win-demo-53/core/smartfrog/dist"; command "java"; allEnvProperties ["SFHOME=e:/testharness/daemons/win-demo-53/core/smartfrog/dist", "JAVA_HOME=C:\\j2sdk1.4.2_03","WINDIR=C:\\WINNT", "systemroot=C:\\WINNT", "PATH=C:\\j2sdk1.4.2_03\\bin;.;"]; classPath "e:/testharness/daemons/win-demo-53/core/smartfrog/distsignedLib/smartfrog.jar;e:/testharness/daemons/win-demo-53/core/smartfrog/distsignedLib/sfTools.jar;e:/testharness/daemons/win-demo-53/core/smartfrog/distsignedLib/sfRegTest.jar;e:/testharness/daemons/win-demo-53/core/smartfrog/distsignedLib/bsh-1.1a17.jar;e:/testharness/daemons/win-demo-53/core/smartfrog/distsignedLib/sfServices.jar"; secPolicy "e:/testharness/daemons/win-demo-53/core/smartfrog/distprivate/sf.policy"; secKeyStore "e:/testharness/daemons/win-demo-53/core/smartfrog/distprivate/local/mykeys.st"; secPropFile "e:/testharness/daemons/win-demo-53/core/smartfrog/distprivate/local/SFsecurity.properties"; } } } } TemplateSerrano extends Compound { // Default values for all the runCommand sfProcessHost "r001s001e01.sfcluster.hpl.hp.com"; command "java"; workingDirectory "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/dist"; allEnvProperties ["SFHOME=/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/dist", "JAVA_HOME=/usr/java/j2sdk1.4.2_03", "PATH=/usr/java/j2sdk1.4.2_03/bin:/usr/local/bin:/usr/bin:/bin:."]; classPath "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distsignedLib/smartfrog.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distsignedLib/sfTools.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distsignedLib/sfRegTest.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distsignedLib/bsh-1.1a17.jar:/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distsignedLib/sfServices.jar"; secPolicy "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distprivate/sf.policy"; secKeyStore "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distprivate/local/mykeys.st"; secPropFile "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distprivate/local/SFsecurity.properties"; port 3801; //iniSFFile "org/smartfrog/sfcore/default.sf"; // Application that we are testing. this is set from outside. // appName "org/smartfrog/examples/example1TH.sf"; globalProcess "Scheduler"; globalFileOutput "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distscheduler"; globalScheduler extends Scheduler; // trace extends Trace; // Global definitions... numDaemons 4; } --- NEW FILE: velocity.log --- Tue Apr 13 14:21:32 GMT+05:30 2004 AvalonLogSystem initialized using logfile E:\cvs\forge\mar11\core\components\arithmetic-testharness\src\org\smartfrog\tools\testharness\templategen\velocity.log Tue Apr 13 14:21:32 GMT+05:30 2004 [info] [info] Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties Tue Apr 13 14:21:32 GMT+05:30 2004 [info] Resource Loader Instantiated: org.apache.velocity.runtime.resource.loader.FileResourceLoader Tue Apr 13 14:21:32 GMT+05:30 2004 [info] FileResourceLoader : initialization starting. Tue Apr 13 14:21:32 GMT+05:30 2004 [info] FileResourceLoader : adding path '.' Tue Apr 13 14:21:32 GMT+05:30 2004 [info] FileResourceLoader : initialization complete. Tue Apr 13 14:21:32 GMT+05:30 2004 [info] Loaded Pluggable Directive: org.apache.velocity.runtime.directive.Literal Tue Apr 13 14:21:32 GMT+05:30 2004 [info] Loaded Pluggable Directive: org.apache.velocity.runtime.directive.Macro Tue Apr 13 14:21:32 GMT+05:30 2004 [info] Loaded Pluggable Directive: org.apache.velocity.runtime.directive.Parse Tue Apr 13 14:21:32 GMT+05:30 2004 [info] Loaded Pluggable Directive: org.apache.velocity.runtime.directive.Include Tue Apr 13 14:21:32 GMT+05:30 2004 [info] Loaded Pluggable Directive: org.apache.velocity.runtime.directive.Foreach Tue Apr 13 14:21:32 GMT+05:30 2004 [info] Created: 20 parsers. Tue Apr 13 14:21:32 GMT+05:30 2004 [info] Velocimacro : initialization starting. Tue Apr 13 14:21:32 GMT+05:30 2004 [info] Velocimacro : adding VMs from VM library template : VM_global_library.vm Tue Apr 13 14:21:32 GMT+05:30 2004 [error] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader. Tue Apr 13 14:21:32 GMT+05:30 2004 [info] Velocimacro : error using VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm' Tue Apr 13 14:21:32 GMT+05:30 2004 [info] Velocimacro : allowInline = true : VMs can be defined inline in templates Tue Apr 13 14:21:32 GMT+05:30 2004 [info] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions Tue Apr 13 14:21:32 GMT+05:30 2004 [info] Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed. Tue Apr 13 14:21:32 GMT+05:30 2004 [info] Velocimacro : messages on : VM system will output logging messages Tue Apr 13 14:21:32 GMT+05:30 2004 [info] Velocimacro : initialization complete. Tue Apr 13 14:21:32 GMT+05:30 2004 [info] Velocity successfully started. Tue Apr 13 14:21:32 GMT+05:30 2004 [info] ResourceManager : found templateSerrano.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader --- NEW FILE: doAll --- if ! test $SFHOME; then export SFHOME=$PWD; fi for i in $SFHOME/lib/*.jar; do CLASSPATH=$i:$CLASSPATH; done export CLASSPATH java org.smartfrog.tools.testharness.templategen.TemplateGen -h hosts.all -o templateSerrano.sf -t templateSerrano.vm java org.smartfrog.tools.testharness.templategen.TemplateGen -s -h hosts.all -o templateSecureSerrano.sf -t templateSerrano.vm java org.smartfrog.tools.testharness.templategen.TemplateGen -d -h hosts.all -o templateDLSerrano.sf -t templateSerrano.vm java org.smartfrog.tools.testharness.templategen.TemplateGen -s -d -h hosts.all -o templateSecureDLSerrano.sf -t templateSerrano.vm --- NEW FILE: TemplateGen.java --- package org.smartfrog.tools.testharness.templategen; import java.io.StringReader; import java.util.Vector; import org.apache.velocity.app.Velocity; import org.apache.velocity.VelocityContext; import org.apache.velocity.Template; import java.io.PrintStream; import java.io.FileOutputStream; import java.io.Reader; import java.io.BufferedReader; import java.io.FileReader; import java.io.StreamTokenizer; import java.io.BufferedWriter; import java.io.OutputStreamWriter; /** Instantiates a meta-template with the customization that our * experimental setting requires, e.g., the names and number of * physical machines, the name of the main jar files, the generic * options used for testing (security on/off, dynamic loading * on/off). */ public class TemplateGen { /** An input file with the "raw" template. */ String templateFileName; /** An out file for the processed template. */ String outputFileName; /** An input file with the description of the hosts involved. */ String hostsFileName; /** A template that will instantiate the example.*/ Template template; /** A collection of all the daemons.*/ Vector allDaemons; /** A special daemon for dynamic loading jar files. */ Daemon principalDaemon = null; /** A flag to generate templates using security.*/ boolean securityOn=false; /** A flag to generate templates downloading jars dynamically from * web servers */ boolean dynamicLoadingOn=false; /** Number of Daemons deployed. */ int numberDaemons=0; char optionFlagIndicator = '-'; public final String usage = "\n" + "Usage: java org.smartfrog.tools.testharness.templateGen.TemplateGen " + "-t <templateFile> -h <hostsFile> -o <outputfile> [-s for security"+ " ON] [-d for dynamic loading] "; /** * Class Constructor. * * @param args input command line string. * @exception Exception Can't instantiate template. */ public TemplateGen(String[] args) throws Exception { readOptions(args); readDaemons(); if (outputFileName == null) instantiateTemplate(System.out); else instantiateTemplate(new PrintStream(new FileOutputStream(outputFileName))); } /** Read the description of the daemons from a file. The format of * this file is : * <logicalName> <hostname> <sfHome directory> * .... * The first entry is assumed to be the principalDaemon if * dynamicLoadingOn is true. * */ void readDaemons() throws Exception { allDaemons = new Vector(); Reader r = new BufferedReader(new FileReader(hostsFileName)); StreamTokenizer st = new StreamTokenizer(r); // st.resetSyntax(); st.eolIsSignificant(false); // Allow single line coments in the input st.slashSlashComments(true); st.wordChars('A', 'Z'); st.wordChars('a', 'z'); st.wordChars('/','/'); // st.wordChars('0', '9'); st.wordChars('-','-'); st.wordChars('.','.'); st.wordChars(':',':'); st.wordChars('\\','\\'); st.whitespaceChars(' ',' '); String tempLogicalName=null; String tempHostName=null; String tempSFHome=null; String tempOS = null; // First is the principal host. tempLogicalName = getWord(st); tempHostName = getWord(st); tempSFHome = getWord(st); tempOS = getWord(st); if (tempOS.equals(Daemon.WINDOWS)) { throw new IllegalArgumentException("Principal host can only be "+ "linux not " + tempOS); } // if dynamicLoadingOn we mark as special the first daemon. principalDaemon = new Daemon(tempLogicalName,tempHostName, tempSFHome,tempOS,dynamicLoadingOn); allDaemons.add(principalDaemon); numberDaemons++; while ((tempLogicalName =getWord(st))!=null) { tempHostName = getWord(st); tempSFHome = getWord(st); tempOS = getWord(st); allDaemons.add(new Daemon(tempLogicalName,tempHostName, tempSFHome,tempOS,false)); numberDaemons++; } } /** Gets the next tokenized word from a stream. * * * @param st An input StreamTokenizer. * @return A word just read from the input. */ String getWord(StreamTokenizer st) throws Exception { int token = st.nextToken(); if (token == StreamTokenizer.TT_WORD) return st.sval; else return null; } /**Instantiates the velocity template. * * @param out Output stream to dump the template. * @exception Exception Error while instantiating the template. */ void instantiateTemplate(PrintStream out) throws Exception { Velocity.init(); VelocityContext context = new VelocityContext(); context.put("allDaemons", allDaemons); context.put("principalDaemon",principalDaemon); context.put("dynamicLoadingOn",new Boolean(dynamicLoadingOn)); context.put("securityOn",new Boolean(securityOn)); context.put("numberDaemons", new Integer(numberDaemons)); template = Velocity.getTemplate(templateFileName); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out)); if (template != null) template.merge(context, writer); writer.flush(); writer.close(); } /** Scans command line options. * * * @param args The input command line. */ void readOptions(String[] args) { String errorString=null; int i; for (i=0;i<args.length & errorString == null;) { try { if (args[i].charAt(0) == optionFlagIndicator) { switch (args[i].charAt(1)) { case '?': errorString = "SFSystem help"; break; case 't': templateFileName = args[++i]; break; case 'h': hostsFileName = args[++i]; break; case 'o': outputFileName = args[++i]; break; case 'd': dynamicLoadingOn=true; break; case 's': securityOn=true; break; default: errorString = "unknown option " + args[i].charAt(1); } } else { errorString = "illegal option format for option " + args[i]; } i++; } catch (Exception e) { errorString = "illegal format for options "; } } if (errorString != null) { errorString += usage; throw new IllegalArgumentException(errorString); } } static public void main(String[] args) { try { TemplateGen result = new TemplateGen(args); //result.dump(System.out); } catch (Exception e) { System.out.println(e.getMessage()); } } } --- NEW FILE: templateDLSerrano.sf --- #include "org/smartfrog/components.sf" #include "org/smartfrog/sfcore/workflow/components.sf" #include "org/smartfrog/services/runcmd/components.sf" #include "org/smartfrog/tools/testharness/components.sf" #include "org/smartfrog/services/trace/components.sf" TestRunCommand extends RunCommand { startCmd ATTRIB command; shouldTerminate "true"; workDir ATTRIB workingDirectory; envProperties ATTRIB allEnvProperties; outputStream LAZY ATTRIB globalOutput; logLevel 5; } MonitoredDaemon extends Compound { daemonOutput extends NotifyOutputFilterPrim { scheduler LAZY ATTRIB globalScheduler; processId ATTRIB daemonName; fileNameOutput ATTRIB daemonFileOutput; } doStartDaemon extends TestRunCommand { //RunCommand processName ATTRIB daemonName; startAtt_01 "-cp"; startAtt_02 ATTRIB classPath; startAtt_03a "-Dorg.smartfrog.sfcore.processcompound.sfRootLocatorPort="; startAtt_03b ATTRIB port; startAtt_04a "";// startAtt_04a "-Dorg.smartfrog.iniFile="; startAtt_04b ""; //startAtt_04b ATTRIB iniFile; startAtt_05a ""; //-Dorg.smartfrog.sfcore.iniSFFile="; startAtt_05b ""; // ATTRIB iniSFFile; startAtt_06a "-Dorg.smartfrog.sfcore.processcompound.sfProcessName="; startAtt_06b "rootProcess"; startAtt_10a "-Dorg.smartfrog.sfcore.codebase="; startAtt_10b ATTRIB httpCodebase; startAtt_12a ""; startAtt_12b ""; startAtt_14a ""; startAtt_14b ""; startAtt_20 "org.smartfrog.SFSystem"; startAtt_21 ""; startAtt_22 ""; startAtt_31 ""; outputStream LAZY ATTRIB daemonOutput; } } PrincipalMonitoredDaemon extends MonitoredDaemon { // doStartDaemon:startAtt_12a "-Dorg.smartfrog.iniSFFile="; // doStartDaemon:startAtt_12b "org/smartfrog/SFDynaServer/dynadaemon.sf"; //tocheck doStartDaemon:startAtt_21 "-c"; doStartDaemon:startAtt_22 "org/smartfrog/services/codeserver/dynadaemon.sf"; //tocheck doStartDaemon:startAtt_14a "-DDSHOMEBASE="; doStartDaemon:startAtt_14b "/home/sf/shared/testharness/daemons/demo-linux-50/core/smartfrog/distlib/"; } Scheduler extends SchedulerCompound { // bind global variables. numberOfAcks ATTRIB numDaemons; globalOutput extends NotifyOutputFilterPrim { processId ATTRIB globalProcess; fileNameOutput ATTRIB globalFileOutput; } // mainOutput extends NotifyOutputFilterPrim { // fileNameOutput "main.out"; //} main extends Sequence { actions extends LAZY { // Just wait until daemons ready waitForDaemons extends SynchCompound { terminateTag "waitForDaemons"; reallyDoNothing extends DoNothing { time 0; } } // Do the sfStarts. startApps extends SynchCompound { terminateTag "startApps"; doStartApps extends TestRunCommand { processName "startApps"; startAtt_01 "-cp"; startAtt_02 ATTRIB classPath; startAtt_03a "-Dorg.smartfrog.sfcore.processcompound.sfRootLocatorPort="; startAtt_03b ATTRIB port; startAtt_10a "-Dorg.smartfrog.... [truncated message content] |