cefbuilds: Add tools distribution (see #3734)

This commit is contained in:
Marshall Greenblatt 2024-07-11 12:15:48 -04:00
parent 5607a4d347
commit 4023fea237
3 changed files with 19 additions and 4 deletions

View File

@ -99,13 +99,14 @@ class cef_json_builder:
@staticmethod @staticmethod
def get_platforms(): def get_platforms():
""" Returns the list of supported platforms. """ """ Returns the list of supported platforms. """
return ('linux32', 'linux64', 'linuxarm', 'linuxarm64', 'macosarm64', 'macosx64', return ('linux32', 'linux64', 'linuxarm', 'linuxarm64', 'macosarm64',
'windows32', 'windows64', 'windowsarm64') 'macosx64', 'windows32', 'windows64', 'windowsarm64')
@staticmethod @staticmethod
def get_distrib_types(): def get_distrib_types():
""" Returns the list of supported distribution types. """ """ Returns the list of supported distribution types. """
return ('standard', 'minimal', 'client', 'release_symbols', 'debug_symbols') return ('standard', 'minimal', 'client', 'tools', 'release_symbols',
'debug_symbols')
@staticmethod @staticmethod
def is_valid_version(version): def is_valid_version(version):
@ -360,6 +361,11 @@ class cef_json_builder:
type = 'client' type = 'client'
del name_parts[-1] del name_parts[-1]
# Might be '<version>_<platform>_tools'.
if name_parts[-1] == 'tools':
type = 'tools'
del name_parts[-1]
# Might be '<version>_<platform>_beta'. # Might be '<version>_<platform>_beta'.
if name_parts[-1] == 'beta': if name_parts[-1] == 'beta':
del name_parts[-1] del name_parts[-1]

View File

@ -52,10 +52,11 @@ def make_fake_file_info(platform, version, type):
def create_fake_files(platform, version): def create_fake_files(platform, version):
files = [] files = []
# All platforms create standard, minimal and client distributions. # All platforms create standard, minimal, client and tools distributions.
files.append(make_fake_file_info(platform, version, 'standard')) files.append(make_fake_file_info(platform, version, 'standard'))
files.append(make_fake_file_info(platform, version, 'minimal')) files.append(make_fake_file_info(platform, version, 'minimal'))
files.append(make_fake_file_info(platform, version, 'client')) files.append(make_fake_file_info(platform, version, 'client'))
files.append(make_fake_file_info(platform, version, 'tools'))
# Windows and OS X platforms create debug and release symbols. # Windows and OS X platforms create debug and release symbols.
if platform.find('windows') == 0 or platform.find('macosx') == 0: if platform.find('windows') == 0 or platform.find('macosx') == 0:

View File

@ -152,6 +152,10 @@ class TestCefJSONBuilder(unittest.TestCase):
def test_add_client_file(self): def test_add_client_file(self):
self._test_add_file('client') self._test_add_file('client')
# Test add/get of a tools type file.
def test_add_tools_file(self):
self._test_add_file('tools')
# Test add/get of a debug_symbols type file. # Test add/get of a debug_symbols type file.
def test_add_debug_symbols_file(self): def test_add_debug_symbols_file(self):
self._test_add_file('debug_symbols') self._test_add_file('debug_symbols')
@ -172,6 +176,10 @@ class TestCefJSONBuilder(unittest.TestCase):
def test_add_client_file_beta(self): def test_add_client_file_beta(self):
self._test_add_file('client', channel='beta') self._test_add_file('client', channel='beta')
# Test add/get of a tools type file in beta channel.
def test_add_tools_file_beta(self):
self._test_add_file('tools', channel='beta')
# Test add/get of a debug_symbols type file in beta channel. # Test add/get of a debug_symbols type file in beta channel.
def test_add_debug_symbols_file_beta(self): def test_add_debug_symbols_file_beta(self):
self._test_add_file('debug_symbols', channel='beta') self._test_add_file('debug_symbols', channel='beta')