Modified: trunk/Tools/Scripts/run-jsc-stress-tests (285874 => 285875)
--- trunk/Tools/Scripts/run-jsc-stress-tests 2021-11-16 19:26:36 UTC (rev 285874)
+++ trunk/Tools/Scripts/run-jsc-stress-tests 2021-11-16 19:31:42 UTC (rev 285875)
@@ -51,7 +51,7 @@
puts(Thread.current.backtrace)
}
-RemoteHost = Struct.new(:name, :user, :host, :port, :remoteDirectory)
+RemoteHost = Struct.new(:name, :user, :host, :port, :remoteDirectory, :identity_file_path)
THIS_SCRIPT_PATH = Pathname.new(__FILE__).realpath
SCRIPTS_PATH = THIS_SCRIPT_PATH.dirname
@@ -325,6 +325,9 @@
if config['remoteDirectory']
$remoteHosts[0].remoteDirectory = config['remoteDirectory']
end
+ if config['idFilePath']
+ $remoteHosts[0].identity_file_path = config['idFilePath']
+ end
end
# we can combine --remote and a new style config
@@ -340,6 +343,10 @@
if remote['remoteDirectory']
host.remoteDirectory = remote['remoteDirectory']
end
+ if remote['idFilePath']
+ host.identity_file_path = remote['idFilePath']
+ print('Using identity file: ' + host.identity_file_path + "\r")
+ end
host
}
end
@@ -2118,7 +2125,7 @@
raise unless $remote
result = ""
- IO.popen("ssh -o NoHostAuthenticationForLocalhost=yes -p #{remoteHost.port} #{remoteHost.user}@#{remoteHost.host} '#{cmd}'", "r") {
+ IO.popen("ssh -o NoHostAuthenticationForLocalhost=yes -p #{remoteHost.port}" + (remoteHost.identity_file_path ? " -i #{remoteHost.identity_file_path}" : "") + " #{remoteHost.user}@#{remoteHost.host} '#{cmd}'", "r") {
| inp |
inp.each_line {
| line |
@@ -2256,8 +2263,8 @@
end
def copyBundleToRemote(remoteHost)
- mysys(["ssh", "-o", "NoHostAuthenticationForLocalhost=yes", "-p", remoteHost.port.to_s, "#{remoteHost.user}@#{remoteHost.host}", "mkdir -p #{remoteHost.remoteDirectory}"])
- mysys(["scp", "-o", "NoHostAuthenticationForLocalhost=yes", "-P", remoteHost.port.to_s, ($outputDir.dirname + $tarFileName).to_s, "#{remoteHost.user}@#{remoteHost.host}:#{remoteHost.remoteDirectory}"])
+ mysys(["ssh", "-o", "NoHostAuthenticationForLocalhost=yes"] + (remoteHost.identity_file_path ? ["-i", remoteHost.identity_file_path] : []) + ["-p", remoteHost.port.to_s, "#{remoteHost.user}@#{remoteHost.host}", "mkdir -p #{remoteHost.remoteDirectory}"])
+ mysys(["scp", "-o", "NoHostAuthenticationForLocalhost=yes"] + (remoteHost.identity_file_path ? ["-i", remoteHost.identity_file_path] : []) + ["-P", remoteHost.port.to_s, ($outputDir.dirname + $tarFileName).to_s, "#{remoteHost.user}@#{remoteHost.host}:#{remoteHost.remoteDirectory}"])
end
def exportBaseEnvironmentVariables(escape)
@@ -2291,7 +2298,7 @@
remoteScript += exportBaseEnvironmentVariables(true)
$envVars.each { |var| remoteScript += "export " << var << "\n" }
remoteScript += "#{testRunnerCommand(remoteIndex)}\""
- runAndMonitorTestRunnerCommand(["ssh", "-o", "NoHostAuthenticationForLocalhost=yes", "-p", remoteHost.port.to_s, "#{remoteHost.user}@#{remoteHost.host}", remoteScript])
+ runAndMonitorTestRunnerCommand(["ssh", "-o", "NoHostAuthenticationForLocalhost=yes"] + (remoteHost.identity_file_path ? ["-i", remoteHost.identity_file_path] : []) + ["-p", remoteHost.port.to_s, "#{remoteHost.user}@#{remoteHost.host}", remoteScript])
else
Dir.chdir($runnerDir) {
runAndMonitorTestRunnerCommand(Shellwords.shellsplit(testRunnerCommand))
@@ -2666,8 +2673,9 @@
def unpackBundleGnuParallel(remoteHosts)
forEachRemote(remoteHosts, :dropOnFailure => true) {
| _, remoteHost |
- mysys(["ssh", "-o", "NoHostAuthenticationForLocalhost=yes",
- "-p", remoteHost.port.to_s,
+ mysys(["ssh", "-o", "NoHostAuthenticationForLocalhost=yes"] +
+ (remoteHost.identity_file_path ? ["-i", remoteHost.identity_file_path] : []) +
+ ["-p", remoteHost.port.to_s,
"#{remoteHost.user}@#{remoteHost.host}",
"cd #{Shellwords.shellescape(remoteHost.remoteDirectory)} && rm -rf #{$outputDir.basename} && tar xzf #{$tarFileName}"])
}