2012-09-24 09:38:46 +00:00
|
|
|
# Copyright 2012 the V8 project authors. All rights reserved.
|
|
|
|
# Redistribution and use in source and binary forms, with or without
|
|
|
|
# modification, are permitted provided that the following conditions are
|
|
|
|
# met:
|
|
|
|
#
|
|
|
|
# * Redistributions of source code must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer.
|
|
|
|
# * Redistributions in binary form must reproduce the above
|
|
|
|
# copyright notice, this list of conditions and the following
|
|
|
|
# disclaimer in the documentation and/or other materials provided
|
|
|
|
# with the distribution.
|
|
|
|
# * Neither the name of Google Inc. nor the names of its
|
|
|
|
# contributors may be used to endorse or promote products derived
|
|
|
|
# from this software without specific prior written permission.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
2017-12-18 14:13:14 +00:00
|
|
|
import copy
|
2017-12-12 21:33:16 +00:00
|
|
|
import os
|
|
|
|
import re
|
|
|
|
import shlex
|
|
|
|
|
2018-01-04 10:42:49 +00:00
|
|
|
from ..outproc import base as outproc
|
2017-12-12 21:33:16 +00:00
|
|
|
from ..local import command
|
2017-12-18 14:13:14 +00:00
|
|
|
from ..local import statusfile
|
2017-12-12 21:33:16 +00:00
|
|
|
from ..local import utils
|
|
|
|
|
2017-12-13 12:47:24 +00:00
|
|
|
FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")
|
|
|
|
|
2018-08-29 13:52:04 +00:00
|
|
|
# Patterns for additional resource files on Android. Files that are not covered
|
|
|
|
# by one of the other patterns below will be specified in the resources section.
|
|
|
|
RESOURCES_PATTERN = re.compile(r"//\s+Resources:(.*)")
|
|
|
|
# Pattern to auto-detect files to push on Android for statements like:
|
|
|
|
# load("path/to/file.js")
|
|
|
|
LOAD_PATTERN = re.compile(
|
2018-10-09 08:26:20 +00:00
|
|
|
r"(?:load|readbuffer|read)\((?:'|\")([^'\"]+)(?:'|\")\)")
|
2018-08-29 13:52:04 +00:00
|
|
|
# Pattern to auto-detect files to push on Android for statements like:
|
|
|
|
# import "path/to/file.js"
|
|
|
|
MODULE_RESOURCES_PATTERN_1 = re.compile(
|
2018-10-09 08:26:20 +00:00
|
|
|
r"(?:import|export)(?:\(| )(?:'|\")([^'\"]+)(?:'|\")")
|
2018-08-29 13:52:04 +00:00
|
|
|
# Pattern to auto-detect files to push on Android for statements like:
|
|
|
|
# import foobar from "path/to/file.js"
|
|
|
|
MODULE_RESOURCES_PATTERN_2 = re.compile(
|
2018-10-09 08:26:20 +00:00
|
|
|
r"(?:import|export).*from (?:'|\")([^'\"]+)(?:'|\")")
|
2012-09-24 09:38:46 +00:00
|
|
|
|
2019-02-21 12:36:52 +00:00
|
|
|
TIMEOUT_LONG = "long"
|
|
|
|
|
2019-02-18 14:01:33 +00:00
|
|
|
try:
|
|
|
|
cmp # Python 2
|
|
|
|
except NameError:
|
|
|
|
def cmp(x, y): # Python 3
|
|
|
|
return (x > y) - (x < y)
|
|
|
|
|
2018-01-04 07:39:09 +00:00
|
|
|
|
2012-09-24 09:38:46 +00:00
|
|
|
class TestCase(object):
|
2018-01-31 09:18:13 +00:00
|
|
|
def __init__(self, suite, path, name, test_config):
|
2014-11-20 09:46:55 +00:00
|
|
|
self.suite = suite # TestSuite object
|
2017-12-12 21:33:16 +00:00
|
|
|
|
2014-11-20 09:46:55 +00:00
|
|
|
self.path = path # string, e.g. 'div-mod', 'test-api/foo'
|
2017-12-12 21:33:16 +00:00
|
|
|
self.name = name # string that identifies test in the status file
|
|
|
|
|
|
|
|
self.variant = None # name of the used testing variant
|
|
|
|
self.variant_flags = [] # list of strings, flags specific to this test
|
|
|
|
|
2018-01-05 13:34:17 +00:00
|
|
|
# Fields used by the test processors.
|
|
|
|
self.origin = None # Test that this test is subtest of.
|
|
|
|
self.processor = None # Processor that created this subtest.
|
|
|
|
self.procid = '%s/%s' % (self.suite.name, self.name) # unique id
|
2018-01-17 10:59:24 +00:00
|
|
|
self.keep_output = False # Can output of this test be dropped
|
2018-01-05 13:34:17 +00:00
|
|
|
|
2018-01-31 09:18:13 +00:00
|
|
|
# Test config contains information needed to build the command.
|
|
|
|
self._test_config = test_config
|
2018-02-01 13:40:23 +00:00
|
|
|
self._random_seed = None # Overrides test config value if not None
|
2018-01-31 09:18:13 +00:00
|
|
|
|
2018-02-01 13:40:23 +00:00
|
|
|
# Outcomes
|
2017-12-19 15:57:25 +00:00
|
|
|
self._statusfile_outcomes = None
|
2018-01-31 09:18:13 +00:00
|
|
|
self.expected_outcomes = None
|
2017-12-18 17:07:40 +00:00
|
|
|
self._statusfile_flags = None
|
2018-02-01 13:40:23 +00:00
|
|
|
|
2017-12-18 17:07:40 +00:00
|
|
|
self._prepare_outcomes()
|
2017-12-12 21:33:16 +00:00
|
|
|
|
2018-01-17 10:59:24 +00:00
|
|
|
def create_subtest(self, processor, subtest_id, variant=None, flags=None,
|
2018-01-31 09:18:13 +00:00
|
|
|
keep_output=False, random_seed=None):
|
2018-01-05 13:34:17 +00:00
|
|
|
subtest = copy.copy(self)
|
|
|
|
subtest.origin = self
|
|
|
|
subtest.processor = processor
|
|
|
|
subtest.procid += '.%s' % subtest_id
|
2018-01-22 11:51:56 +00:00
|
|
|
subtest.keep_output |= keep_output
|
2018-01-31 09:18:13 +00:00
|
|
|
if random_seed:
|
|
|
|
subtest._random_seed = random_seed
|
2018-01-19 18:00:31 +00:00
|
|
|
if flags:
|
|
|
|
subtest.variant_flags = subtest.variant_flags + flags
|
2018-01-12 10:07:56 +00:00
|
|
|
if variant is not None:
|
|
|
|
assert self.variant is None
|
|
|
|
subtest.variant = variant
|
|
|
|
subtest._prepare_outcomes()
|
2018-01-05 13:34:17 +00:00
|
|
|
return subtest
|
|
|
|
|
2017-12-18 17:07:40 +00:00
|
|
|
def _prepare_outcomes(self, force_update=True):
|
2017-12-19 15:57:25 +00:00
|
|
|
if force_update or self._statusfile_outcomes is None:
|
2017-12-18 17:07:40 +00:00
|
|
|
def is_flag(outcome):
|
|
|
|
return outcome.startswith('--')
|
|
|
|
def not_flag(outcome):
|
|
|
|
return not is_flag(outcome)
|
|
|
|
|
2017-12-19 14:32:59 +00:00
|
|
|
outcomes = self.suite.statusfile.get_outcomes(self.name, self.variant)
|
2017-12-19 15:57:25 +00:00
|
|
|
self._statusfile_outcomes = filter(not_flag, outcomes)
|
2017-12-18 17:07:40 +00:00
|
|
|
self._statusfile_flags = filter(is_flag, outcomes)
|
2017-12-18 14:13:14 +00:00
|
|
|
self.expected_outcomes = (
|
2017-12-19 15:57:25 +00:00
|
|
|
self._parse_status_file_outcomes(self._statusfile_outcomes))
|
2017-12-18 14:13:14 +00:00
|
|
|
|
|
|
|
def _parse_status_file_outcomes(self, outcomes):
|
|
|
|
if (statusfile.FAIL_SLOPPY in outcomes and
|
|
|
|
'--use-strict' not in self.variant_flags):
|
2018-01-04 07:39:09 +00:00
|
|
|
return outproc.OUTCOMES_FAIL
|
2017-12-18 14:13:14 +00:00
|
|
|
|
|
|
|
expected_outcomes = []
|
|
|
|
if (statusfile.FAIL in outcomes or
|
|
|
|
statusfile.FAIL_OK in outcomes):
|
|
|
|
expected_outcomes.append(statusfile.FAIL)
|
|
|
|
if statusfile.CRASH in outcomes:
|
|
|
|
expected_outcomes.append(statusfile.CRASH)
|
2018-01-04 07:39:09 +00:00
|
|
|
|
|
|
|
# Do not add PASS if there is nothing else. Empty outcomes are converted to
|
|
|
|
# the global [PASS].
|
|
|
|
if expected_outcomes and statusfile.PASS in outcomes:
|
2017-12-18 14:13:14 +00:00
|
|
|
expected_outcomes.append(statusfile.PASS)
|
2018-01-04 07:39:09 +00:00
|
|
|
|
|
|
|
# Avoid creating multiple instances of a list with a single FAIL.
|
|
|
|
if expected_outcomes == outproc.OUTCOMES_FAIL:
|
|
|
|
return outproc.OUTCOMES_FAIL
|
|
|
|
return expected_outcomes or outproc.OUTCOMES_PASS
|
2012-09-24 09:38:46 +00:00
|
|
|
|
2017-12-18 17:07:40 +00:00
|
|
|
@property
|
|
|
|
def do_skip(self):
|
2018-11-22 07:33:45 +00:00
|
|
|
return (statusfile.SKIP in self._statusfile_outcomes and
|
|
|
|
not self.suite.test_config.run_skipped)
|
2017-12-18 17:07:40 +00:00
|
|
|
|
|
|
|
@property
|
|
|
|
def is_slow(self):
|
2017-12-19 15:57:25 +00:00
|
|
|
return statusfile.SLOW in self._statusfile_outcomes
|
2017-12-18 17:07:40 +00:00
|
|
|
|
|
|
|
@property
|
|
|
|
def is_fail_ok(self):
|
2017-12-19 15:57:25 +00:00
|
|
|
return statusfile.FAIL_OK in self._statusfile_outcomes
|
2017-12-18 17:07:40 +00:00
|
|
|
|
|
|
|
@property
|
|
|
|
def is_pass_or_fail(self):
|
2017-12-19 15:57:25 +00:00
|
|
|
return (statusfile.PASS in self._statusfile_outcomes and
|
|
|
|
statusfile.FAIL in self._statusfile_outcomes and
|
|
|
|
statusfile.CRASH not in self._statusfile_outcomes)
|
2017-12-18 17:07:40 +00:00
|
|
|
|
|
|
|
@property
|
|
|
|
def only_standard_variant(self):
|
2017-12-19 15:57:25 +00:00
|
|
|
return statusfile.NO_VARIANTS in self._statusfile_outcomes
|
2017-12-18 17:07:40 +00:00
|
|
|
|
2018-01-31 12:01:49 +00:00
|
|
|
def get_command(self):
|
|
|
|
params = self._get_cmd_params()
|
2017-12-12 21:33:16 +00:00
|
|
|
env = self._get_cmd_env()
|
2018-08-29 13:52:04 +00:00
|
|
|
shell = self.get_shell()
|
|
|
|
if utils.IsWindows():
|
|
|
|
shell += '.exe'
|
|
|
|
shell_flags = self._get_shell_flags()
|
2018-01-31 12:01:49 +00:00
|
|
|
timeout = self._get_timeout(params)
|
|
|
|
return self._create_cmd(shell, shell_flags + params, env, timeout)
|
2015-11-27 12:51:43 +00:00
|
|
|
|
2018-01-31 12:01:49 +00:00
|
|
|
def _get_cmd_params(self):
|
2017-12-12 21:33:16 +00:00
|
|
|
"""Gets command parameters and combines them in the following order:
|
|
|
|
- files [empty by default]
|
2018-01-31 09:18:13 +00:00
|
|
|
- random seed
|
2017-12-12 21:33:16 +00:00
|
|
|
- extra flags (from command line)
|
|
|
|
- user flags (variant/fuzzer flags)
|
|
|
|
- mode flags (based on chosen mode)
|
|
|
|
- source flags (from source code) [empty by default]
|
2018-06-07 09:39:32 +00:00
|
|
|
- test-suite flags
|
|
|
|
- statusfile flags
|
2015-11-27 12:51:43 +00:00
|
|
|
|
2017-12-12 21:33:16 +00:00
|
|
|
The best way to modify how parameters are created is to only override
|
|
|
|
methods for getting partial parameters.
|
2015-11-27 12:51:43 +00:00
|
|
|
"""
|
2017-12-12 21:33:16 +00:00
|
|
|
return (
|
2018-01-31 12:01:49 +00:00
|
|
|
self._get_files_params() +
|
2018-01-31 09:18:13 +00:00
|
|
|
self._get_random_seed_flags() +
|
2018-01-31 12:01:49 +00:00
|
|
|
self._get_extra_flags() +
|
2017-12-12 21:33:16 +00:00
|
|
|
self._get_variant_flags() +
|
2018-01-31 12:01:49 +00:00
|
|
|
self._get_mode_flags() +
|
2017-12-12 21:33:16 +00:00
|
|
|
self._get_source_flags() +
|
2018-06-07 09:39:32 +00:00
|
|
|
self._get_suite_flags() +
|
|
|
|
self._get_statusfile_flags()
|
2017-12-12 21:33:16 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
def _get_cmd_env(self):
|
|
|
|
return {}
|
|
|
|
|
2018-01-31 12:01:49 +00:00
|
|
|
def _get_files_params(self):
|
2017-12-12 21:33:16 +00:00
|
|
|
return []
|
|
|
|
|
2019-02-21 12:36:52 +00:00
|
|
|
def _get_timeout_param(self):
|
|
|
|
return None
|
|
|
|
|
2018-01-31 09:18:13 +00:00
|
|
|
def _get_random_seed_flags(self):
|
|
|
|
return ['--random-seed=%d' % self.random_seed]
|
|
|
|
|
|
|
|
@property
|
|
|
|
def random_seed(self):
|
|
|
|
return self._random_seed or self._test_config.random_seed
|
|
|
|
|
2018-01-31 12:01:49 +00:00
|
|
|
def _get_extra_flags(self):
|
|
|
|
return self._test_config.extra_flags
|
2017-12-12 21:33:16 +00:00
|
|
|
|
|
|
|
def _get_variant_flags(self):
|
|
|
|
return self.variant_flags
|
|
|
|
|
|
|
|
def _get_statusfile_flags(self):
|
|
|
|
"""Gets runtime flags from a status file.
|
|
|
|
|
2017-12-18 17:07:40 +00:00
|
|
|
Every outcome that starts with "--" is a flag.
|
2017-12-12 21:33:16 +00:00
|
|
|
"""
|
2017-12-18 17:07:40 +00:00
|
|
|
return self._statusfile_flags
|
2017-12-12 21:33:16 +00:00
|
|
|
|
2018-01-31 12:01:49 +00:00
|
|
|
def _get_mode_flags(self):
|
|
|
|
return self._test_config.mode_flags
|
2017-12-12 21:33:16 +00:00
|
|
|
|
|
|
|
def _get_source_flags(self):
|
|
|
|
return []
|
|
|
|
|
2018-01-31 12:01:49 +00:00
|
|
|
def _get_suite_flags(self):
|
2017-12-12 21:33:16 +00:00
|
|
|
return []
|
|
|
|
|
2018-08-29 13:52:04 +00:00
|
|
|
def _get_shell_flags(self):
|
|
|
|
return []
|
2017-12-12 21:33:16 +00:00
|
|
|
|
2018-01-31 12:01:49 +00:00
|
|
|
def _get_timeout(self, params):
|
|
|
|
timeout = self._test_config.timeout
|
2017-12-12 21:33:16 +00:00
|
|
|
if "--stress-opt" in params:
|
|
|
|
timeout *= 4
|
2019-05-02 07:05:43 +00:00
|
|
|
if "--jitless" in params:
|
|
|
|
timeout *= 2
|
|
|
|
if "--no-opt" in params:
|
|
|
|
timeout *= 2
|
2017-12-12 21:33:16 +00:00
|
|
|
if "--noenable-vfp3" in params:
|
|
|
|
timeout *= 2
|
2019-02-21 12:36:52 +00:00
|
|
|
if self._get_timeout_param() == TIMEOUT_LONG:
|
|
|
|
timeout *= 10
|
2019-05-02 07:05:43 +00:00
|
|
|
if self.is_slow:
|
|
|
|
timeout *= 4
|
2017-12-12 21:33:16 +00:00
|
|
|
return timeout
|
|
|
|
|
2017-12-19 14:48:08 +00:00
|
|
|
def get_shell(self):
|
2018-08-29 13:52:04 +00:00
|
|
|
raise NotImplementedError()
|
2017-12-12 21:33:16 +00:00
|
|
|
|
|
|
|
def _get_suffix(self):
|
|
|
|
return '.js'
|
|
|
|
|
2018-01-31 12:01:49 +00:00
|
|
|
def _create_cmd(self, shell, params, env, timeout):
|
2017-12-12 21:33:16 +00:00
|
|
|
return command.Command(
|
2018-01-31 12:01:49 +00:00
|
|
|
cmd_prefix=self._test_config.command_prefix,
|
|
|
|
shell=os.path.abspath(os.path.join(self._test_config.shell_dir, shell)),
|
2017-12-12 21:33:16 +00:00
|
|
|
args=params,
|
|
|
|
env=env,
|
|
|
|
timeout=timeout,
|
2018-08-10 17:09:34 +00:00
|
|
|
verbose=self._test_config.verbose,
|
|
|
|
resources_func=self._get_resources,
|
2017-12-12 21:33:16 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
def _parse_source_flags(self, source=None):
|
2017-12-13 12:47:24 +00:00
|
|
|
source = source or self.get_source()
|
2017-12-12 21:33:16 +00:00
|
|
|
flags = []
|
2017-12-13 12:47:24 +00:00
|
|
|
for match in re.findall(FLAGS_PATTERN, source):
|
2017-12-12 21:33:16 +00:00
|
|
|
flags += shlex.split(match.strip())
|
|
|
|
return flags
|
|
|
|
|
|
|
|
def is_source_available(self):
|
|
|
|
return self._get_source_path() is not None
|
|
|
|
|
|
|
|
def get_source(self):
|
|
|
|
with open(self._get_source_path()) as f:
|
|
|
|
return f.read()
|
|
|
|
|
|
|
|
def _get_source_path(self):
|
|
|
|
return None
|
2016-03-31 07:38:10 +00:00
|
|
|
|
2018-08-10 17:09:34 +00:00
|
|
|
def _get_resources(self):
|
|
|
|
"""Returns a list of absolute paths with additional files needed by the
|
|
|
|
test case.
|
|
|
|
|
|
|
|
Used to push additional files to Android devices.
|
|
|
|
"""
|
|
|
|
return []
|
|
|
|
|
2018-09-06 13:10:50 +00:00
|
|
|
def skip_predictable(self):
|
|
|
|
"""Returns True if the test case is not suitable for predictable testing."""
|
|
|
|
return True
|
|
|
|
|
2017-12-21 14:48:59 +00:00
|
|
|
@property
|
|
|
|
def output_proc(self):
|
2018-01-04 07:39:09 +00:00
|
|
|
if self.expected_outcomes is outproc.OUTCOMES_PASS:
|
|
|
|
return outproc.DEFAULT
|
|
|
|
return outproc.OutProc(self.expected_outcomes)
|
2017-12-20 10:28:27 +00:00
|
|
|
|
2016-03-31 07:38:10 +00:00
|
|
|
def __cmp__(self, other):
|
|
|
|
# Make sure that test cases are sorted correctly if sorted without
|
|
|
|
# key function. But using a key function is preferred for speed.
|
|
|
|
return cmp(
|
2018-02-01 13:40:23 +00:00
|
|
|
(self.suite.name, self.name, self.variant),
|
|
|
|
(other.suite.name, other.name, other.variant)
|
2016-03-31 07:38:10 +00:00
|
|
|
)
|
2016-08-04 14:41:09 +00:00
|
|
|
|
|
|
|
def __str__(self):
|
2017-12-12 21:33:16 +00:00
|
|
|
return self.suite.name + '/' + self.name
|
2018-08-29 13:52:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
class D8TestCase(TestCase):
|
|
|
|
def get_shell(self):
|
|
|
|
return "d8"
|
|
|
|
|
|
|
|
def _get_shell_flags(self):
|
|
|
|
return ['--test']
|
|
|
|
|
|
|
|
def _get_resources_for_file(self, file):
|
|
|
|
"""Returns for a given file a list of absolute paths of files needed by the
|
|
|
|
given file.
|
|
|
|
"""
|
|
|
|
with open(file) as f:
|
|
|
|
source = f.read()
|
|
|
|
result = []
|
|
|
|
def add_path(path):
|
|
|
|
result.append(os.path.abspath(path.replace('/', os.path.sep)))
|
|
|
|
for match in RESOURCES_PATTERN.finditer(source):
|
|
|
|
# There are several resources per line. Relative to base dir.
|
|
|
|
for path in match.group(1).strip().split():
|
|
|
|
add_path(path)
|
|
|
|
for match in LOAD_PATTERN.finditer(source):
|
|
|
|
# Files in load statements are relative to base dir.
|
|
|
|
add_path(match.group(1))
|
|
|
|
for match in MODULE_RESOURCES_PATTERN_1.finditer(source):
|
2018-09-05 09:38:39 +00:00
|
|
|
# Imported files are relative to the file importing them.
|
|
|
|
add_path(os.path.join(os.path.dirname(file), match.group(1)))
|
2018-08-29 13:52:04 +00:00
|
|
|
for match in MODULE_RESOURCES_PATTERN_2.finditer(source):
|
2018-09-05 09:38:39 +00:00
|
|
|
# Imported files are relative to the file importing them.
|
|
|
|
add_path(os.path.join(os.path.dirname(file), match.group(1)))
|
2018-08-29 13:52:04 +00:00
|
|
|
return result
|
|
|
|
|
|
|
|
def _get_resources(self):
|
|
|
|
"""Returns the list of files needed by a test case."""
|
2018-09-05 11:15:59 +00:00
|
|
|
if not self._get_source_path():
|
|
|
|
return []
|
2018-08-29 13:52:04 +00:00
|
|
|
result = set()
|
|
|
|
to_check = [self._get_source_path()]
|
|
|
|
# Recurse over all files until reaching a fixpoint.
|
|
|
|
while to_check:
|
|
|
|
next_resource = to_check.pop()
|
|
|
|
result.add(next_resource)
|
|
|
|
for resource in self._get_resources_for_file(next_resource):
|
|
|
|
# Only add files that exist on disc. The pattens we check for give some
|
|
|
|
# false positives otherwise.
|
|
|
|
if resource not in result and os.path.exists(resource):
|
|
|
|
to_check.append(resource)
|
|
|
|
return sorted(list(result))
|
2018-09-06 13:10:50 +00:00
|
|
|
|
|
|
|
def skip_predictable(self):
|
|
|
|
"""Returns True if the test case is not suitable for predictable testing."""
|
|
|
|
return (statusfile.FAIL in self.expected_outcomes or
|
|
|
|
self.output_proc.negative)
|