aboutsummaryrefslogtreecommitdiffstats
path: root/community/cpputest
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2018-03-01 03:12:39 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2018-03-01 03:12:39 +0000
commit529ca067b237c5fffce2d5627c6a7aa8e88fc1d8 (patch)
treee729fc55becdc1807ffed0e474f01196ee1d3900 /community/cpputest
parent1b3dd01a4cd42c70ff508bcc4d94529c81ab08ee (diff)
downloadaports-529ca067b237c5fffce2d5627c6a7aa8e88fc1d8.tar.bz2
aports-529ca067b237c5fffce2d5627c6a7aa8e88fc1d8.tar.xz
community/cpputest: move from testing
Diffstat (limited to 'community/cpputest')
-rw-r--r--community/cpputest/APKBUILD46
-rw-r--r--community/cpputest/test-s390x.patch17
2 files changed, 63 insertions, 0 deletions
diff --git a/community/cpputest/APKBUILD b/community/cpputest/APKBUILD
new file mode 100644
index 0000000000..2b5253d8bc
--- /dev/null
+++ b/community/cpputest/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Shiva Velmurugan <shiv@shiv.me>
+# Maintainer: Shiva Velmurugan <shiv@shiv.me>
+pkgname=cpputest
+pkgver=3.8
+pkgrel=1
+pkgdesc="A unit testing and mocking framework for C/C++"
+url="http://cpputest.github.io/"
+arch="all"
+license="BSD"
+options="!dbg"
+makedepends="cmake"
+subpackages="$pkgname-doc"
+source="https://github.com/cpputest/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz
+ test-s390x.patch
+ "
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+ mkdir -p "$builddir"/build
+ cd "$builddir"/build
+
+ cmake .. -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+check() {
+ cd "$builddir"/build
+ make test
+}
+
+package() {
+ cd "$builddir"/build
+
+ make DESTDIR="$pkgdir" install
+
+ mkdir -p "$pkgdir"/usr/lib/cmake
+ mv "$pkgdir"/usr/lib/CppUTest/cmake \
+ "$pkgdir"/usr/lib/cmake/CppUTest
+ rmdir "$pkgdir"/usr/lib/CppUTest
+
+ install -Dm644 ../COPYING \
+ "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+}
+
+sha512sums="a9592bdc9ffab8b42026ef2010f504e7e37d77fc2f197f89d23f7c9285a101059a0ec66418b914db0383974616d31b26addd1938fb27f45c3e7d9496ed0a0fac cpputest-3.8.tar.gz
+dd1366d9d692c74d1581590992f1ce927a566f9bdcf520d3097330d986d5b9c32b26cac1a2672a3eab4856350117a1e3af05e2ff4122aa11ae21434b0822d978 test-s390x.patch"
diff --git a/community/cpputest/test-s390x.patch b/community/cpputest/test-s390x.patch
new file mode 100644
index 0000000000..1317511263
--- /dev/null
+++ b/community/cpputest/test-s390x.patch
@@ -0,0 +1,17 @@
+ref https://github.com/cpputest/cpputest/issues/1004
+
+diff --git a/tests/CppUTestExt/MockSupport_cTest.cpp b/tests/CppUTestExt/MockSupport_cTest.cpp
+index 8fc55ec..5188857 100644
+--- a/tests/CppUTestExt/MockSupport_cTest.cpp
++++ b/tests/CppUTestExt/MockSupport_cTest.cpp
+@@ -186,8 +186,8 @@ TEST(MockSupport_c, outputParameters_differentType)
+
+ TEST(MockSupport_c, outputParametersOfType)
+ {
+- long param = 1;
+- const long retval = 2;
++ int param = 1;
++ const int retval = 2;
+ mock_c()->installCopier("typeName", typeCopy);
+ mock_c()->expectOneCall("foo")->withOutputParameterOfTypeReturning("typeName", "out", &retval);
+ mock_c()->actualCall("foo")->withOutputParameterOfType("typeName", "out", &param);