mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-12-12 03:34:34 +08:00
8bfef8bf6b
The Android CTS 10 version is relative old when compared with skia main branch, which was being used before. Some modifications in the skqp build/runner scripts were needed to make it run on CI. - skqp versions from android-cts have already all assets inside platform_tools folder. - along with the assets, are the render and unit files which are expected to pass in the Android CTS execution. - removed custom test files from the a630 folder, to make it comply with the CTS expectations. - include new patches to remove Python2 dependencies and avoid the installation of it in rootfs. - strip binariesthe built binaries `skqp` and `list_gpu_unit_tests`, as `is_debug = false` gn argument did not work, maybe it is not well tested in development builds with skia tools - use Clang instead of GCC. The GCC support is not so graceful as it is in the skia main branch, some NEON instructions needs to be turned off in the GCC compilation, causing different tests result. This change does not imply a bigger rootfs, since the built skqp binary uses GCC libc++ and other library runtimes. So clang is just a build dependency. = Changes in skqp results = Some errors were found for GL backend and unit tests. GLES and VK tests are green. All the failed tests were classified as expected to fail in the render and unit tests list. ``` gl_blur2rectsnonninepatch gl_bug339297_as_clip gl_bug6083 gl_dashtextcaps ``` ``` SRGBReadWritePixels (../../tests/SRGBReadWritePixelsTest.cpp:214 Could not create sRGB surface context. [OpenGL]) ``` Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com> Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14686>
69 lines
2.5 KiB
Diff
69 lines
2.5 KiB
Diff
diff --git a/bin/fetch-gn b/bin/fetch-gn
|
|
index d5e94a2..59c4591 100755
|
|
--- a/bin/fetch-gn
|
|
+++ b/bin/fetch-gn
|
|
@@ -5,39 +5,44 @@
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
-import hashlib
|
|
import os
|
|
+import platform
|
|
import shutil
|
|
import stat
|
|
import sys
|
|
-import urllib2
|
|
+import tempfile
|
|
+import zipfile
|
|
+
|
|
+if sys.version_info[0] < 3:
|
|
+ from urllib2 import urlopen
|
|
+else:
|
|
+ from urllib.request import urlopen
|
|
|
|
os.chdir(os.path.join(os.path.dirname(__file__), os.pardir))
|
|
|
|
-dst = 'bin/gn.exe' if 'win32' in sys.platform else 'bin/gn'
|
|
+gnzip = os.path.join(tempfile.mkdtemp(), 'gn.zip')
|
|
+with open(gnzip, 'wb') as f:
|
|
+ OS = {'darwin': 'mac', 'linux': 'linux', 'linux2': 'linux', 'win32': 'windows'}[sys.platform]
|
|
+ cpu = {'amd64': 'amd64', 'arm64': 'arm64', 'x86_64': 'amd64', 'aarch64': 'arm64'}[platform.machine().lower()]
|
|
|
|
-sha1 = '2f27ff0b6118e5886df976da5effa6003d19d1ce' if 'linux' in sys.platform else \
|
|
- '9be792dd9010ce303a9c3a497a67bcc5ac8c7666' if 'darwin' in sys.platform else \
|
|
- 'eb69be2d984b4df60a8c21f598135991f0ad1742' # Windows
|
|
+ rev = 'd62642c920e6a0d1756316d225a90fd6faa9e21e'
|
|
+ url = 'https://chrome-infra-packages.appspot.com/dl/gn/gn/{}-{}/+/git_revision:{}'.format(
|
|
+ OS,cpu,rev)
|
|
+ f.write(urlopen(url).read())
|
|
|
|
-def sha1_of_file(path):
|
|
- h = hashlib.sha1()
|
|
- if os.path.isfile(path):
|
|
- with open(path, 'rb') as f:
|
|
- h.update(f.read())
|
|
- return h.hexdigest()
|
|
+gn = 'gn.exe' if 'win32' in sys.platform else 'gn'
|
|
+with zipfile.ZipFile(gnzip, 'r') as f:
|
|
+ f.extract(gn, 'bin')
|
|
|
|
-if sha1_of_file(dst) != sha1:
|
|
- with open(dst, 'wb') as f:
|
|
- f.write(urllib2.urlopen('https://chromium-gn.storage-download.googleapis.com/' + sha1).read())
|
|
+gn = os.path.join('bin', gn)
|
|
|
|
- os.chmod(dst, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR |
|
|
- stat.S_IRGRP | stat.S_IXGRP |
|
|
- stat.S_IROTH | stat.S_IXOTH )
|
|
+os.chmod(gn, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR |
|
|
+ stat.S_IRGRP | stat.S_IXGRP |
|
|
+ stat.S_IROTH | stat.S_IXOTH )
|
|
|
|
# We'll also copy to a path that depot_tools' GN wrapper will expect to find the binary.
|
|
copy_path = 'buildtools/linux64/gn' if 'linux' in sys.platform else \
|
|
'buildtools/mac/gn' if 'darwin' in sys.platform else \
|
|
'buildtools/win/gn.exe'
|
|
if os.path.isdir(os.path.dirname(copy_path)):
|
|
- shutil.copy(dst, copy_path)
|
|
+ shutil.copy(gn, copy_path)
|