pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

muon: Enable test suite



Module Name:	pkgsrc-wip
Committed By:	Michael Baeuerle <micha%NetBSD.org@localhost>
Pushed By:	micha
Date:		Fri Oct 11 14:08:00 2024 +0200
Changeset:	80f55a82de1bd585f004d5a707db93eaaf158f64

Modified Files:
	muon/Makefile
	muon/distinfo
Added Files:
	muon/patches/patch-tests_project_meson.build
Removed Files:
	muon/patches/patch-meson.build

Log Message:
muon: Enable test suite

Create build directory in "configure" phase.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=80f55a82de1bd585f004d5a707db93eaaf158f64

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 muon/Makefile                                |   5 +-
 muon/distinfo                                |   2 +-
 muon/patches/patch-meson.build               |  16 ----
 muon/patches/patch-tests_project_meson.build | 108 +++++++++++++++++++++++++++
 4 files changed, 113 insertions(+), 18 deletions(-)

diffs:
diff --git a/muon/Makefile b/muon/Makefile
index f03bf343ec..23ed3414dd 100644
--- a/muon/Makefile
+++ b/muon/Makefile
@@ -37,11 +37,14 @@ INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1
 
 do-configure:
 	cd ${WRKSRC} && env ${CONFIGURE_ENV} ${CONFIG_SHELL} ./bootstrap.sh bootstrap
+	cd ${WRKSRC} && env ${MAKE_ENV} ./bootstrap/muon setup ${MUON_ARGS} output
 
 do-build:
-	cd ${WRKSRC} && env ${MAKE_ENV} ./bootstrap/muon setup ${MUON_ARGS} output
 	cd ${WRKSRC} && env ${MAKE_ENV} samu -j ${_MAKE_JOBS_N:U1} -C output
 
+do-test:
+	cd ${WRKSRC}/output && env ${TEST_ENV} /usr/pkg/bin/muon test
+
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/output/muon ${DESTDIR}${PREFIX}/bin/muon
 	${INSTALL_MAN} ${WRKDIR}/man/muon.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
diff --git a/muon/distinfo b/muon/distinfo
index 2e22111a40..77900a7cee 100644
--- a/muon/distinfo
+++ b/muon/distinfo
@@ -6,4 +6,4 @@ Size (muon-0.3.0/0.3.0.tar.gz) = 445990 bytes
 BLAKE2s (muon-0.3.0/man.tar.gz) = a29909a298c4140169684bfb3c0156aef8269b1335473f37ed02506dce110f49
 SHA512 (muon-0.3.0/man.tar.gz) = 8dfc00ce366b172196d815e74e9941debcc4a306333f1d8cda8ca31d501bdb72fe3a0ec8df0391731906674fa9d4bf014d96974bc73566f5baf30f10c232d60f
 Size (muon-0.3.0/man.tar.gz) = 8067 bytes
-SHA1 (patch-meson.build) = 3533d7c4b34a2f3dd9e67778becd17f342a69dfa
+SHA1 (patch-tests_project_meson.build) = 6bfac6756950c2e6e0016d6b2b3978542f9ae963
diff --git a/muon/patches/patch-meson.build b/muon/patches/patch-meson.build
deleted file mode 100644
index cebb5561fb..0000000000
--- a/muon/patches/patch-meson.build
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
-Disable subdirectories "tests" and "doc".
-The build system tries to download additional stuff (not allowed for pkgsrc).
-
---- meson.build.orig	2024-09-24 16:08:34.000000000 +0000
-+++ meson.build
-@@ -154,5 +154,6 @@ muon = executable(
- 
- python3 = find_program('python3', required: false)
- 
--subdir('tests')
--subdir('doc')
-+# Disabled for pkgsrc
-+#subdir('tests')
-+#subdir('doc')
diff --git a/muon/patches/patch-tests_project_meson.build b/muon/patches/patch-tests_project_meson.build
new file mode 100644
index 0000000000..9d1460e735
--- /dev/null
+++ b/muon/patches/patch-tests_project_meson.build
@@ -0,0 +1,108 @@
+$NetBSD$
+
+Disable download of additional tests (not allowed for pkgsrc).
+
+--- tests/project/meson.build.orig	2024-09-24 16:08:34.000000000 +0000
++++ tests/project/meson.build
+@@ -401,53 +401,54 @@ else
+     endif
+ endif
+ 
+-if git.found()
+-    meson_tests_dir = meson.current_source_dir() / 'meson-tests'
+-    meson_tests_sha = '1e565931348f15f3f9b654f46ab4bf5fa009ca4f'
+-
+-    if fs.is_dir('meson-tests')
+-        meson_tests_clean = run_command(git, '-C', meson_tests_dir, 'diff', '--quiet', check: false).returncode() == 0
+-
+-        # If the meson-tests repo has no modifications and is not up to date,
+-        # force update it.
+-        if meson_tests_clean and run_command(
+-            git,
+-            '-C', meson_tests_dir,
+-            'merge-base',
+-            '--is-ancestor', meson_tests_sha,
+-            'HEAD',
+-            check: false,
+-        ).returncode() != 0
+-            warning('force-updating meson-tests repo')
+-            run_command(
+-                git,
+-                '-C', meson_tests_dir,
+-                'fetch',
+-                '--all',
+-                capture: false,
+-                check: true,
+-            )
+-
+-            run_command(
+-                git,
+-                '-C', meson_tests_dir,
+-                'reset',
+-                '--hard', 'origin/master',
+-                capture: false,
+-                check: true,
+-            )
+-        endif
+-    else
+-        run_command(
+-            git,
+-            'clone',
+-            get_option('meson_tests_repo'),
+-            meson_tests_dir,
+-            capture: false,
+-            check: true,
+-        )
+-    endif
+-endif
++# Disabled for pkgsrc
++#if git.found()
++#    meson_tests_dir = meson.current_source_dir() / 'meson-tests'
++#    meson_tests_sha = '1e565931348f15f3f9b654f46ab4bf5fa009ca4f'
++#
++#    if fs.is_dir('meson-tests')
++#        meson_tests_clean = run_command(git, '-C', meson_tests_dir, 'diff', '--quiet', check: false).returncode() == 0
++#
++#        # If the meson-tests repo has no modifications and is not up to date,
++#        # force update it.
++#        if meson_tests_clean and run_command(
++#            git,
++#            '-C', meson_tests_dir,
++#            'merge-base',
++#            '--is-ancestor', meson_tests_sha,
++#            'HEAD',
++#            check: false,
++#        ).returncode() != 0
++#            warning('force-updating meson-tests repo')
++#            run_command(
++#                git,
++#                '-C', meson_tests_dir,
++#                'fetch',
++#                '--all',
++#                capture: false,
++#                check: true,
++#            )
++#
++#            run_command(
++#                git,
++#                '-C', meson_tests_dir,
++#                'reset',
++#                '--hard', 'origin/master',
++#                capture: false,
++#                check: true,
++#            )
++#        endif
++#    else
++#        run_command(
++#            git,
++#            'clone',
++#            get_option('meson_tests_repo'),
++#            meson_tests_dir,
++#            capture: false,
++#            check: true,
++#        )
++#    endif
++#endif
+ 
+ skip_meson_tests = not fs.is_dir('meson-tests')
+ if skip_meson_tests


Home | Main Index | Thread Index | Old Index