summaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/compute/ramspeed.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/benchmark/scenarios/compute/ramspeed.py')
-rw-r--r--yardstick/benchmark/scenarios/compute/ramspeed.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/yardstick/benchmark/scenarios/compute/ramspeed.py b/yardstick/benchmark/scenarios/compute/ramspeed.py
index 819ef769b..db70af90b 100644
--- a/yardstick/benchmark/scenarios/compute/ramspeed.py
+++ b/yardstick/benchmark/scenarios/compute/ramspeed.py
@@ -87,18 +87,20 @@ class Ramspeed(base.Scenario):
host = self.context_cfg["host"]
user = host.get("user", "ubuntu")
+ ssh_port = host.get("ssh_port", ssh.DEFAULT_PORT)
ip = host.get("ip", None)
key_filename = host.get('key_filename', "~/.ssh/id_rsa")
LOG.info("user:%s, host:%s", user, ip)
- self.client = ssh.SSH(user, ip, key_filename=key_filename)
+ self.client = ssh.SSH(user, ip, key_filename=key_filename,
+ port=ssh_port)
self.client.wait(timeout=600)
# copy scripts to host
- self.client.run("cat > ~/ramspeed_mark_benchmark.sh",
- stdin=open(self.mark_target_script, 'rb'))
- self.client.run("cat > ~/ramspeed_mem_benchmark.sh",
- stdin=open(self.mem_target_script, 'rb'))
+ self.client._put_file_shell(
+ self.mark_target_script, '~/ramspeed_mark_benchmark.sh')
+ self.client._put_file_shell(
+ self.mem_target_script, '~/ramspeed_mem_benchmark.sh')
self.setup_done = True
def run(self, result):