CI: update for device/* -> device/testing/* move (!1067)

This commit is contained in:
Minecrell 2020-03-14 09:30:58 +01:00
parent 7c5f01d892
commit 2bfba9106a
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
5 changed files with 11 additions and 10 deletions

View file

@ -30,7 +30,7 @@ wiki:
refs:
- merge_requests
changes:
- device/device-*/*
- device/*/device-*/*
before_script:
- apk -q add python3
script:
@ -99,7 +99,7 @@ kernel-kconfig:
- master
- merge_requests
changes:
- device/linux-*/config-*
- device/*/linux-*/config-*
- main/linux-*/config-*
before_script:
- .gitlab-ci/install_pmbootstrap.sh pytest

View file

@ -26,8 +26,8 @@ def get_package_version(args, package, revision, check=True):
# Run something like "git show upstream/master:main/hello-world/APKBUILD"
pmaports_dir = common.get_pmaports_dir()
pattern = pmaports_dir + "/*/" + package + "/APKBUILD"
path = glob.glob(pattern)[0][len(pmaports_dir + "/"):]
pattern = pmaports_dir + "/**/" + package + "/APKBUILD"
path = glob.glob(pattern, recursive=True)[0][len(pmaports_dir + "/"):]
apkbuild_content = common.run_git(["show", revision + ":" + path], check,
stderr)
if not apkbuild_content:

View file

@ -14,7 +14,7 @@ def get_devices():
ret = []
pmaports = (os.path.realpath(os.path.join(os.path.dirname(__file__) +
"/..")))
for path in glob.glob(pmaports + "/device/device-*/"):
for path in glob.glob(pmaports + "/device/*/device-*/"):
device = os.path.dirname(path).split("device-", 1)[1]
ret.append(device)
return sorted(ret)

View file

@ -123,7 +123,8 @@ def get_changed_packages(with_directory=False):
if with_directory:
ret.add(file)
else:
ret.add(file.split("/")[1])
# device/testing/device-something/APKBUILD -> device-something
ret.add(file.split("/")[-2])
return ret

View file

@ -47,7 +47,7 @@ def test_deviceinfo(args):
# Iterate over all devices
last_exception = None
count = 0
for folder in glob.glob(args.aports + "/device/device-*"):
for folder in glob.glob(args.aports + "/device/*/device-*"):
device = folder[len(args.aports):].split("-", 1)[1]
try:
@ -98,9 +98,9 @@ def device_dependency_check(apkbuild, path):
def test_aports_device(args):
"""
Various tests performed on the /device/device-* aports.
Various tests performed on the /device/*/device-* aports.
"""
for path in glob.glob(args.aports + "/device/device-*/APKBUILD"):
for path in glob.glob(args.aports + "/device/*/device-*/APKBUILD"):
apkbuild = pmb.parse.apkbuild(args, path)
# Depends: Require "postmarketos-base"
@ -130,7 +130,7 @@ def test_aports_device_kernel(args):
"""
# Iterate over device aports
for path in glob.glob(args.aports + "/device/device-*/APKBUILD"):
for path in glob.glob(args.aports + "/device/*/device-*/APKBUILD"):
# Parse apkbuild and kernels from subpackages
apkbuild = pmb.parse.apkbuild(args, path)
device = apkbuild["pkgname"][len("device-"):]