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
This commit is contained in:
Jean Delvare 2019-03-29 16:07:39 +00:00 committed by Git OBS Bridge
parent f1e625dd6f
commit dd80d0fbdc
3 changed files with 30 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Mar 29 16:06:38 UTC 2019 - Jean Delvare <jdelvare@suse.com>
- 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 <jdelvare@suse.com> Fri Mar 29 15:34:44 UTC 2019 - Jean Delvare <jdelvare@suse.com>

View File

@ -40,6 +40,7 @@ Source: %{name}-%{version}.tar.bz2
Source1: suse-start-quilt-mode.el Source1: suse-start-quilt-mode.el
Patch1: expand.diff Patch1: expand.diff
Patch2: quilt-support-vimdiff.patch Patch2: quilt-support-vimdiff.patch
Patch3: test-faildiff-workaround-order-bug.patch
Patch4: suse-workaround-pseudo-release.patch Patch4: suse-workaround-pseudo-release.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch BuildArch: noarch
@ -61,6 +62,7 @@ un-applied, refreshed, and more.
%setup -q %setup -q
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1
%patch4 -p1 %patch4 -p1
%build %build

View File

@ -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