Skip to content

Commit

Permalink
Fix buildbots after https://reviews.llvm.org/D111686
Browse files Browse the repository at this point in the history
  • Loading branch information
clayborg committed Oct 21, 2021
1 parent 93d0ade commit 910838f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lldb/packages/Python/lldbsuite/test/lldbtest.py
Expand Up @@ -750,6 +750,10 @@ def getBuildArtifact(self, name="a.out"):
"""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 = [
Expand Down
10 changes: 8 additions & 2 deletions lldb/test/API/commands/statistics/basic/TestStats.py
Expand Up @@ -93,12 +93,18 @@ def test_expressions_frame_var_counts(self):
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.
Expand Down

0 comments on commit 910838f

Please sign in to comment.