+++ /dev/null
-ifdef PLCHOST
-ifdef VSERVER
-PLCSSH:=root@$(PLCHOST):/vservers/$(VSERVER)
-endif
-endif
-
-LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc'
-RSYNC_EXCLUDES := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
-RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
-RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
-
-sync:
-ifeq (,$(PLCSSH))
- echo "sync: You must define PLCHOST and VSERVER on the command line"
- echo " e.g. make sync PLCHOST=private.one-lab.org VSERVER=myplc01" ; exit 1
-else
- +$(RSYNC) Test.py $(PLCSSH)/usr/share/plc_api/
-endif
'init_node','bootcd', 'configure_qemu', 'export_qemu',
'kill_all_qemus', 'reinstall_node','start_node', SEP,
'nodes_booted', 'nodes_ssh', 'check_slice',
- 'check_initscripts', 'check_tcp',SEP,
+ 'check_initscripts', 'check_tcp', 'plcsh_stress_test', SEP,
'force_gather_logs', 'force_kill_qemus', 'force_record_tracker','force_free_tracker' ]
other_steps = [ 'stop_all_vservers','fresh_install', 'cache_rpm', 'stop', 'vs_start', SEP,
'clean_initscripts', 'clean_all_sites',
tag_types = self.apiserver.GetNodeTagTypes(auth,{'tagname':nodegroupname})
if tag_types:
tag_type_id = tag_types[0]['node_tag_type_id']
- print 'node-tag-type',nodegroupname,'already exists'
else:
tag_type_id = self.apiserver.AddNodeTagType(auth,
{'tagname':nodegroupname,
'min_role_id':10})
# create nodegroup
nodegroups = self.apiserver.GetNodeGroups (auth, {'groupname':nodegroupname})
- if nodegroups:
- print 'nodegroup',nodegroupname,'already exists'
- else:
+ if not nodegroups:
self.apiserver.AddNodeGroup(auth, nodegroupname, tag_type_id, 'yes')
# set node tag on all nodes, value='yes'
overall = True
print 'Mismatch node tag on node',nodename,'got',expect_yes
overall=False
except:
- print 'Cannot find tag',nodegroupname,'on node',nodename
- overall = False
+ if not self.options.dry_run:
+ print 'Cannot find tag',nodegroupname,'on node',nodename
+ overall = False
return overall
def all_hostnames (self) :
if not c_test_sliver.run_tcp_client(s_test_sliver.test_node.name(),port):
overall=False
return overall
-
+
+ def plcsh_stress_test (self):
+ # install the stress-test in the plc image
+ location = "/usr/share/plc_api/plcsh-stress-test.py"
+ remote="/vservers/%s/%s"%(self.vservername,location)
+ self.test_ssh.copy_abs("plcsh-stress-test.py",remote)
+ if self.options.small_test:
+ command=location + " -- --tiny"
+ else:
+ command=location
+ return ( self.run_in_guest(command) == 0)
def gather_logs (self):
# (1) get the plc's /var/log and store it locally in logs/myplc.var-log.<plcname>/*
self.buildname,os.path.basename(local_file) or ".")
return utils.system(scp_command)
+ def copy_abs (self,local_file,remote_file,recursive=False):
+ if self.is_local():
+ dest=""
+ else:
+ dest= "%s:"%self.hostname_part()
+ scp_command="scp "
+ scp_command += TestSsh.std_options
+ if recursive: scp_command += "-r "
+ scp_command += self.key_part()
+ scp_command += "%s %s%s"%(local_file,dest,remote_file)
+ return utils.system(scp_command)
+
def fetch (self, remote_file, local_file, recursive=False):
if self.is_local():
command="cp "