test: adjust to device-qemu-amd64 move to main (!1910)

Don't assume that the device selected in "pmbootstrap init" is in the
testing subdir anymore. The default device, qemu-amd64, was recently
moved to main, so this does not hold up anymore. Instead, use
pmb.helpers.pmaports.find to figure out the currect dir.
This commit is contained in:
Oliver Smith 2020-04-11 18:40:11 +02:00
parent 44bd235f3e
commit 8dc8daa05a
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 5 additions and 4 deletions

View file

@ -385,8 +385,8 @@ def test_build_local_source_high_level(args, tmpdir):
aports = tmpdir + "/aports"
aport = aports + "/device/testing/device-" + args.device
os.makedirs(aport)
shutil.copy(args.aports + "/device/testing/device-" + args.device + "/deviceinfo",
aport)
path_original = pmb.helpers.pmaports.find(args, f"device-{args.device}")
shutil.copy(f"{path_original}/deviceinfo", aport)
# aports: Add modified hello-world aport (source="", uses $builddir)
aport = aports + "/main/hello-world"