Skip to content

Commit 929d99c

Browse files
committed
fix: perf tests
1 parent d6849fb commit 929d99c

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

tests/perf/tooling/build_perf_tests.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ def test_200_prepare_android_initial(self, template, template_package, change_se
6767
@parameterized.expand(TEST_DATA)
6868
@unittest.skipIf(Settings.HOST_OS != OSType.OSX, 'iOS tests can be executed only on macOS.')
6969
def test_201_prepare_ios_initial(self, template, template_package, change_set, bundle):
70-
actual = Helpers.get_actual_result(template, Platform.iOS, bundle, 'prepare_initial')
71-
expected = Helpers.get_expected_result(template, Platform.iOS, bundle, 'prepare_initial')
70+
actual = Helpers.get_actual_result(template, Platform.IOS, bundle, 'prepare_initial')
71+
expected = Helpers.get_expected_result(template, Platform.IOS, bundle, 'prepare_initial')
7272
assert PerfUtils.is_value_in_range(actual, expected, TOLERANCE), 'Initial ios prepare time is not OK.'
7373

7474
@parameterized.expand(TEST_DATA)
@@ -80,8 +80,8 @@ def test_210_prepare_android_skip(self, template, template_package, change_set,
8080
@parameterized.expand(TEST_DATA)
8181
@unittest.skipIf(Settings.HOST_OS != OSType.OSX, 'iOS tests can be executed only on macOS.')
8282
def test_211_prepare_ios_skip(self, template, template_package, change_set, bundle):
83-
actual = Helpers.get_actual_result(template, Platform.iOS, bundle, 'prepare_skip')
84-
expected = Helpers.get_expected_result(template, Platform.iOS, bundle, 'prepare_skip')
83+
actual = Helpers.get_actual_result(template, Platform.IOS, bundle, 'prepare_skip')
84+
expected = Helpers.get_expected_result(template, Platform.IOS, bundle, 'prepare_skip')
8585
assert PerfUtils.is_value_in_range(actual, expected, TOLERANCE), 'Skip ios prepare time is not OK.'
8686

8787
@parameterized.expand(TEST_DATA)
@@ -93,8 +93,8 @@ def test_220_prepare_android_incremental(self, template, template_package, chang
9393
@parameterized.expand(TEST_DATA)
9494
@unittest.skipIf(Settings.HOST_OS != OSType.OSX, 'iOS tests can be executed only on macOS.')
9595
def test_221_prepare_ios_incremental(self, template, template_package, change_set, bundle):
96-
actual = Helpers.get_actual_result(template, Platform.iOS, bundle, 'prepare_incremental')
97-
expected = Helpers.get_expected_result(template, Platform.iOS, bundle, 'prepare_incremental')
96+
actual = Helpers.get_actual_result(template, Platform.IOS, bundle, 'prepare_incremental')
97+
expected = Helpers.get_expected_result(template, Platform.IOS, bundle, 'prepare_incremental')
9898
assert PerfUtils.is_value_in_range(actual, expected, TOLERANCE), 'Incremental ios prepare time is not OK.'
9999

100100
@parameterized.expand(TEST_DATA)
@@ -106,8 +106,8 @@ def test_300_build_android_initial(self, template, template_package, change_set,
106106
@parameterized.expand(TEST_DATA)
107107
@unittest.skipIf(Settings.HOST_OS != OSType.OSX, 'iOS tests can be executed only on macOS.')
108108
def test_301_build_ios_initial(self, template, template_package, change_set, bundle):
109-
actual = Helpers.get_actual_result(template, Platform.iOS, bundle, 'build_initial')
110-
expected = Helpers.get_expected_result(template, Platform.iOS, bundle, 'build_initial')
109+
actual = Helpers.get_actual_result(template, Platform.IOS, bundle, 'build_initial')
110+
expected = Helpers.get_expected_result(template, Platform.IOS, bundle, 'build_initial')
111111
assert PerfUtils.is_value_in_range(actual, expected, TOLERANCE), 'Initial ios build time is not OK.'
112112

113113
@parameterized.expand(TEST_DATA)
@@ -119,8 +119,8 @@ def test_310_build_android_incremental(self, template, template_package, change_
119119
@parameterized.expand(TEST_DATA)
120120
@unittest.skipIf(Settings.HOST_OS != OSType.OSX, 'iOS tests can be executed only on macOS.')
121121
def test_311_build_ios_incremental(self, template, template_package, change_set, bundle):
122-
actual = Helpers.get_actual_result(template, Platform.iOS, bundle, 'build_incremental')
123-
expected = Helpers.get_expected_result(template, Platform.iOS, bundle, 'build_incremental')
122+
actual = Helpers.get_actual_result(template, Platform.IOS, bundle, 'build_incremental')
123+
expected = Helpers.get_expected_result(template, Platform.IOS, bundle, 'build_incremental')
124124
assert PerfUtils.is_value_in_range(actual, expected, TOLERANCE), 'Incremental ios build time is not OK.'
125125

126126

@@ -197,6 +197,7 @@ def get_actual_result(template, platform, bundle, entry):
197197

198198
@staticmethod
199199
def get_expected_result(template, platform, bundle, entry):
200+
platform = str(platform)
200201
if bundle:
201-
platform = str(platform) + '_bundle'
202+
platform = platform + '_bundle'
202203
return EXPECTED_RESULTS[template][platform][entry]

0 commit comments

Comments
 (0)