Skip to content

Commit

Permalink
Clean up PKGBUILD dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
rootmos committed Mar 5, 2024
1 parent 3f22783 commit 1d3cbf0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
5 changes: 2 additions & 3 deletions build/archlinux/PKGBUILD.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ pkgname=$BUILD_PROJECT
pkgver=$BUILD_VERSION
pkgrel=1
arch=("x86_64")
depends=("lua" "python" "nodejs-shared" "bash")
makedepends=("make" "gcc" "pkgconf" "bpf")
checkdepends=("python-toml") # TODO until python >= 3.11
depends=("lua" "python" "nodejs-shared")
makedepends=("bash" "make" "gcc" "pkgconf" "bpf" "debugedit")
url=$BUILD_REPO_URL
source=("$pkgname-$pkgver.zip::$BUILD_SOURCE_TARBALL_URL")
sha256sums=("$SOURCE_TARBALL_SHA256")
Expand Down
15 changes: 12 additions & 3 deletions tools/test-runner
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,19 @@ import signal
import subprocess
import sys
import tempfile
import toml
import uuid

try:
import tomllib
def toml_load(path):
with open(path, "rb") as f:
return tomllib.load(f)
except ImportError:
import toml
def toml_load(path):
with open(path, "r") as f:
return toml.load(f)

TOOLS = os.environ.get("TOOLS", os.path.dirname(os.path.realpath(__file__)))
CAPTURE = os.environ.get("CAPTURE", os.path.join(TOOLS, "capture"))
STRACE_LOG_WATCH = os.environ.get("STRACE_LOG_WATCH", os.path.join(TOOLS, "strace-log-watch"))
Expand Down Expand Up @@ -68,8 +78,7 @@ class Test:
raise RuntimeError("unable to read test spec", fn)
self.fn = fn

with open(fn, "r") as f:
self.spec = toml.load(f)
self.spec = toml_load(fn)
logger.debug(f"test spec: {self.spec}")

self.cwd = os.path.realpath(os.path.dirname(fn))
Expand Down

0 comments on commit 1d3cbf0

Please sign in to comment.