Patches for Yocto layers and components that do not have their own list
 help / color / mirror / Atom feed
From: Mark Hatle <mark.hatle@kernel.crashing.org>
To: yocto-patches@lists.yoctoproject.org, paul@pbarker.dev,
	changqing.li@windriver.com
Cc: richard.purdie@linuxfoundation.org
Subject: [pseudo][PATCH 1/5] run_tests.sh: Allow the user to specify specific tests to run
Date: Tue, 12 May 2026 17:20:39 -0500	[thread overview]
Message-ID: <1778624443-20857-2-git-send-email-mark.hatle@kernel.crashing.org> (raw)
In-Reply-To: <1778624443-20857-1-git-send-email-mark.hatle@kernel.crashing.org>

From: Mark Hatle <mark.hatle@amd.com>

AI-Generated: Implemented with the assistance of github CoPilot (Claude Opus 4.6)

Signed-off-by: Mark Hatle <mark.hatle@amd.com>
---
 run_tests.sh | 32 +++++++++++++++++++++++++++++---
 1 file changed, 29 insertions(+), 3 deletions(-)

diff --git a/run_tests.sh b/run_tests.sh
index 1b6cfb9..306a561 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -4,11 +4,15 @@
 #
 
 opt_verbose=
+test_args=()
 
 usage()
 {
     echo >&2 "usage:"
-    echo >&2 "  run_tests [-v|--verbose]"
+    echo >&2 "  run_tests [-v|--verbose] [test ...]"
+    echo >&2 ""
+    echo >&2 "If no tests are specified, all tests are run."
+    echo >&2 "Tests can be specified as filenames (test-fstat.sh) or basenames (test-fstat)."
     exit 1
 }
 
@@ -19,9 +23,15 @@ do
         -v | --verbose)
                 opt_verbose=-v
                 ;;
-        *)
+        -h | --help)
+                usage
+                ;;
+        -*)
                 usage
                 ;;
+        *)
+                test_args+=("$arg")
+                ;;
         esac
 done
 
@@ -36,7 +46,23 @@ num_failed_tests=0
 
 tmplog="$(mktemp pseudo.log.XXXXXXXX)"
 
-for file in test/test*.sh
+if [ ${#test_args[@]} -gt 0 ]; then
+    test_files=()
+    for t in "${test_args[@]}"; do
+        # Strip directory prefix and ensure .sh suffix
+        t="${t##*/}"
+        t="${t%.sh}.sh"
+        if [ -f "test/$t" ]; then
+            test_files+=("test/$t")
+        else
+            echo >&2 "Warning: test/$t not found, skipping."
+        fi
+    done
+else
+    test_files=(test/test*.sh)
+fi
+
+for file in "${test_files[@]}"
 do
     filename=${file#test/}
     let num_tests++
-- 
1.8.3.1



  reply	other threads:[~2026-05-12 22:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12 22:20 [pseudo][PATCH 0/5] Fix rename/renameat w/ hardlinks Mark Hatle
2026-05-12 22:20 ` Mark Hatle [this message]
2026-05-12 22:20 ` [pseudo][PATCH 2/5] tests: Add mv then hardlink testing Mark Hatle
2026-05-12 22:20 ` [pseudo][PATCH 3/5] renameat2/renameat: only ignore when both old and new path are not in PSEUDO_INCLUDE_PATHS Mark Hatle
2026-05-12 22:20 ` [pseudo][PATCH 4/5] rename: " Mark Hatle
2026-05-12 22:20 ` [pseudo][PATCH 5/5] Makefile.in: Bump version to 1.9.7 Mark Hatle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1778624443-20857-2-git-send-email-mark.hatle@kernel.crashing.org \
    --to=mark.hatle@kernel.crashing.org \
    --cc=changqing.li@windriver.com \
    --cc=paul@pbarker.dev \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=yocto-patches@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox