Bug 1491104 - followup: fix for lint. r=me CLOSED TREE
authorTooru Fujisawa <arai_a@mac.com>
Thu, 04 Oct 2018 21:54:37 +0900
changeset 495401 52f118be7c585e6b4012f42463977fdd220a5eb6
parent 495400 cafd172dc48a1d45bedad15185c720f0103bfec3
child 495402 d6a5ee779a0d19bd4e7157c303f02deffa3472ca
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1491104
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1491104 - followup: fix for lint. r=me CLOSED TREE
js/src/jsapi-tests/binast/encode.py
--- a/js/src/jsapi-tests/binast/encode.py
+++ b/js/src/jsapi-tests/binast/encode.py
@@ -11,57 +11,63 @@ parser = OptionParser()
 parser.add_option('--topsrcdir', dest='topsrcdir',
                   help='path to mozilla-central')
 parser.add_option('--binjsdir', dest='binjsdir',
                   help='cwd when running binjs_encode')
 parser.add_option('--binjs_encode', dest='binjs_encode',
                   help='path to binjs_encode commad')
 (options, args) = parser.parse_args()
 
+
 def ensure_dir(path, name):
     if not os.path.isdir(path):
         print('{} directory {} does not exit'.format(name, path),
               file=sys.stderr)
         sys.exit(1)
 
+
 def ensure_file(path, name):
     if not os.path.isfile(path):
         print('{} {} does not exit'.format(name, path),
               file=sys.stderr)
         sys.exit(1)
 
+
 ensure_dir(options.topsrcdir, 'topsrcdir')
 ensure_dir(options.binjsdir, 'binjsdir')
 ensure_file(options.binjs_encode, 'binjs_encode command')
 
+
 def encode(infile_path, outfile_path, binjs_encode_args=[]):
     print(infile_path)
 
     infile = open(infile_path)
     outfile = open(outfile_path, 'w')
 
     binjs_encode = subprocess.Popen([options.binjs_encode] + binjs_encode_args,
                                     cwd=options.binjsdir,
                                     stdin=infile, stdout=outfile)
 
     if binjs_encode.wait() != 0:
         print('binjs_encode failed',
               file=sys.stderr)
         sys.exit(1)
 
+
 def encode_inplace(dir, *args, **kwargs):
     js_pat = re.compile('\.js$')
     for root, dirs, files in os.walk(dir):
         for filename in files:
             if filename.endswith('.js'):
                 binjsfilename = js_pat.sub('.binjs', filename)
                 infile_path = os.path.join(root, filename)
                 outfile_path = os.path.join(root, binjsfilename)
                 encode(infile_path, outfile_path, *args, **kwargs)
 
+
 wpt_dir = os.path.join(options.topsrcdir, 'testing', 'web-platform')
 ensure_dir(wpt_dir, 'wpt')
 
 wpt_binast_dir = os.path.join(wpt_dir, 'mozilla', 'tests', 'binast')
 ensure_dir(wpt_binast_dir, 'binast in wpt')
 
 encode(os.path.join(wpt_binast_dir, 'large-binjs.js'),
        os.path.join(wpt_binast_dir, 'large.binjs'))