diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-08-07 18:50:54 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-08-07 18:55:20 +0000 |
commit | 84fa53cb3e2eb62d7eadba3ae1a3a81090413e5f (patch) | |
tree | bcedb2f343397ddceddfee1142b5c29d757c7688 /testing/perl-mail-sendmail/APKBUILD | |
parent | 702d5fdb2af2c4fab8782c59cd6d8ccc977936c1 (diff) | |
download | aports-84fa53cb3e2eb62d7eadba3ae1a3a81090413e5f.tar.bz2 aports-84fa53cb3e2eb62d7eadba3ae1a3a81090413e5f.tar.xz |
testing/perl-mail-sendmail: run test against dummy smtp
the test suite will send an actual email to the atuthor. We don't want
to do that and some of the build servers may have smtp port blocked.
Create a dummy smtp server on localhost and patch test to use that.
Diffstat (limited to 'testing/perl-mail-sendmail/APKBUILD')
-rw-r--r-- | testing/perl-mail-sendmail/APKBUILD | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/testing/perl-mail-sendmail/APKBUILD b/testing/perl-mail-sendmail/APKBUILD index 2213d7acda..41cfd42947 100644 --- a/testing/perl-mail-sendmail/APKBUILD +++ b/testing/perl-mail-sendmail/APKBUILD @@ -4,7 +4,7 @@ pkgname=perl-mail-sendmail _pkgreal=Mail-Sendmail pkgver=0.80 -pkgrel=0 +pkgrel=1 pkgdesc="Simple platform independent mailer" url="http://search.cpan.org/dist/Mail-Sendmail/" arch="noarch" @@ -13,8 +13,11 @@ cpandepends="" cpanmakedepends=" " depends="$cpandepends" makedepends="perl-dev $cpanmakedepends" +checkdepends="python3" subpackages="$pkgname-doc" -source="http://search.cpan.org/CPAN/authors/id/N/NE/NEILB/$_pkgreal-$pkgver.tar.gz" +source="http://search.cpan.org/CPAN/authors/id/N/NE/NEILB/$_pkgreal-$pkgver.tar.gz + test-localhost.patch + fake-smtp.py" builddir="$srcdir/$_pkgreal-$pkgver" prepare() { @@ -33,7 +36,15 @@ build() { check() { cd "$builddir" - make test + # run dummy smtp server + python3 "$srcdir"/fake-smtp.py & + local pid=$! + local rc=0 + if ! make test; then + rc=1 + fi + kill $pid + return $rc } package() { @@ -42,4 +53,6 @@ package() { find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete } -sha512sums="848ec471938d679645dfb4e032a33d35e49655a336dc6ff3a24ffa35606bff77e73162af672d1a60ad3a7bf571113e802fc42d6cb9a072cdca0d89f707f54a08 Mail-Sendmail-0.80.tar.gz" +sha512sums="848ec471938d679645dfb4e032a33d35e49655a336dc6ff3a24ffa35606bff77e73162af672d1a60ad3a7bf571113e802fc42d6cb9a072cdca0d89f707f54a08 Mail-Sendmail-0.80.tar.gz +2592c4aafd9f58d9e4f8c0f78e8d87e7e6160b4a53aa73b929ad12d26d677f8a7baec540a57a8edabbba6f05bd33c9e2dc5ee707cfaaccd14837a6ddc681d742 test-localhost.patch +dbff85dc3924274c2f640e0f6ea4d782c0221e841763fb122c9942ef8e2c5d7a0c73aa2cfd1f7b59708fe27a392a000dcfbc2a04ad7e7e8885d21a27df339410 fake-smtp.py" |