Sha256: 2da01fb63913ffb14874b54d1349ad94591ae5da246da1a1ab9a21b124d13009

Contents?: true

Size: 666 Bytes

Versions: 9

Compression:

Stored size: 666 Bytes

Contents

# Copyright 2016 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""Writes a dictionary to a json file with the passed key-value pairs.

Expected to be called like:
dump_build_config.py path/to/file.json [key1=value1 ...]

The values are expected to be valid json. E.g. true is a boolean and "true" is
the string "true".
"""

import json
import os
import sys

assert len(sys.argv) > 1

def as_json(kv):
  assert '=' in kv
  k, v = kv.split('=', 1)
  return k, json.loads(v)

with open(sys.argv[1], 'w') as f:
  json.dump(dict(as_json(kv) for kv in sys.argv[2:]), f)

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
libv8-6.0.286.54.1 vendor/v8/tools/testrunner/utils/dump_build_config.py
libv8-6.0.286.54.0 vendor/v8/tools/testrunner/utils/dump_build_config.py
libv8-6.0.286.54.0beta2 vendor/v8/tools/testrunner/utils/dump_build_config.py
libv8-6.0.286.54.0beta1 vendor/v8/tools/testrunner/utils/dump_build_config.py
libv8-6.0.286.44.0beta1 vendor/v8/tools/testrunner/utils/dump_build_config.py
node-compiler-0.9.1 vendor/node/deps/v8/tools/testrunner/utils/dump_build_config.py
node-compiler-0.9.0 vendor/node-v7.2.1/deps/v8/tools/testrunner/utils/dump_build_config.py
node-compiler-0.8.0 vendor/node-v7.2.0/deps/v8/tools/testrunner/utils/dump_build_config.py
node-compiler-0.7.0 vendor/node-v7.1.0/deps/v8/tools/testrunner/utils/dump_build_config.py