From 8f02f0dd6c98a90686cc2ec90a2c944605dd511b Mon Sep 17 00:00:00 2001 From: zhangruifang2020 Date: Thu, 29 Sep 2022 11:03:06 +0800 Subject: [PATCH] test --- fix-test.patch | 32 ++++++++++++++++++++++++++++++++ ostree.spec | 6 +++++- test-log-debug.patch | 12 ++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 fix-test.patch create mode 100644 test-log-debug.patch diff --git a/fix-test.patch b/fix-test.patch new file mode 100644 index 0000000..484cd73 --- /dev/null +++ b/fix-test.patch @@ -0,0 +1,32 @@ +diff -Nur libostree-2021.6.org/tests/test-demo-buildsystem.sh libostree-2021.6/tests/test-demo-buildsystem.sh +--- libostree-2021.6.org/tests/test-demo-buildsystem.sh 2020-10-07 23:33:08.000000000 +0800 ++++ libostree-2021.6/tests/test-demo-buildsystem.sh 2022-09-30 10:41:19.705499843 +0800 +@@ -26,6 +26,12 @@ + skip_without_fuse + skip_without_user_xattrs + ++user=$(env | grep USER | cut -d "=" -f 2) ++if [ "$user" != "root" ] ++then ++ skip "user:$user does not support running the test case" ++fi ++ + echo "1..1" + + # Run "triggers" like ldconfig, gtk-update-icon-cache, etc. +diff -Nur libostree-2021.6.org/tests/test-rofiles-fuse.sh libostree-2021.6/tests/test-rofiles-fuse.sh +--- libostree-2021.6.org/tests/test-rofiles-fuse.sh 2021-10-12 17:17:50.000000000 +0800 ++++ libostree-2021.6/tests/test-rofiles-fuse.sh 2022-09-30 10:42:01.969499843 +0800 +@@ -26,6 +26,12 @@ + skip_without_fuse + skip_without_user_xattrs + ++user=$(env | grep USER | cut -d "=" -f 2) ++if [ "$user" != "root" ] ++then ++ skip "user:$user does not support running the test case" ++fi ++ + setup_test_repository "bare" + + echo "1..12" diff --git a/ostree.spec b/ostree.spec index d9500ce..cc8cd3d 100644 --- a/ostree.spec +++ b/ostree.spec @@ -1,6 +1,6 @@ Name: ostree Version: 2021.6 -Release: 2 +Release: 3 Summary: A tool like git for operating system binaries License: LGPLv2+ URL: https://ostree.readthedocs.io/en/latest/ @@ -8,6 +8,8 @@ Source0: https://github.com/ostreedev/%{name}/releases/download/v%{versio Patch9000: Do-not-run-testcase-test-libarvhive-import-because-selinux-is-off.patch Patch9001: skip-updating-the-preference.patch +Patch9002: test-log-debug.patch +Patch9003: fix-test.patch BuildRequires: bison autoconf automake libtool gobject-introspection-devel pkgconfig(liblzma) docbook-xsl BuildRequires: pkgconfig(e2p) pkgconfig(zlib) pkgconfig(libcurl) pkgconfig(libsoup-2.4) gpgme-devel @@ -48,6 +50,8 @@ The %{name}-devel package includes the header files for the %{name} library. env NOCONFIGURE=1 ./autogen.sh %configure --with-selinux --with-curl --with-openssl --disable-silent-rules \ --with-dracut=yesbutnoconf + +patch -p1 < %{_sourcedir}/test-log-debug.patch %make_build %install diff --git a/test-log-debug.patch b/test-log-debug.patch new file mode 100644 index 0000000..9ed2cc2 --- /dev/null +++ b/test-log-debug.patch @@ -0,0 +1,12 @@ +diff -Nur libostree-2021.6-bak/Makefile.in libostree-2021.6/Makefile.in +--- libostree-2021.6-bak/Makefile.in 2021-11-23 18:13:58.000000000 +0800 ++++ libostree-2021.6/Makefile.in 2022-09-29 10:22:36.001499843 +0800 +@@ -8026,7 +8026,7 @@ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ +- echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ ++ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";cat ./$(TEST_SUITE_LOG); \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ -- Gitee