<commit_before>#!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import json
import os
import sys


import common


def main_run(args):
  filter_tests = []
  if args.filter_file:
    filter_tests = json.load(args.filter_file)

  with common.temporary_file() as tempfile_path:
    rc = common.run_command([
        sys.executable,
        os.path.join(args.paths['build'], 'scripts', 'tools', 'runit.py'),
        '--show-path',
        os.path.join(args.paths['build'], 'scripts', 'slave', 'runtest.py'),
        '--target', args.build_config_fs,
        '--xvfb',
        '--annotate', 'gtest',
        '--test-type', 'telemetry_unittests',
        '--builder-name', args.properties['buildername'],
        '--slave-name', args.properties['slavename'],
        '--build-number', str(args.properties['buildnumber']),
        '--run-python-script',
        os.path.join(common.SRC_DIR, 'tools', 'telemetry', 'run_tests'),
        '--browser', args.build_config_fs.lower(),
        '--retry-limit', '3',
        '--write-full-results-to', tempfile_path,
    ] + filter_tests)<commit_msg>Revert of Make telemetry_unittests.py work on Windows (patchset #1 id:1 of https://codereview.chromium.org/647103003/)<commit_after>#!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import json
import os
import sys


import common


def main_run(args):
  filter_tests = []
  if args.filter_file:
    filter_tests = json.load(args.filter_file)

  with common.temporary_file() as tempfile_path:
    rc = common.run_command([
        os.path.join(args.paths['build'], 'scripts', 'tools', 'runit.py'),
        '--show-path',
        os.path.join(args.paths['build'], 'scripts', 'slave', 'runtest.py'),
        '--target', args.build_config_fs,
        '--xvfb',
        '--annotate', 'gtest',
        '--test-type', 'telemetry_unittests',
        '--builder-name', args.properties['buildername'],
        '--slave-name', args.properties['slavename'],
        '--build-number', str(args.properties['buildnumber']),
        '--run-python-script',
        os.path.join(common.SRC_DIR, 'tools', 'telemetry', 'run_tests'),
        '--browser', args.build_config_fs.lower(),
        '--retry-limit', '3',
        '--write-full-results-to', tempfile_path,
    ] + filter_tests)
{'fraction_non_alphanumeric': 0.16580721935739787, 'fraction_numerical': 0.008330027766759222, 'mean_word_length': 3.009538950715421, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3418140', 'n_tokens_mistral': 836, 'n_tokens_neox': 812, 'n_words': 179}