⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 285875 in webkit


Ignore:
Timestamp:
Nov 16, 2021, 11:31:42 AM (5 years ago)
Author:
zhifei_fang@apple.com
Message:

Make run-javascript-core-test and run-jsc-stress-tests support a customized identity file
https://bugs.webkit.org/show_bug.cgi?id=232453

Reviewed by Ryan Haddad.

  • Scripts/run-javascriptcore-tests: Add idFilePath field for remote config.
  • Scripts/run-jsc-stress-tests: Add idFilePath field for remote config.
  • Scripts/webkitdirs.pm:

(determineNativeArchitecture): Provide -i option to ssh

Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r285873 r285875  
     12021-11-16  Zhifei Fang  <zhifei_fang@apple.com>
     2
     3        Make run-javascript-core-test and run-jsc-stress-tests support a customized identity file
     4        https://bugs.webkit.org/show_bug.cgi?id=232453
     5
     6        Reviewed by Ryan Haddad.
     7
     8        * Scripts/run-javascriptcore-tests: Add idFilePath field for remote config.
     9        * Scripts/run-jsc-stress-tests: Add idFilePath field for remote config.
     10        * Scripts/webkitdirs.pm:
     11        (determineNativeArchitecture): Provide -i option to ssh
     12
    1132021-11-16  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/Tools/Scripts/run-javascriptcore-tests

    r279394 r285875  
    525525    } elsif (defined $remoteConfig->{"remote"}) {
    526526        my @split = split(':', $remoteConfig->{"remote"});
    527         $remotes = [
    528             {
    529                 "name" => "synthesized",
    530                 "address" => $remoteConfig->{"remote"}
    531             }
    532          ];
     527        my $remote = {
     528            "name" => "synthesized",
     529            "address" => $remoteConfig->{"remote"}
     530        };
     531        if (exists $remoteConfig->{"idFilePath"}) {
     532            $remote->{'idFilePath'} = $remoteConfig->{'idFilePath'};
     533        }
     534        $remotes = [$remote];
    533535    }
    534536}
  • trunk/Tools/Scripts/run-jsc-stress-tests

    r285522 r285875  
    5252}
    5353
    54 RemoteHost = Struct.new(:name, :user, :host, :port, :remoteDirectory)
     54RemoteHost = Struct.new(:name, :user, :host, :port, :remoteDirectory, :identity_file_path)
    5555
    5656THIS_SCRIPT_PATH = Pathname.new(__FILE__).realpath
     
    326326            $remoteHosts[0].remoteDirectory = config['remoteDirectory']
    327327        end
     328        if config['idFilePath']
     329            $remoteHosts[0].identity_file_path = config['idFilePath']
     330        end
    328331    end
    329332
     
    340343            if remote['remoteDirectory']
    341344                host.remoteDirectory = remote['remoteDirectory']
     345            end
     346            if remote['idFilePath']
     347                host.identity_file_path = remote['idFilePath']
     348                print('Using identity file: ' + host.identity_file_path + "\r")
    342349            end
    343350            host
     
    21192126
    21202127    result = ""
    2121     IO.popen("ssh -o NoHostAuthenticationForLocalhost=yes -p #{remoteHost.port} #{remoteHost.user}@#{remoteHost.host} '#{cmd}'", "r") {
     2128    IO.popen("ssh -o NoHostAuthenticationForLocalhost=yes -p #{remoteHost.port}" + (remoteHost.identity_file_path ? " -i #{remoteHost.identity_file_path}" : "") + " #{remoteHost.user}@#{remoteHost.host} '#{cmd}'", "r") {
    21222129      | inp |
    21232130      inp.each_line {
     
    22572264
    22582265def copyBundleToRemote(remoteHost)
    2259     mysys(["ssh", "-o", "NoHostAuthenticationForLocalhost=yes", "-p", remoteHost.port.to_s, "#{remoteHost.user}@#{remoteHost.host}", "mkdir -p #{remoteHost.remoteDirectory}"])
    2260     mysys(["scp", "-o", "NoHostAuthenticationForLocalhost=yes", "-P", remoteHost.port.to_s, ($outputDir.dirname + $tarFileName).to_s, "#{remoteHost.user}@#{remoteHost.host}:#{remoteHost.remoteDirectory}"])
     2266    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}"])
     2267    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}"])
    22612268end
    22622269
     
    22922299        $envVars.each { |var| remoteScript += "export " << var << "\n" }
    22932300        remoteScript += "#{testRunnerCommand(remoteIndex)}\""
    2294         runAndMonitorTestRunnerCommand(["ssh", "-o", "NoHostAuthenticationForLocalhost=yes", "-p", remoteHost.port.to_s, "#{remoteHost.user}@#{remoteHost.host}", remoteScript])
     2301        runAndMonitorTestRunnerCommand(["ssh", "-o", "NoHostAuthenticationForLocalhost=yes"] + (remoteHost.identity_file_path ? ["-i", remoteHost.identity_file_path] : []) + ["-p", remoteHost.port.to_s, "#{remoteHost.user}@#{remoteHost.host}", remoteScript])
    22952302    else
    22962303        Dir.chdir($runnerDir) {
     
    26672674    forEachRemote(remoteHosts, :dropOnFailure => true) {
    26682675        | _, remoteHost |
    2669         mysys(["ssh", "-o", "NoHostAuthenticationForLocalhost=yes",
    2670                "-p", remoteHost.port.to_s,
     2676        mysys(["ssh", "-o", "NoHostAuthenticationForLocalhost=yes"] +
     2677               (remoteHost.identity_file_path ? ["-i", remoteHost.identity_file_path] : []) +
     2678               ["-p", remoteHost.port.to_s,
    26712679               "#{remoteHost.user}@#{remoteHost.host}",
    26722680               "cd #{Shellwords.shellescape(remoteHost.remoteDirectory)} && rm -rf #{$outputDir.basename} && tar xzf #{$tarFileName}"])
  • trunk/Tools/Scripts/webkitdirs.pm

    r284922 r285875  
    374374            my $port = 22;
    375375            $port = $split[1] if scalar(@split) > 1;
    376             $output = `ssh -o NoHostAuthenticationForLocalhost=yes -p $port $target 'uname  -m'`;
     376            my $cmd = 'ssh -o NoHostAuthenticationForLocalhost=yes '. (exists $remote->{'idFilePath'} ? ('-i '.$remote->{'idFilePath'}) : '') ." -p $port $target 'uname  -m'";
     377            $output = readpipe($cmd);
    377378            last if ($? == 0);
    378379        }
Note: See TracChangeset for help on using the changeset viewer.