diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/decorators.py | 6 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lldbtest.py | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py index 0e8ca15..834f01a 100644 --- a/lldb/packages/Python/lldbsuite/test/decorators.py +++ b/lldb/packages/Python/lldbsuite/test/decorators.py @@ -467,9 +467,8 @@ def apple_simulator_test(platform): if lldbplatformutil.getHostPlatform() not in ["darwin", "macosx"]: return "simulator tests are run only on darwin hosts." try: - DEVNULL = open(os.devnull, "w") output = subprocess.check_output( - ["xcodebuild", "-showsdks"], stderr=DEVNULL + ["xcodebuild", "-showsdks"], stderr=subprocess.DEVNULL ).decode("utf-8") if re.search("%ssimulator" % platform, output): return None @@ -1094,9 +1093,8 @@ def skipUnlessFeature(feature): def is_feature_enabled(): if platform.system() == "Darwin": try: - DEVNULL = open(os.devnull, "w") output = subprocess.check_output( - ["/usr/sbin/sysctl", feature], stderr=DEVNULL + ["/usr/sbin/sysctl", feature], stderr=subprocess.DEVNULL ).decode("utf-8") # If 'feature: 1' was output, then this feature is available and # the test should not be skipped. diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index b57c3bd..e0da7cb 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -31,7 +31,6 @@ $ import abc from functools import wraps import gc -import glob import io import json import os.path @@ -416,7 +415,7 @@ class _LocalProcess(_BaseProcess): self._proc = Popen( [executable] + args, - stdout=open(os.devnull) if not self._trace_on else None, + stdout=DEVNULL if not self._trace_on else None, stdin=PIPE, env=env, ) |