android_webview
apps
ash
base
build
build_overrides
buildtools
cc
chrome
chromecast
chromeos
clank
codelabs
components
content
courgette
crypto
dbus
device
docs
extensions
fuchsia_web
gin
google_apis
google_update
gpu
headless
infra
internal
ios
ios_internal
ipc
media
mojo
native_client
native_client_sdk
net
pdf
ppapi
printing
remoting
rlz
sandbox
services
signing_keys
skia
sql
storage
styleguide
testing
android
buildbot
chromoting
clusterfuzz
data_driven_testing
flake_suppressor_common
gmock
gtest
gtest_ios
iossim
libfuzzer
merge_scripts
perf
pytype_common
rust_gtest_interop
scripts
trigger_scripts
unexpected_passes_common
variations
BUILD.gn
DIR_METADATA
OWNERS
PRESUBMIT.py
__init__.py
coverage_util_ios.h
coverage_util_ios.mm
empty_main.cc
generate_location_tags.py
gtest_mac.h
gtest_mac.mm
gtest_mac_unittest.mm
multiprocess_func_list.cc
multiprocess_func_list.h
platform_test.h
platform_test_mac.mm
run_pytype.py
run_with_dummy_home.py
test.gni
test_env.py
test_env_test_script.py
test_env_unittest.py
test_env_user_script.py
xvfb.py
xvfb_test_script.py
xvfb_unittest.py
third_party
tools
ui
url
v8
webkit
.clang-format
.clang-tidy
.clangd
.eslintrc.js
.git-blame-ignore-revs
.gitallowed
.gitattributes
.gitignore
.gitmodules
.gn
.mailmap
.rustfmt.toml
.vpython3
.yapfignore
ATL_OWNERS
AUTHORS
BUILD.gn
CODE_OF_CONDUCT.md
DEPS
DIR_METADATA
LICENSE
LICENSE.chromium_os
OWNERS
PRESUBMIT.py
PRESUBMIT_test.py
PRESUBMIT_test_mocks.py
README.md
WATCHLISTS
codereview.settings

The methodology used to generate this CL is documented in https://crbug.com/1098010#c95. No-Try: true No-Presubmit: true Bug: 1098010 Change-Id: I3a8a7b150e7bd64690534727150646081df50439 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3900697 Reviewed-by: Mark Mentovai <mark@chromium.org> Auto-Submit: Avi Drissman <avi@chromium.org> Owners-Override: Avi Drissman <avi@chromium.org> Commit-Queue: Avi Drissman <avi@chromium.org> Cr-Commit-Position: refs/heads/main@{#1047644}
24 lines
634 B
Python
Executable File
24 lines
634 B
Python
Executable File
#!/usr/bin/env python
|
|
# Copyright 2019 The Chromium Authors
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
"""Script for use in test_env unittests."""
|
|
|
|
from __future__ import print_function
|
|
import signal
|
|
import sys
|
|
import time
|
|
|
|
|
|
def print_signal(sig, *_args):
|
|
print('Signal :{}'.format(sig))
|
|
|
|
|
|
if __name__ == '__main__':
|
|
signal.signal(signal.SIGTERM, print_signal)
|
|
signal.signal(signal.SIGINT, print_signal)
|
|
if sys.platform == 'win32':
|
|
signal.signal(signal.SIGBREAK, print_signal) # pylint: disable=no-member
|
|
time.sleep(2) # gives process time to receive signal.
|