From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128125 invoked by alias); 8 Feb 2020 13:47:52 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 128107 invoked by uid 89); 8 Feb 2020 13:47:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.8 required=5.0 tests=AWL,BAYES_00,FORGED_SPF_HELO,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=RELEASE X-HELO: sa-prd-fep-045.btinternet.com Received: from mailomta6-sa.btinternet.com (HELO sa-prd-fep-045.btinternet.com) (213.120.69.12) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Feb 2020 13:47:50 +0000 Received: from sa-prd-rgout-004.btmx-prd.synchronoss.net ([10.2.38.7]) by sa-prd-fep-045.btinternet.com with ESMTP id <20200208134748.YUD20439.sa-prd-fep-045.btinternet.com@sa-prd-rgout-004.btmx-prd.synchronoss.net>; Sat, 8 Feb 2020 13:47:48 +0000 Authentication-Results: btinternet.com; none X-OWM-Source-IP: 31.51.207.12 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean Received: from localhost.localdomain (31.51.207.12) by sa-prd-rgout-004.btmx-prd.synchronoss.net (5.8.340) (authenticated as jonturney@btinternet.com) id 5E3A27DB008E4B8E; Sat, 8 Feb 2020 13:47:48 +0000 From: Jon Turney To: cygwin-apps@cygwin.com Cc: Jon Turney Subject: [PATCH cygport 1/2] Add test which compares hints with expected Date: Sat, 08 Feb 2020 13:47:00 -0000 Message-Id: <20200208134634.58200-2-jon.turney@dronecode.org.uk> In-Reply-To: <20200208134634.58200-1-jon.turney@dronecode.org.uk> References: <20200208134634.58200-1-jon.turney@dronecode.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SW-Source: 2020-02/txt/msg00011.txt.bz2 Extend test-driver so it can compare hints with expected Add a test of hints for a cygport which creates a single package Add a test of hints for a cygport which creates multiple packages --- testsuite/hints/meson.build | 1 + .../libmultiple-devel-3.14-1.hint | 6 ++++ .../libmultiple1/libmultiple1-3.14-1.hint | 6 ++++ .../dist/multiple/multiple-3.14-1.hint | 6 ++++ testsuite/hints/multiple/multiple.cygport | 33 +++++++++++++++++++ testsuite/hints/multiple/multiple.list | 1 + .../obsoleted-by-single-2.3.4-1.hint | 8 +++++ .../dist/single/single-2.3.4-1.hint | 6 ++++ testsuite/hints/single/single.cygport | 23 +++++++++++++ testsuite/hints/single/single.list | 1 + testsuite/meson.build | 2 ++ testsuite/test-driver | 17 +++++++++- 12 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 testsuite/hints/meson.build create mode 100644 testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/libmultiple-devel/libmultiple-devel-3.14-1.hint create mode 100644 testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/libmultiple1/libmultiple1-3.14-1.hint create mode 100644 testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/multiple-3.14-1.hint create mode 100644 testsuite/hints/multiple/multiple.cygport create mode 100644 testsuite/hints/multiple/multiple.list create mode 100644 testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/obsoleted-by-single/obsoleted-by-single-2.3.4-1.hint create mode 100644 testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/single-2.3.4-1.hint create mode 100644 testsuite/hints/single/single.cygport create mode 100644 testsuite/hints/single/single.list diff --git a/testsuite/hints/meson.build b/testsuite/hints/meson.build new file mode 100644 index 0000000..f905486 --- /dev/null +++ b/testsuite/hints/meson.build @@ -0,0 +1 @@ +tests += [['hints/single'], ['hints/multiple']] diff --git a/testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/libmultiple-devel/libmultiple-devel-3.14-1.hint b/testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/libmultiple-devel/libmultiple-devel-3.14-1.hint new file mode 100644 index 0000000..3bb7ad8 --- /dev/null +++ b/testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/libmultiple-devel/libmultiple-devel-3.14-1.hint @@ -0,0 +1,6 @@ +category: libmultiple1 +requires: +sdesc: "Summary of hints for multiple package test" +ldesc: "Description of hints for multiple package test" +external-source: multiple + diff --git a/testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/libmultiple1/libmultiple1-3.14-1.hint b/testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/libmultiple1/libmultiple1-3.14-1.hint new file mode 100644 index 0000000..989bfb1 --- /dev/null +++ b/testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/libmultiple1/libmultiple1-3.14-1.hint @@ -0,0 +1,6 @@ +category: Base +requires: cygwin +sdesc: "Summary of hints for multiple package test" +ldesc: "Description of hints for multiple package test" +external-source: multiple + diff --git a/testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/multiple-3.14-1.hint b/testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/multiple-3.14-1.hint new file mode 100644 index 0000000..3820e4e --- /dev/null +++ b/testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/multiple-3.14-1.hint @@ -0,0 +1,6 @@ +category: Base +requires: +sdesc: "Summary of hints for multiple package test (source)" +ldesc: "Description of hints for multiple package test (source)" +skip: + diff --git a/testsuite/hints/multiple/multiple.cygport b/testsuite/hints/multiple/multiple.cygport new file mode 100644 index 0000000..b269ff5 --- /dev/null +++ b/testsuite/hints/multiple/multiple.cygport @@ -0,0 +1,33 @@ +NAME="multiple" +VERSION=3.14 +RELEASE=1 +SUMMARY="Summary of hints for multiple package test" +DESCRIPTION="Description of hints for multiple package test" + +PKG_NAMES="libmultiple1 libmultiple-devel" + +multiple_SUMMARY="Summary of hints for multiple package test (source)" +multiple_DESCRIPTION="Description of hints for multiple package test (source)" +multiple_CATEGORY="Base" + +libmultiple1_CONTENTS="" +libmultiple1_CATEGORY="Base" +libmultiple1_REQUIRES="cygwin" + +libmultiple_devel_CONTENTS="usr/include" +libmultiple_devel_CATEGORY="Devel" +libmultiple_devel_CATEGORY="libmultiple1" + +src_compile() { + : +} + +src_install() { + cd ${D} + mkdir -p usr/include + touch usr/include/.keep +} + +src_test() { + : +} diff --git a/testsuite/hints/multiple/multiple.list b/testsuite/hints/multiple/multiple.list new file mode 100644 index 0000000..3fa47fd --- /dev/null +++ b/testsuite/hints/multiple/multiple.list @@ -0,0 +1 @@ +/usr/include/.keep diff --git a/testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/obsoleted-by-single/obsoleted-by-single-2.3.4-1.hint b/testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/obsoleted-by-single/obsoleted-by-single-2.3.4-1.hint new file mode 100644 index 0000000..bb7644a --- /dev/null +++ b/testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/obsoleted-by-single/obsoleted-by-single-2.3.4-1.hint @@ -0,0 +1,8 @@ +category: _obsolete +requires: single +sdesc: "Obsoleted by single" +ldesc: "The obsoleted-by-single package is obsolete. Selecting this package for +installation will cause the single package, which replaces this +one, to be installed instead." +external-source: single + diff --git a/testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/single-2.3.4-1.hint b/testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/single-2.3.4-1.hint new file mode 100644 index 0000000..aa534a0 --- /dev/null +++ b/testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/single-2.3.4-1.hint @@ -0,0 +1,6 @@ +category: Base +requires: cygwin +sdesc: "Summary of hints for single package test" +ldesc: "Description of hints for single package test" +obsoletes: obsoleted-by-single + diff --git a/testsuite/hints/single/single.cygport b/testsuite/hints/single/single.cygport new file mode 100644 index 0000000..fca0706 --- /dev/null +++ b/testsuite/hints/single/single.cygport @@ -0,0 +1,23 @@ +NAME="single" +VERSION=2.3.4 +RELEASE=1 +SUMMARY="Summary of hints for single package test" +DESCRIPTION="Description of hints for single package test" + +CATEGORY="Base" +REQUIRES="cygwin" +OBSOLETES="obsoleted-by-single" + +src_compile() { + : +} + +src_install() { + cd ${D} + mkdir usr + touch usr/.keep +} + +src_test() { + : +} diff --git a/testsuite/hints/single/single.list b/testsuite/hints/single/single.list new file mode 100644 index 0000000..1b1ac0b --- /dev/null +++ b/testsuite/hints/single/single.list @@ -0,0 +1 @@ +/usr/.keep diff --git a/testsuite/meson.build b/testsuite/meson.build index ae2d435..cd43e41 100644 --- a/testsuite/meson.build +++ b/testsuite/meson.build @@ -15,6 +15,8 @@ python2 = find_program('python2', required: false) tests = [] subdir('download') +subdir('hints') + subdir('aspell') subdir('autotools') subdir('cmake') diff --git a/testsuite/test-driver b/testsuite/test-driver index 00cfbda..30893c4 100755 --- a/testsuite/test-driver +++ b/testsuite/test-driver @@ -1,6 +1,7 @@ #!/bin/bash set -e +shopt -s extglob test=$1 @@ -12,8 +13,22 @@ esac test -d ${top_builddir}/testsuite/$test || mkdir -p ${top_builddir}/testsuite/$test cd ${top_builddir}/testsuite/$test -cp -f ${top_srcdir}/testsuite/$test/* . +cp -f ${top_srcdir}/testsuite/$test/!(hints) . DISTDIR=${DISTDIR} ${top_builddir}/bin/cygport-inplace *.cygport clean get all +# compare hints +for hint in $(find -name \*.hint) +do + if [ -a ${top_srcdir}/testsuite/$test/hints/$hint ]; + then + diff -u ${top_srcdir}/testsuite/$test/hints/$hint $hint +# uncomment to create the expected hint file for use in future testing +# else +# mkdir -p $(dirname ${top_srcdir}/testsuite/$test/hints/$hint) +# cp $hint ${top_srcdir}/testsuite/$test/hints/$hint + fi +done + +# compare filelist cmp ${top_srcdir}/testsuite/$test/*.list <(${top_builddir}/bin/cygport-inplace *.cygport list) -- 2.21.0