forked from OSchip/llvm-project
Fix buildbots after https://reviews.llvm.org/D111686
This commit is contained in:
parent
93d0ade17c
commit
910838f07d
|
@ -750,6 +750,10 @@ class Base(unittest2.TestCase):
|
|||
"""Return absolute path to an artifact in the test's build directory."""
|
||||
return os.path.join(self.getBuildDir(), name)
|
||||
|
||||
def getSourcePath(self, name):
|
||||
"""Return absolute path to a file in the test's source directory."""
|
||||
return os.path.join(self.getSourceDir(), name)
|
||||
|
||||
@classmethod
|
||||
def setUpCommands(cls):
|
||||
commands = [
|
||||
|
|
|
@ -93,12 +93,18 @@ class TestCase(TestBase):
|
|||
substrs=["undeclared identifier 'doesnt_exist'"])
|
||||
# Doesn't successfully execute.
|
||||
self.expect("expr int *i = nullptr; *i", error=True)
|
||||
# Interpret an integer as an array with 3 elements is also a failure.
|
||||
# Interpret an integer as an array with 3 elements is a failure for
|
||||
# the "expr" command, but the expression evaluation will succeed and
|
||||
# be counted as a success even though the "expr" options will for the
|
||||
# command to fail. It is more important to track expression evaluation
|
||||
# from all sources instead of just through the command, so this was
|
||||
# changed. If we want to track command success and fails, we can do
|
||||
# so using another metric.
|
||||
self.expect("expr -Z 3 -- 1", error=True,
|
||||
substrs=["expression cannot be used with --element-count"])
|
||||
# We should have gotten 3 new failures and the previous success.
|
||||
stats = self.get_stats()
|
||||
self.verify_success_fail_count(stats, 'expressionEvaluation', 1, 3)
|
||||
self.verify_success_fail_count(stats, 'expressionEvaluation', 2, 2)
|
||||
|
||||
self.expect("statistics enable")
|
||||
# 'frame var' with enabled statistics will change stats.
|
||||
|
|
Loading…
Reference in New Issue