Commit 0837bf75 by Takuto Ikuta Committed by Commit Bot

use go isolate client in trigger.py

python client is being deprecated. I will switch swarming client later. Tested by ~/chromium/src$ python third_party/angle/scripts/trigger.py -p chromium.tests out/Release base_unittests Ubuntu none Bug: chromium:1047115 Change-Id: Ibad2bf5ab80b09aadfcd0431fea8c5e97d38655d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2095035Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent c2d81731
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
# Helper script for triggering GPU tests on swarming. # Helper script for triggering GPU tests on swarming.
import argparse import argparse
import hashlib
import os import os
import subprocess import subprocess
import sys import sys
...@@ -74,16 +75,17 @@ def main(): ...@@ -74,16 +75,17 @@ def main():
mb_script_path = os.path.join('tools', 'mb', 'mb.py') mb_script_path = os.path.join('tools', 'mb', 'mb.py')
subprocess.call(['python', mb_script_path, 'isolate', out_gn_path, args.test]) subprocess.call(['python', mb_script_path, 'isolate', out_gn_path, args.test])
isolate_script_path = os.path.join('tools', 'swarming_client', 'isolate.py') isolate_cmd_path = os.path.join('tools', 'luci-go', 'isolate')
isolate_file = os.path.join(out_file_path, '%s.isolate' % args.test) isolate_file = os.path.join(out_file_path, '%s.isolate' % args.test)
isolated_file = os.path.join(out_file_path, '%s.isolated' % args.test) isolated_file = os.path.join(out_file_path, '%s.isolated' % args.test)
isolate_args = [ isolate_args = [
'python', isolate_script_path, 'archive', '-I', 'https://isolateserver.appspot.com', '-i', isolate_cmd_path, 'archive', '-I', 'https://isolateserver.appspot.com', '-i', isolate_file,
isolate_file, '-s', isolated_file '-s', isolated_file
] ]
stdout = subprocess.check_output(isolate_args) subprocess.check_call(isolate_args)
sha = stdout[:40] with open(isolated_file, 'rb') as f:
sha = hashlib.sha1(f.read()).hexdigest()
print('Got an isolated SHA of %s' % sha) print('Got an isolated SHA of %s' % sha)
swarming_script_path = os.path.join('tools', 'swarming_client', 'swarming.py') swarming_script_path = os.path.join('tools', 'swarming_client', 'swarming.py')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment