pmb: Look for device/* files in device/*/... instead (!1879)

In the future, device ports will be located in a subdirectory
below device/... (e.g. device/testing/device-...).
Replace all occurrences of device/* with a glob that checks the
subdirectories instead.

Note: To ensure that this always works properly we should also add some
checks that all devices are indeed located under one of the supported
subdirectories (i.e. testing/community/main).

Change the glob for pmaports to <aports>/**/APKBUILD.
This allows using subdirectories for organization outside of device/
as well.
This commit is contained in:
Minecrell 2020-02-26 12:13:26 +01:00 committed by Oliver Smith
parent c399ff81a1
commit fb8de5a553
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
20 changed files with 62 additions and 40 deletions

View file

@ -32,9 +32,9 @@ def args(tmpdir, request):
pmb.helpers.run.user(args, ["cp", "-r", path_dev, tmpdir + "/main"])
# Copy the linux-lg-mako aport (we currently copy patches from there)
pmb.helpers.run.user(args, ["mkdir", "-p", tmpdir + "/device"])
path_mako = args._aports_real + "/device/linux-lg-mako"
pmb.helpers.run.user(args, ["cp", "-r", path_mako, tmpdir + "/device"])
pmb.helpers.run.user(args, ["mkdir", "-p", tmpdir + "/device/testing"])
path_mako = args._aports_real + "/device/testing/linux-lg-mako"
pmb.helpers.run.user(args, ["cp", "-r", path_mako, tmpdir + "/device/testing"])
return args
@ -63,9 +63,9 @@ def generate(args, monkeypatch, answers):
pmb.aportgen.generate(args, "linux-testsuite-testdevice")
monkeypatch.undo()
apkbuild_path = (args.aports + "/device/device-testsuite-testdevice/"
apkbuild_path = (args.aports + "/device/testing/device-testsuite-testdevice/"
"APKBUILD")
apkbuild_path_linux = (args.aports + "/device/"
apkbuild_path_linux = (args.aports + "/device/testing/"
"linux-testsuite-testdevice/APKBUILD")
# The build fails if the email is not a valid email, so remove them just for tests