diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2018-06-08 15:20:25 +0100 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2018-06-20 22:13:39 +0100 |
commit | f9172822e7a07db346e21d461e2a61ffcee7c77e (patch) | |
tree | aa9197a36514b60c0c0123a46f87811653e825aa /tests | |
parent | 83405c4517679722257b1560f75fb7488b671374 (diff) | |
download | qemu-f9172822e7a07db346e21d461e2a61ffcee7c77e.zip qemu-f9172822e7a07db346e21d461e2a61ffcee7c77e.tar.gz qemu-f9172822e7a07db346e21d461e2a61ffcee7c77e.tar.bz2 |
docker: docker.py don't conflate checksums for extra_files
This just gets confusing especially as the helper function doesn't
even take into account any extra files (or the executable). Currently
the actual check just ignores them and also passes the result through
_dockerfile_preprocess so we fix that too.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/docker/docker.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/docker/docker.py b/tests/docker/docker.py index e6437d6..6a9f2f2 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -206,8 +206,10 @@ class Docker(object): tmp_df.write("\n") tmp_df.write("LABEL com.qemu.dockerfile-checksum=%s" % - _text_checksum("\n".join([dockerfile] + - extra_files_cksum))) + _text_checksum(_dockerfile_preprocess(dockerfile))) + for f, c in extra_files_cksum: + tmp_df.write("LABEL com.qemu.%s-checksum=%s" % (f, c)) + tmp_df.flush() self._do_check(["build", "-t", tag, "-f", tmp_df.name] + argv + \ @@ -322,7 +324,7 @@ class BuildCommand(SubCommand): _copy_binary_with_libs(args.include_executable, docker_dir) for filename in args.extra_files or []: _copy_with_mkdir(filename, docker_dir) - cksum += [_file_checksum(filename)] + cksum += [(filename, _file_checksum(filename))] argv += ["--build-arg=" + k.lower() + "=" + v for k, v in os.environ.iteritems() |