Commit bc7d49e7 authored by jameslahm's avatar jameslahm Committed by V8 LUCI CQ

[test] Fix get resources for interpreter expectation files

... in unittests/testcfg.py on android.

Bug: v8:12781
Change-Id: I7a7f4edbae4f4fe646063d048f5132c401422be4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3697864Reviewed-by: 's avatarManos Koukoutos <manoskouk@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#81085}
parent a6d7f261
...@@ -88,18 +88,6 @@ class TestCase(testcase.TestCase): ...@@ -88,18 +88,6 @@ class TestCase(testcase.TestCase):
def _get_files_params(self): def _get_files_params(self):
return [self.path] return [self.path]
def _get_resources(self):
# Bytecode-generator tests are the only ones requiring extra files on
# Android.
parts = self.name.split('/')
if parts[0] == 'test-bytecode-generator':
expectation_file = os.path.join(
self.suite.root, 'interpreter', 'bytecode_expectations',
'%s.golden' % parts[1])
if os.path.exists(expectation_file):
return [expectation_file]
return []
def GetSuite(*args, **kwargs): def GetSuite(*args, **kwargs):
return TestSuite(*args, **kwargs) return TestSuite(*args, **kwargs)
...@@ -78,6 +78,18 @@ class TestCase(testcase.TestCase): ...@@ -78,6 +78,18 @@ class TestCase(testcase.TestCase):
def get_shell(self): def get_shell(self):
return self.suite.name return self.suite.name
def _get_resources(self):
# Bytecode-generator tests are the only ones requiring extra files on
# Android.
parts = self.name.split('.')
if parts[0] == 'BytecodeGeneratorTest':
expectation_file = os.path.join(self.suite.root, 'interpreter',
'bytecode_expectations',
'%s.golden' % parts[1])
if os.path.exists(expectation_file):
return [expectation_file]
return []
def GetSuite(*args, **kwargs): def GetSuite(*args, **kwargs):
return TestSuite(*args, **kwargs) return TestSuite(*args, **kwargs)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment