summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBazaah2023-08-27 14:10:11 +0000
committerBazaah2023-09-09 17:10:46 +0000
commitfe6655442ef2f613d6d54b829184e30ff8e55125 (patch)
tree9bf9e9f0552f7c6ae736e999c63eebd4e5940110
parent343f78cd0787f220f2948adef12824c3476152b5 (diff)
downloadaur-fe6655442ef2f613d6d54b829184e30ff8e55125.tar.gz
justfile: add cexec, ctest, repackage targets
- cexec Executes the given arg list inside the chroot > Build the 'osd' CMake target `just cexec make -j$(nproc) -C build osd` - ctest Runs ctest (with the optional args) inside the chroot > Run testsuite `just ctest` > Rerun only failed tests `just ctest --retry-failed` > Run a regex filtered list of tests `just ctest -R some_unittest` - repackage Repackages the project without triggering a rebuild
-rw-r--r--justfile15
1 files changed, 15 insertions, 0 deletions
diff --git a/justfile b/justfile
index 5d87d429a4b0..126f9cc75a81 100644
--- a/justfile
+++ b/justfile
@@ -16,6 +16,17 @@ build:
@$Say Building @{{PkgBuild}} via chroot
makechrootpkg -c -r {{ChrootPath}} -d "/tmp:/tmp" -C -n -l {{PkgVer}}_{{PkgRel}}
+# Repackage without rebuilding
+repackage:
+ @$Say Repackaging @{{PkgBuild}} via chroot
+ makechrootpkg -r {{ChrootPath}} -l {{PkgVer}}_{{PkgRel}} -- --skipint --noprepare --noextract --nocheck --repackage --force
+
+# Run a command in the chroot environment
+cexec +args: (_cexec "." args)
+
+# Run ctest in the chroot environment
+ctest *args: (_cexec "build" "ctest" args)
+
# Create and update the base chroot
chroot: (_update_chroot ChrootBase)
@@ -65,6 +76,10 @@ upload pkg="@all": (_upload pkg)
$Say Updating chroot packages @$cbase
arch-nspawn $cbase pacman -Syu
+# Exec into the chroot to a path relative to the workdir, and run the given args
+_cexec path +args:
+ arch-nspawn {{ChrootActive}} --chdir /build/{{PkgBase}}/src/{{PkgBase}}-{{PkgVer}}/{{path}} sh -c {{quote(trim(args))}}
+
# Script to upload a comma separated list of packages to the active Github release
_upload $pkgstring:
#!/usr/bin/env bash