From dd80d0fbdc417346816266278bdf3d2b54ad5db2358ca014fd8f2b32850f3c56 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Fri, 29 Mar 2019 16:07:39 +0000 Subject: [PATCH] Avoid false-positive test suite failures in the build service OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/quilt?expand=0&rev=120 --- quilt.changes | 6 ++++++ quilt.spec | 2 ++ test-faildiff-workaround-order-bug.patch | 22 ++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 test-faildiff-workaround-order-bug.patch diff --git a/quilt.changes b/quilt.changes index e00d5ab..caed137 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 29 16:06:38 UTC 2019 - Jean Delvare + +- test-faildiff-workaround-order-bug.patch: Avoid false-positive + test suite failures in the build service. + ------------------------------------------------------------------- Fri Mar 29 15:34:44 UTC 2019 - Jean Delvare diff --git a/quilt.spec b/quilt.spec index afe463d..31e0ddc 100644 --- a/quilt.spec +++ b/quilt.spec @@ -40,6 +40,7 @@ Source: %{name}-%{version}.tar.bz2 Source1: suse-start-quilt-mode.el Patch1: expand.diff Patch2: quilt-support-vimdiff.patch +Patch3: test-faildiff-workaround-order-bug.patch Patch4: suse-workaround-pseudo-release.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -61,6 +62,7 @@ un-applied, refreshed, and more. %setup -q %patch1 -p1 %patch2 -p1 +%patch3 -p1 %patch4 -p1 %build diff --git a/test-faildiff-workaround-order-bug.patch b/test-faildiff-workaround-order-bug.patch new file mode 100644 index 0000000..af3659b --- /dev/null +++ b/test-faildiff-workaround-order-bug.patch @@ -0,0 +1,22 @@ +The test suite does not differentiate between stdout and stderr. When +messages are printed to both, the order in which they will reach us +is apparently no guaranteed. Ideally this would be deterministic, but +until then, I don't want to waste Build Service resources with +useless rebuilds, so let's just test stdout and stderr separately. +--- + test/faildiff.test | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/test/faildiff.test ++++ b/test/faildiff.test +@@ -27,8 +27,9 @@ What happens on binary files? + > File test.bin added to patch %{P}test.diff + + $ printf "\\003\\000\\001" > test.bin +- $ quilt diff -pab --no-index ++ $ quilt diff -pab --no-index 2>/dev/null + >~ (Files|Binary files) a/test\.bin and b/test\.bin differ ++ $ quilt diff -pab --no-index >/dev/null + > Diff failed on file 'test.bin', aborting + $ echo %{?} + > 1