public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: test-pr: Fix behavior when branch is not rebased
@ 2026-09-11 13:18 Ondrej Mosnacek
  0 siblings, 0 replies; only message in thread
From: Ondrej Mosnacek @ 2026-09-11 13:18 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : f80b045d097d953bd40e0849e67a2a80604f9adb
            Author : Ondrej Mosnacek <omosnace@redhat.com>
            Date   : 2020-08-12T08:02:56+00:00
            Stats  : +1/-1 in 1 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/f80b045d097d953bd40e0849e67a2a80604f9adb?branch=pr775-checkpolicy-revdeps

            Log:
            test-pr: Fix behavior when branch is not rebased

Since the current command simply compares the PR's HEAD with the master
branch, it will include any new changes in master as modified tests and
run tests on them as well.

Fix it by using `git log` on `origin/master..HEAD`, which will return
files modified by commits in the PR branch which are not part of master,
which is what we really want.

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>

---
diff --git a/tests-pr.yml b/tests-pr.yml
index 7d04192..f1e7fab 100644
--- a/tests-pr.yml
+++ b/tests-pr.yml
@@ -5,7 +5,7 @@
   pre_tasks:
     - name: Generate list of tests in this PR
       shell: |
-          git diff --stat --name-only origin/master HEAD | sed '/\//!d;s#\(.*\)/.*#\1#' | sort -u | xargs
+          git log --format= --stat --name-only origin/master..HEAD | sed '/\//!d;s#\(.*\)/.*#\1#' | sort -u | xargs
       delegate_to: localhost
       register: tests_list
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-11 13:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 13:18 [tests/selinux] pr775-checkpolicy-revdeps: test-pr: Fix behavior when branch is not rebased Ondrej Mosnacek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox