From 14e6ac0339392fc7dcb3928b0202a197e1198569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 29 Oct 2019 14:32:08 +0100 Subject: [PATCH] Fix tests subpackage test script popd and pushd are bash-specific. Use bash in shell bang. Prevent from evaluating the script in here-document definition. Create a temporary directory correctly. Also correct a typo in a comment. --- perl-LDAP.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/perl-LDAP.spec b/perl-LDAP.spec index 8b9e623..de9fb4b 100644 --- a/perl-LDAP.spec +++ b/perl-LDAP.spec @@ -9,7 +9,7 @@ Name: perl-LDAP Version: 0.66 -Release: 5%{?dist} +Release: 6%{?dist} Epoch: 1 Summary: LDAP Perl module License: GPL+ or Artistic @@ -184,12 +184,12 @@ find %{buildroot} -type f -name .packlist -delete mkdir -p %{buildroot}/%{_libexecdir}/%{name} # FIXME: Generators should scan these non-executable files cp -a data t test.cfg %{buildroot}/%{_libexecdir}/%{name} -cat > %{buildroot}/%{_libexecdir}/%{name}/test < %{buildroot}/%{_libexecdir}/%{name}/test <<'EOF' +#!/bin/bash set -e # t/common.pl reads from ./data and writes into ./temp. The easiest solution -# is to copy the tests into a writable directory and execute the from there. -DIR=$(mktemp) +# is to copy the tests into a writable directory and execute them from there. +DIR=$(mktemp -d) pushd "$DIR" cp -a %{_libexecdir}/%{name}/* ./ prove -I . @@ -222,6 +222,9 @@ make test %{_libexecdir}/%{name} %changelog +* Tue Oct 29 2019 Petr Pisar - 1:0.66-6 +- Fix tests subpackage test script + * Mon Aug 26 2019 Petr Pisar - 1:0.66-5 - Package tests