From: Darren Tucker Date: Fri, 23 May 2025 06:39:18 +0000 (+1000) Subject: Allow setting LTESTS in repo variables. X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=7674c03caed80cb3565d14690c92068a14051967;p=thirdparty%2Fopenssh-portable.git Allow setting LTESTS in repo variables. --- 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