summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-03-17 17:40:35 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-03-17 17:54:21 +0100
commit09af939b5d191189764a0f15dc491434613bfe4c (patch)
tree0235773305ff42817de3c91030625fdec1d35186 /main
parentfc98e032106714f3f528eb43bd928b76883bb05d (diff)
downloadaports-09af939b5d191189764a0f15dc491434613bfe4c.zip
main/ldb: run tests
Diffstat (limited to 'main')
-rw-r--r--main/ldb/APKBUILD11
-rw-r--r--main/ldb/disable-python-tests.patch27
2 files changed, 36 insertions, 2 deletions
diff --git a/main/ldb/APKBUILD b/main/ldb/APKBUILD
index 6829f9b995d..ab030d604e7 100644
--- a/main/ldb/APKBUILD
+++ b/main/ldb/APKBUILD
@@ -10,7 +10,8 @@ makedepends="libtirpc-dev tevent-dev py2-tevent tdb-dev py-tdb talloc-dev
python2-dev python3-dev popt-dev cmocka-dev"
subpackages="$pkgname-dev py2-$pkgname:_py2 py3-$pkgname:_py3 $pkgname-tools"
source="https://www.samba.org/ftp/pub/ldb/$pkgname-$pkgver.tar.gz
- fix-memory-leak-on-module-context.patch"
+ fix-memory-leak-on-module-context.patch
+ disable-python-tests.patch"
builddir="$srcdir/$pkgname-$pkgver"
build() {
@@ -31,6 +32,11 @@ build() {
make
}
+check() {
+ cd "$builddir"
+ make check
+}
+
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
@@ -62,4 +68,5 @@ tools() {
}
sha512sums="31b29a2a991038910830cb47b02b7f08e1958638d073d5f1602a2657c4005c7e5f5f2c2f7972eeddef462d8c70aaad7f02ddf901cb50f1b1bbafa0c22498973d ldb-1.3.2.tar.gz
-7524e23ff8fe378fc4e24ac9e93bfa27012a2a646c5411d419d0181ffd4192fdbb0c3b28f4e2a2e43cf93a1340eeaf526699ac16d846b616612d922abd2595aa fix-memory-leak-on-module-context.patch"
+7524e23ff8fe378fc4e24ac9e93bfa27012a2a646c5411d419d0181ffd4192fdbb0c3b28f4e2a2e43cf93a1340eeaf526699ac16d846b616612d922abd2595aa fix-memory-leak-on-module-context.patch
+49b68f36caebbad8d36682f4a342644bc9df6ebb39c625a6aec6d197d63e52bff137c1b9c188a0c7e8365fdc0ac936f56e761cf8677034a7a70fd5717a130bbb disable-python-tests.patch"
diff --git a/main/ldb/disable-python-tests.patch b/main/ldb/disable-python-tests.patch
new file mode 100644
index 00000000000..040557402b0
--- /dev/null
+++ b/main/ldb/disable-python-tests.patch
@@ -0,0 +1,27 @@
+Do not run python tests, they take eternity to finish.
+
+--- a/wscript
++++ b/wscript
+@@ -370,21 +370,13 @@
+ ret = samba_utils.RUN_COMMAND(cmd)
+ print("testsuite returned %d" % ret)
+
+- tmp_dir = os.path.join(test_prefix, 'tmp')
+- if not os.path.exists(tmp_dir):
+- os.mkdir(tmp_dir)
+- pyret = samba_utils.RUN_PYTHON_TESTS(
+- ['tests/python/api.py'],
+- extra_env={'SELFTEST_PREFIX': test_prefix})
+- print("Python testsuite returned %d" % pyret)
+-
+ cmocka_ret = 0
+ for test_exe in ['ldb_tdb_mod_op_test',
+ 'ldb_msg_test']:
+ cmd = os.path.join(Utils.g_module.blddir, test_exe)
+ cmocka_ret = cmocka_ret or samba_utils.RUN_COMMAND(cmd)
+
+- sys.exit(ret or pyret or cmocka_ret)
++ sys.exit(ret or cmocka_ret)
+
+ def dist():
+ '''makes a tarball for distribution'''