[arch-commits] Commit in libssh/trunk (PKGBUILD)

Anatol Pomozov anatolik at nymeria.archlinux.org
Wed Apr 23 18:19:21 UTC 2014


    Date: Wednesday, April 23, 2014 @ 20:19:21
  Author: anatolik
Revision: 211710

libssh: enable unittests to make sure Arch dependencies do not break any libssh functionailty

Modified:
  libssh/trunk/PKGBUILD

----------+
 PKGBUILD |   21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-04-23 17:41:09 UTC (rev 211709)
+++ PKGBUILD	2014-04-23 18:19:21 UTC (rev 211710)
@@ -12,20 +12,35 @@
 license=('LGPL')
 arch=('i686' 'x86_64')
 depends=('zlib' 'openssl')
-makedepends=('cmake' 'doxygen')
+makedepends=('cmake' 'cmocka' 'doxygen')
+checkdepends=('openssh')
 source=(https://red.libssh.org/attachments/download/87/${pkgname}-${pkgver}.tar.xz)
 md5sums=('66cf16e77f60913b4d54f18c92cdbf71')
 
+
+prepare() {
+  # disable the test. It is confused by our clean container setup.
+  # 'extra-x86-build' uses user 'nobody' that has a record in /etc/passwd file
+  # but $HOME envvar is set to '/build'. The test expects that $HOME corresponds to passwd file.
+  sed 's/unit_test(torture_path_expand_tilde_unix),//' -i libssh-${pkgver}/tests/unittests/torture_misc.c
+}
+
 build() {
-  mkdir build
+  mkdir build || true
   cd build
   cmake ../${pkgname}-${pkgver} \
     -DCMAKE_INSTALL_PREFIX=/usr \
     -DCMAKE_BUILD_TYPE=Release \
-    -DWITH_GSSAPI=OFF
+    -DWITH_GSSAPI=OFF \
+    -DWITH_TESTING=ON
   make
 }
 
+check() {
+  cd build
+  make test
+}
+
 package(){
   cd build
   make DESTDIR="${pkgdir}" install




More information about the arch-commits mailing list