mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-02 18:11:04 +08:00
See https://docs.python.org/3/library/os.html#os.name Fixed: 1411728 Change-Id: I57498dace944d655cfd6cc1f4423dfc8cfd415e3 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4217072 Reviewed-by: Simon Zünd <szuend@chromium.org> Reviewed-by: Philip Pfaffe <pfaffe@chromium.org> Auto-Submit: Alex Rudenko <alexrudenko@chromium.org> Reviewed-by: Wolfgang Beyer <wolfi@chromium.org> Commit-Queue: Simon Zünd <szuend@chromium.org>
30 lines
829 B
Python
30 lines
829 B
Python
#!/usr/bin/env vpython3
|
|
#
|
|
# Copyright 2019 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.
|
|
"""
|
|
Run unit tests on a pinned version of chrome after automatically compiling the required files
|
|
"""
|
|
|
|
import argparse
|
|
import subprocess
|
|
import sys
|
|
import os
|
|
from os import path
|
|
|
|
ROOT_DIRECTORY = path.join(path.dirname(path.abspath(__file__)), '..', '..')
|
|
|
|
|
|
def recompile(ninja_build_name, ninja_target_name):
|
|
ninja_proc = subprocess.Popen([
|
|
'autoninja.bat' if os.name == 'nt' else 'autoninja', '-C',
|
|
'out/{}'.format(ninja_build_name), ninja_target_name
|
|
],
|
|
cwd=ROOT_DIRECTORY)
|
|
|
|
ninja_proc.communicate()
|
|
|
|
if ninja_proc.returncode != 0:
|
|
sys.exit(ninja_proc.returncode)
|