forked from Mirror/pmbootstrap
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:
parent
44bd235f3e
commit
8dc8daa05a
2 changed files with 5 additions and 4 deletions
|
@ -385,8 +385,8 @@ def test_build_local_source_high_level(args, tmpdir):
|
||||||
aports = tmpdir + "/aports"
|
aports = tmpdir + "/aports"
|
||||||
aport = aports + "/device/testing/device-" + args.device
|
aport = aports + "/device/testing/device-" + args.device
|
||||||
os.makedirs(aport)
|
os.makedirs(aport)
|
||||||
shutil.copy(args.aports + "/device/testing/device-" + args.device + "/deviceinfo",
|
path_original = pmb.helpers.pmaports.find(args, f"device-{args.device}")
|
||||||
aport)
|
shutil.copy(f"{path_original}/deviceinfo", aport)
|
||||||
|
|
||||||
# aports: Add modified hello-world aport (source="", uses $builddir)
|
# aports: Add modified hello-world aport (source="", uses $builddir)
|
||||||
aport = aports + "/main/hello-world"
|
aport = aports + "/main/hello-world"
|
||||||
|
|
|
@ -80,8 +80,9 @@ def setup_work(args, tmpdir):
|
||||||
for folder in ["device/testing", "main"]:
|
for folder in ["device/testing", "main"]:
|
||||||
pmb.helpers.run.user(args, ["mkdir", "-p", args.aports, tmpdir +
|
pmb.helpers.run.user(args, ["mkdir", "-p", args.aports, tmpdir +
|
||||||
"/_aports/" + folder])
|
"/_aports/" + folder])
|
||||||
pmb.helpers.run.user(args, ["cp", "-r", args.aports + "/device/testing/device-" +
|
path_original = pmb.helpers.pmaports.find(args, f"device-{args.device}")
|
||||||
args.device, tmpdir + "/_aports/device/testing"])
|
pmb.helpers.run.user(args, ["cp", "-r", path_original,
|
||||||
|
f"{tmpdir}/_aports/device/testing"])
|
||||||
for pkgname in ["testlib", "testapp", "testsubpkg"]:
|
for pkgname in ["testlib", "testapp", "testsubpkg"]:
|
||||||
pmb.helpers.run.user(args, ["cp", "-r",
|
pmb.helpers.run.user(args, ["cp", "-r",
|
||||||
"test/testdata/pkgrel_bump/aports/" + pkgname,
|
"test/testdata/pkgrel_bump/aports/" + pkgname,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue