]> git.pld-linux.org Git - packages/libgit2.git/commitdiff
omit tests requiring online access auto/th/libgit2-0.18.0-1
authorKacper Kornet <draenog@pld-linux.org>
Fri, 7 Jun 2013 19:40:56 +0000 (20:40 +0100)
committerKacper Kornet <draenog@pld-linux.org>
Fri, 7 Jun 2013 19:42:23 +0000 (20:42 +0100)
libgit2-test-online.patch [new file with mode: 0644]
libgit2.spec

diff --git a/libgit2-test-online.patch b/libgit2-test-online.patch
new file mode 100644 (file)
index 0000000..8154317
--- /dev/null
@@ -0,0 +1,18 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 10caa16..714d86c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -359,7 +359,12 @@ IF (BUILD_CLAR)
+       ENDIF ()
+       ENABLE_TESTING()
+-      ADD_TEST(libgit2_clar libgit2_clar -ionline)
++        IF (ONLINE_TESTS)
++          ADD_TEST(libgit2_clar libgit2_clar -ionline)
++        ELSE ()
++          ADD_TEST(libgit2_clar libgit2_clar -xonline)
++        ENDIF ()
++
+ ENDIF ()
+ IF (TAGS)
index 831115f99f8e87117228b4d10a8883ac57f927aa..f5caed33c9bc2ccace9d2ad3441ef45e7e4bf01e 100644 (file)
@@ -1,6 +1,7 @@
 #
 # Conditional build:
 %bcond_without tests           # build without tests
+%bcond_with    tests_online    # build with tests reqiuring online access
 
 Summary:       C git library
 Summary(pl.UTF-8):     Biblioteka git dla C
@@ -12,6 +13,7 @@ Group:                Libraries
 Source0:       https://github.com/libgit2/libgit2/archive/v%{version}.tar.gz?/%{name}-version.tgz
 # Source0-md5: ce6845df0dd084ef2633a69dba64929c
 Patch0:                %{name}-http-parser.patch
+Patch1:                %{name}-test-online.patch
 URL:           http://libgit2.github.com/
 BuildRequires: cmake >= 2.6
 BuildRequires: http-parser-devel
@@ -49,11 +51,12 @@ Pliki nagłówkowe biblioteki libgit2.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 install -d build
 cd build
-%cmake ..
+%cmake %{?with_tests_online:-DONLINE_TESTS=1} ..
 %{__make}
 
 %{?with_tests:%{__make} test ARGS="-V"}
This page took 0.035082 seconds and 4 git commands to generate.