mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-12-03 23:24:17 +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>
143 lines
5.6 KiB
Diff
143 lines
5.6 KiB
Diff
Patch based from diff with skia repository from commit
|
|
013397884c73959dc07cb0a26ee742b1cdfbda8a
|
|
|
|
Adds support for Python3, but removes the constraint of only SHA based refs in
|
|
DEPS
|
|
diff --git a/tools/git-sync-deps b/tools/git-sync-deps
|
|
index c7379c0b5c..f63d4d9ccf 100755
|
|
--- a/tools/git-sync-deps
|
|
+++ b/tools/git-sync-deps
|
|
@@ -43,7 +43,7 @@ def git_executable():
|
|
A string suitable for passing to subprocess functions, or None.
|
|
"""
|
|
envgit = os.environ.get('GIT_EXECUTABLE')
|
|
- searchlist = ['git']
|
|
+ searchlist = ['git', 'git.bat']
|
|
if envgit:
|
|
searchlist.insert(0, envgit)
|
|
with open(os.devnull, 'w') as devnull:
|
|
@@ -94,21 +94,25 @@ def is_git_toplevel(git, directory):
|
|
try:
|
|
toplevel = subprocess.check_output(
|
|
[git, 'rev-parse', '--show-toplevel'], cwd=directory).strip()
|
|
- return os.path.realpath(directory) == os.path.realpath(toplevel)
|
|
+ return os.path.realpath(directory) == os.path.realpath(toplevel.decode())
|
|
except subprocess.CalledProcessError:
|
|
return False
|
|
|
|
|
|
-def status(directory, checkoutable):
|
|
- def truncate(s, length):
|
|
+def status(directory, commithash, change):
|
|
+ def truncate_beginning(s, length):
|
|
+ return s if len(s) <= length else '...' + s[-(length-3):]
|
|
+ def truncate_end(s, length):
|
|
return s if len(s) <= length else s[:(length - 3)] + '...'
|
|
+
|
|
dlen = 36
|
|
- directory = truncate(directory, dlen)
|
|
- checkoutable = truncate(checkoutable, 40)
|
|
- sys.stdout.write('%-*s @ %s\n' % (dlen, directory, checkoutable))
|
|
+ directory = truncate_beginning(directory, dlen)
|
|
+ commithash = truncate_end(commithash, 40)
|
|
+ symbol = '>' if change else '@'
|
|
+ sys.stdout.write('%-*s %s %s\n' % (dlen, directory, symbol, commithash))
|
|
|
|
|
|
-def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
|
|
+def git_checkout_to_directory(git, repo, commithash, directory, verbose):
|
|
"""Checkout (and clone if needed) a Git repository.
|
|
|
|
Args:
|
|
@@ -117,8 +121,7 @@ def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
|
|
repo (string) the location of the repository, suitable
|
|
for passing to `git clone`.
|
|
|
|
- checkoutable (string) a tag, branch, or commit, suitable for
|
|
- passing to `git checkout`
|
|
+ commithash (string) a commit, suitable for passing to `git checkout`
|
|
|
|
directory (string) the path into which the repository
|
|
should be checked out.
|
|
@@ -129,7 +132,12 @@ def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
|
|
"""
|
|
if not os.path.isdir(directory):
|
|
subprocess.check_call(
|
|
- [git, 'clone', '--quiet', repo, directory])
|
|
+ [git, 'clone', '--quiet', '--no-checkout', repo, directory])
|
|
+ subprocess.check_call([git, 'checkout', '--quiet', commithash],
|
|
+ cwd=directory)
|
|
+ if verbose:
|
|
+ status(directory, commithash, True)
|
|
+ return
|
|
|
|
if not is_git_toplevel(git, directory):
|
|
# if the directory exists, but isn't a git repo, you will modify
|
|
@@ -145,11 +153,11 @@ def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
|
|
with open(os.devnull, 'w') as devnull:
|
|
# If this fails, we will fetch before trying again. Don't spam user
|
|
# with error infomation.
|
|
- if 0 == subprocess.call([git, 'checkout', '--quiet', checkoutable],
|
|
+ if 0 == subprocess.call([git, 'checkout', '--quiet', commithash],
|
|
cwd=directory, stderr=devnull):
|
|
# if this succeeds, skip slow `git fetch`.
|
|
if verbose:
|
|
- status(directory, checkoutable) # Success.
|
|
+ status(directory, commithash, False) # Success.
|
|
return
|
|
|
|
# If the repo has changed, always force use of the correct repo.
|
|
@@ -159,18 +167,24 @@ def git_checkout_to_directory(git, repo, checkoutable, directory, verbose):
|
|
|
|
subprocess.check_call([git, 'fetch', '--quiet'], cwd=directory)
|
|
|
|
- subprocess.check_call([git, 'checkout', '--quiet', checkoutable], cwd=directory)
|
|
+ subprocess.check_call([git, 'checkout', '--quiet', commithash], cwd=directory)
|
|
|
|
if verbose:
|
|
- status(directory, checkoutable) # Success.
|
|
+ status(directory, commithash, True) # Success.
|
|
|
|
|
|
def parse_file_to_dict(path):
|
|
dictionary = {}
|
|
- execfile(path, dictionary)
|
|
+ with open(path) as f:
|
|
+ exec('def Var(x): return vars[x]\n' + f.read(), dictionary)
|
|
return dictionary
|
|
|
|
|
|
+def is_sha1_sum(s):
|
|
+ """SHA1 sums are 160 bits, encoded as lowercase hexadecimal."""
|
|
+ return len(s) == 40 and all(c in '0123456789abcdef' for c in s)
|
|
+
|
|
+
|
|
def git_sync_deps(deps_file_path, command_line_os_requests, verbose):
|
|
"""Grab dependencies, with optional platform support.
|
|
|
|
@@ -204,19 +218,19 @@ def git_sync_deps(deps_file_path, command_line_os_requests, verbose):
|
|
raise Exception('%r is parent of %r' % (other_dir, directory))
|
|
list_of_arg_lists = []
|
|
for directory in sorted(dependencies):
|
|
- if not isinstance(dependencies[directory], basestring):
|
|
+ if not isinstance(dependencies[directory], str):
|
|
if verbose:
|
|
- print 'Skipping "%s".' % directory
|
|
+ sys.stdout.write( 'Skipping "%s".\n' % directory)
|
|
continue
|
|
if '@' in dependencies[directory]:
|
|
- repo, checkoutable = dependencies[directory].split('@', 1)
|
|
+ repo, commithash = dependencies[directory].split('@', 1)
|
|
else:
|
|
- raise Exception("please specify commit or tag")
|
|
+ raise Exception("please specify commit")
|
|
|
|
relative_directory = os.path.join(deps_file_directory, directory)
|
|
|
|
list_of_arg_lists.append(
|
|
- (git, repo, checkoutable, relative_directory, verbose))
|
|
+ (git, repo, commithash, relative_directory, verbose))
|
|
|
|
multithread(git_checkout_to_directory, list_of_arg_lists)
|
|
|