diff options
author | Gio de Guzman <giancarlodeguzman@gmail.com> | 2021-12-15 00:40:17 -0600 |
---|---|---|
committer | Gio de Guzman <giancarlodeguzman@gmail.com> | 2021-12-15 02:04:11 -0600 |
commit | 43b38e3e370e15a82409f8dbcbf408abd7d28e8e (patch) | |
tree | dc3abc8837ab7b4ee04069a94d429c60f9558bbd /python | |
parent | c128c9a609349b522e7c1fd948a5eb6b4288e1d2 (diff) | |
download | servo-43b38e3e370e15a82409f8dbcbf408abd7d28e8e.tar.gz servo-43b38e3e370e15a82409f8dbcbf408abd7d28e8e.zip |
update Ubuntu version check to > 21.10
Update clang-format version check to use find() instead of startswith() to deal with distro-specific discrepancy
Diffstat (limited to 'python')
-rw-r--r-- | python/servo/bootstrap.py | 2 | ||||
-rw-r--r-- | python/servo/testing_commands.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/python/servo/bootstrap.py b/python/servo/bootstrap.py index 7912d5d3969..f7da1205edc 100644 --- a/python/servo/bootstrap.py +++ b/python/servo/bootstrap.py @@ -374,7 +374,7 @@ def get_linux_distribution(): raise Exception('unsupported version of %s: %s' % (distrib, version)) distrib, version = 'Ubuntu', base_version elif distrib.lower() == 'ubuntu': - if version > '21.04': + if version > '21.10': raise Exception('unsupported version of %s: %s' % (distrib, version)) # Fixme: we should allow checked/supported versions only elif distrib.lower() not in [ diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index c5d8404eb83..188aca96e9b 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -787,7 +787,7 @@ def setup_clangfmt(env): try: version = check_output([cmd, "--version"], env=env, universal_newlines=True).rstrip() print(version) - if not version.startswith("clang-format version {}.".format(CLANGFMT_VERSION)): + if version.find("clang-format version {}.".format(CLANGFMT_VERSION)) == -1: print("clang-format: wrong version (v{} required). Skipping CPP formatting.".format(CLANGFMT_VERSION)) return False, None, None except OSError: |