CI: update for device/* -> device/testing/* move (!1067)
This commit is contained in:
parent
7c5f01d892
commit
2bfba9106a
5 changed files with 11 additions and 10 deletions
|
@ -30,7 +30,7 @@ wiki:
|
||||||
refs:
|
refs:
|
||||||
- merge_requests
|
- merge_requests
|
||||||
changes:
|
changes:
|
||||||
- device/device-*/*
|
- device/*/device-*/*
|
||||||
before_script:
|
before_script:
|
||||||
- apk -q add python3
|
- apk -q add python3
|
||||||
script:
|
script:
|
||||||
|
@ -99,7 +99,7 @@ kernel-kconfig:
|
||||||
- master
|
- master
|
||||||
- merge_requests
|
- merge_requests
|
||||||
changes:
|
changes:
|
||||||
- device/linux-*/config-*
|
- device/*/linux-*/config-*
|
||||||
- main/linux-*/config-*
|
- main/linux-*/config-*
|
||||||
before_script:
|
before_script:
|
||||||
- .gitlab-ci/install_pmbootstrap.sh pytest
|
- .gitlab-ci/install_pmbootstrap.sh pytest
|
||||||
|
|
|
@ -26,8 +26,8 @@ def get_package_version(args, package, revision, check=True):
|
||||||
|
|
||||||
# Run something like "git show upstream/master:main/hello-world/APKBUILD"
|
# Run something like "git show upstream/master:main/hello-world/APKBUILD"
|
||||||
pmaports_dir = common.get_pmaports_dir()
|
pmaports_dir = common.get_pmaports_dir()
|
||||||
pattern = pmaports_dir + "/*/" + package + "/APKBUILD"
|
pattern = pmaports_dir + "/**/" + package + "/APKBUILD"
|
||||||
path = glob.glob(pattern)[0][len(pmaports_dir + "/"):]
|
path = glob.glob(pattern, recursive=True)[0][len(pmaports_dir + "/"):]
|
||||||
apkbuild_content = common.run_git(["show", revision + ":" + path], check,
|
apkbuild_content = common.run_git(["show", revision + ":" + path], check,
|
||||||
stderr)
|
stderr)
|
||||||
if not apkbuild_content:
|
if not apkbuild_content:
|
||||||
|
|
|
@ -14,7 +14,7 @@ def get_devices():
|
||||||
ret = []
|
ret = []
|
||||||
pmaports = (os.path.realpath(os.path.join(os.path.dirname(__file__) +
|
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]
|
device = os.path.dirname(path).split("device-", 1)[1]
|
||||||
ret.append(device)
|
ret.append(device)
|
||||||
return sorted(ret)
|
return sorted(ret)
|
||||||
|
|
|
@ -123,7 +123,8 @@ def get_changed_packages(with_directory=False):
|
||||||
if with_directory:
|
if with_directory:
|
||||||
ret.add(file)
|
ret.add(file)
|
||||||
else:
|
else:
|
||||||
ret.add(file.split("/")[1])
|
# device/testing/device-something/APKBUILD -> device-something
|
||||||
|
ret.add(file.split("/")[-2])
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ def test_deviceinfo(args):
|
||||||
# Iterate over all devices
|
# Iterate over all devices
|
||||||
last_exception = None
|
last_exception = None
|
||||||
count = 0
|
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]
|
device = folder[len(args.aports):].split("-", 1)[1]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -98,9 +98,9 @@ def device_dependency_check(apkbuild, path):
|
||||||
|
|
||||||
def test_aports_device(args):
|
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)
|
apkbuild = pmb.parse.apkbuild(args, path)
|
||||||
|
|
||||||
# Depends: Require "postmarketos-base"
|
# Depends: Require "postmarketos-base"
|
||||||
|
@ -130,7 +130,7 @@ def test_aports_device_kernel(args):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Iterate over device aports
|
# 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
|
# Parse apkbuild and kernels from subpackages
|
||||||
apkbuild = pmb.parse.apkbuild(args, path)
|
apkbuild = pmb.parse.apkbuild(args, path)
|
||||||
device = apkbuild["pkgname"][len("device-"):]
|
device = apkbuild["pkgname"][len("device-"):]
|
||||||
|
|
Loading…
Reference in a new issue