[openssh-commits] [openssh] 03/03: Allow setting LTESTS in repo variables.
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri May 23 17:18:07 AEST 2025
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 7674c03caed80cb3565d14690c92068a14051967
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Fri May 23 16:39:18 2025 +1000
Allow setting LTESTS in repo variables.
---
.github/configs | 9 +++++++++
.github/workflows/c-cpp.yml | 14 +++++++++++---
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/.github/configs b/.github/configs
index a1059f935..aa363be7d 100755
--- a/.github/configs
+++ b/.github/configs
@@ -13,6 +13,10 @@ if [ "$config" = "" ]; then
config="default"
fi
+if [ ! -z "${LTESTS}" ]; then
+ OVERRIDE_LTESTS="${LTESTS}"
+fi
+
unset CC CFLAGS CPPFLAGS LDFLAGS LTESTS SUDO
TEST_TARGET="tests compat-tests"
@@ -394,5 +398,10 @@ if [ -x "$(which plink 2>/dev/null)" ]; then
export REGRESS_INTEROP_PUTTY
fi
+if [ ! -z "${OVERRIDE_LTESTS}" ]; then
+ echo >&2 "Overriding LTESTS, was '${LTESTS}', now '${OVERRIDE_LTESTS}'"
+ LTESTS="${OVERRIDE_LTESTS}"
+fi
+
export CC CFLAGS CPPFLAGS LDFLAGS LTESTS SUDO
export TEST_TARGET TEST_SSH_UNSAFE_PERMISSIONS TEST_SSH_FAIL_FATAL
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
index 43380df42..4acb1f5f2 100644
--- a/.github/workflows/c-cpp.yml
+++ b/.github/workflows/c-cpp.yml
@@ -1,5 +1,15 @@
name: C/C++ CI
+# For testing, you can set variables in your repo (Repo -> Settings ->
+# Security -> Actions -> Variables) to restrict the tests that are run.
+# The supported variables are:
+#
+# RUN_ONLY_TARGET_CONFIG: Run only the single matching target and config,
+# separated by spaces, eg "ubuntu-latest default". All other tests will
+# fail immediately.
+#
+# LTESTS: Override the set of tests run.
+
on:
push:
paths: [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/c-cpp.yml' ]
@@ -112,9 +122,6 @@ jobs:
runs-on: ${{ matrix.target }}
steps:
- name: check RUN_ONLY_TARGET_CONFIG
- # For testing, you can set the repo variable RUN_ONLY_TARGET_CONFIG in
- # your repo (Repo -> Settings -> Security -> Actions -> Variables) to
- # run only that test config, eg "ubuntu-latest default".
if: vars.RUN_ONLY_TARGET_CONFIG != ''
run: sh -c 'if [ "${{ vars.RUN_ONLY_TARGET_CONFIG }}" != "${{ matrix.target }} ${{matrix.config }}" ]; then exit 1; else exit 0; fi'
- name: set cygwin git params
@@ -149,6 +156,7 @@ jobs:
env:
TEST_SSH_UNSAFE_PERMISSIONS: 1
TEST_SSH_HOSTBASED_AUTH: yes
+ LTESTS: ${{ vars.LTESTS }}
- name: show logs
if: failure()
run: for i in regress/failed*.log; do echo ====; echo logfile $i; echo =====; cat $i; done
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list