]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Allow setting LTESTS in repo variables.
authorDarren Tucker <dtucker@dtucker.net>
Fri, 23 May 2025 06:39:18 +0000 (16:39 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 23 May 2025 07:04:55 +0000 (17:04 +1000)
.github/configs
.github/workflows/c-cpp.yml

index a1059f9359430199aa6543cadcdd91422060ad5c..aa363be7d3ff418d8688caa65534726dadc5f614 100755 (executable)
@@ -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
index 43380df420881ab34aafd50b8814cb765c65cfca..4acb1f5f24783279e8ec9613fa4dcc4f1e2d355b 100644 (file)
@@ -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