Skip to content

Commit

Permalink
Uniformify
Browse files Browse the repository at this point in the history
  • Loading branch information
kaidokert committed Mar 25, 2024
1 parent 690a27a commit fd9219b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 30 deletions.
Empty file added starboard/stub/launcher.py
Empty file.
41 changes: 11 additions & 30 deletions starboard/tools/platform_config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_loop_all_platforms(self):
self.assertEqual(config.GetName(), conf)

def test_load_get_stub_config(self):
self.load_get_config('stub', 'stub', has_launcher=False)
self.load_get_config('stub', 'stub')

def test_load_get_linux_config(self):
self.load_get_config(
Expand Down Expand Up @@ -71,23 +71,19 @@ def test_load_android_arm_config(self):
self.load_get_config(
'android-arm',
'android/arm',
deploy_path=['*.apk'],
test_filters=[('renderer_test', 'PixelTest.TooManyGlyphs'),
('blackbox', 'deep_links')])

def test_load_android_arm64_config(self):
self.load_get_config(
'android-arm64', 'android/arm64', deploy_path=['*.apk'])
self.load_get_config('android-arm64', 'android/arm64')

def test_load_android_arm64_vulkan_config(self):
self.load_get_config(
'android-arm64-vulkan', 'android/arm64/vulkan', deploy_path=['*.apk'])
self.load_get_config('android-arm64-vulkan', 'android/arm64/vulkan')

def test_load_android_x86_config(self):
self.load_get_config(
'android-x86',
'android/x86',
deploy_path=['*.apk'],
test_filters=[('renderer_test', 'PixelTest.TooManyGlyphs'),
('net_unittests', 'FILTER_ALL')])

Expand All @@ -114,10 +110,7 @@ def test_load_win32_config(self):

def test_load_xb1_config(self):
self.load_get_config(
'xb1',
'xb1',
deploy_path=['appx/*'],
test_filters=[('base_unittests', 'PathServiceTest.Get')])
'xb1', 'xb1', test_filters=[('base_unittests', 'PathServiceTest.Get')])

def test_evergreen_x64_config(self):
self.load_get_config('evergreen-x64', 'evergreen/x64', test_filters=[])
Expand All @@ -138,15 +131,11 @@ def test_evergreen_arm_softfp_config(self):
def test_evergreen_arm64_config(self):
self.load_get_config('evergreen-arm64', 'evergreen/arm64', test_filters=[])

def load_get_config(
self,
conf: str,
path: str,
app_env=None,
deploy_path=None,
test_filters=None,
has_launcher=True,
):
def load_get_config(self,
conf: str,
path: str,
app_env=None,
test_filters=None):
if app_env is None:
app_env = {}
if test_filters is None:
Expand All @@ -160,16 +149,8 @@ def load_get_config(
for test in ['nplb', 'common_test']:
self.assertIn(test, config.GetTestTargets())
self.assertEqual(config.GetTestBlackBoxTargets(), [])
if deploy_path:
self.assertEqual(config.GetDeployPathPatterns(), deploy_path)
else:
with self.assertRaises(NotImplementedError):
config.GetDeployPathPatterns()
if has_launcher:
self.assertIsNotNone(config.GetLauncher())
self.assertIsNotNone(config.GetLauncherPath())
else:
self.assertIsNone(config.GetLauncher())
self.assertIsNotNone(config.GetLauncherPath())
self.assertIsNotNone(config.GetLauncher())
app_conf = config.GetApplicationConfiguration('cobalt')
self.assertEqual(app_conf.GetName(), 'cobalt')
self.assertEqual(app_conf.GetDirectory(), os.path.join(conf_dir, 'cobalt'))
Expand Down

0 comments on commit fd9219b

Please sign in to comment.