Fix race condition in test_challenge_build (APKINDEX timestamp)
This commit is contained in:
parent
51bdc24315
commit
0bd1d54049
|
@ -52,15 +52,17 @@ def test_challenge_build(args):
|
|||
version = apkbuild["pkgver"] + "-r" + apkbuild["pkgrel"]
|
||||
temp_path = pmb.chroot.other.tempfolder(args, "/tmp/test_challenge_build/" +
|
||||
args.arch_native)
|
||||
apk_path = ("/home/user/packages/user/" + args.arch_native + "/" + pkgname +
|
||||
"-" + version + ".apk")
|
||||
pmb.chroot.user(args, ["cp", apk_path, apk_path +
|
||||
".buildinfo.json", temp_path])
|
||||
packages_path = "/home/user/packages/user/" + args.arch_native
|
||||
apk_path = packages_path + "/" + pkgname + "-" + version + ".apk"
|
||||
pmb.chroot.user(args, ["cp", apk_path, apk_path + ".buildinfo.json",
|
||||
temp_path])
|
||||
|
||||
# Change the timestamps of all files, so the changes file gets written
|
||||
# correctly, even if this testcase gets executed very fast
|
||||
pmb.chroot.user(args, ["touch", "-d", "2017-01-01", apk_path, apk_path +
|
||||
".buildinfo.json"])
|
||||
pmb.chroot.user(args, ["touch", "-d", "2017-01-01",
|
||||
packages_path + "/APKINDEX.tar.gz",
|
||||
apk_path,
|
||||
apk_path + ".buildinfo.json"])
|
||||
|
||||
# Challenge, output changes into a file
|
||||
setattr(args, "output_repo_changes", args.work + "/chroot_native/tmp/"
|
||||
|
|
Loading…
Reference in New Issue