pkgsrc-WIP-changes archive

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

sqlite3-test: First whack at running sqlite3 tests from pkgsrc.



Module Name:	pkgsrc-wip
Committed By:	Taylor R Campbell <riastradh%NetBSD.org@localhost>
Pushed By:	riastradh
Date:		Wed Apr 2 02:39:26 2025 +0000
Changeset:	b18185e51314cf0409d63baf60f5d20942e48659

Modified Files:
	Makefile
Added Files:
	sqlite3-test/COMMIT_MSG
	sqlite3-test/DESCR
	sqlite3-test/Makefile
	sqlite3-test/distinfo
	sqlite3-test/patches/patch-test_testrunner.tcl

Log Message:
sqlite3-test: First whack at running sqlite3 tests from pkgsrc.

Doesn't quite work yet: it doesn't test the sqlite3 that we built in
pkgsrc; it builds its own.

PR pkg/59243: databases/sqlite3: missing test target

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

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

diffstat:
 Makefile                                       |  1 +
 sqlite3-test/COMMIT_MSG                        | 10 ++++++++
 sqlite3-test/DESCR                             |  1 +
 sqlite3-test/Makefile                          | 32 ++++++++++++++++++++++++++
 sqlite3-test/distinfo                          |  6 +++++
 sqlite3-test/patches/patch-test_testrunner.tcl | 22 ++++++++++++++++++
 6 files changed, 72 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 30a3701655..3fefb5c520 100644
--- a/Makefile
+++ b/Makefile
@@ -5413,6 +5413,7 @@ SUBDIR+=	spread4
 SUBDIR+=	spyder
 SUBDIR+=	sq
 SUBDIR+=	sqlc
+SUBDIR+=	sqlite3-test
 SUBDIR+=	sqlitewrite
 SUBDIR+=	sqlux
 SUBDIR+=	squeak3
diff --git a/sqlite3-test/COMMIT_MSG b/sqlite3-test/COMMIT_MSG
new file mode 100644
index 0000000000..418963a1bd
--- /dev/null
+++ b/sqlite3-test/COMMIT_MSG
@@ -0,0 +1,10 @@
+sqlite3-test: New package for running sqlite3 automatic tests.
+
+This is a separate package because the sqlite3 autoconf distribution
+doesn't have any automatic tests itself.
+
+XXX This doesn't actually test the sqlite3 that was built and installed
+for pkgsrc -- it builds several of its own sqlite3 binaries, under
+different build configurations, and tests those instead.  To be fixed.
+
+PR pkg/59243: databases/sqlite3: missing test target
diff --git a/sqlite3-test/DESCR b/sqlite3-test/DESCR
new file mode 100644
index 0000000000..40cd590801
--- /dev/null
+++ b/sqlite3-test/DESCR
@@ -0,0 +1 @@
+Package for running sqlite3 automatic tests.
diff --git a/sqlite3-test/Makefile b/sqlite3-test/Makefile
new file mode 100644
index 0000000000..8ac6633036
--- /dev/null
+++ b/sqlite3-test/Makefile
@@ -0,0 +1,32 @@
+#	$NetBSD$
+
+.include "../../databases/sqlite3/Makefile.common"
+
+DISTNAME=	sqlite-src-${SQLITE3_DISTVERSION}
+PKGNAME=	sqlite3-test-${SQLITE3_VERSION}
+CATEGORIES=	databases
+EXTRACT_SUFX=	.zip
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+COMMENT=	Package for running sqlite3 automatic tests
+
+RESTRICTED=		Just for test build purposes
+NO_BIN_ON_CDROM=	${RESTRICTED}
+NO_BIN_ON_FTP=		${RESTRICTED}
+
+NO_CONFIGURE=	yes
+NO_BUILD=	yes
+PLIST_SRC=	# none
+CHECK_PERMS=	no
+
+USE_LANGUAGES+=	c
+
+do-test:
+	${RUN}cd ${WRKSRC} && \
+	${SETENV} ${TEST_ENV} ${TCLSH} ${WRKSRC}/test/testrunner.tcl mdevtest \
+		--jobs ${MAKE_JOBS:U1}
+
+BUILDLINK_API_DEPENDS.sqlite3+=	sqlite3-${SQLITE3_VERSION}{,nb*}
+.include "../../databases/sqlite3/buildlink3.mk"
+.include "../../lang/tcl/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/sqlite3-test/distinfo b/sqlite3-test/distinfo
new file mode 100644
index 0000000000..35b8820dce
--- /dev/null
+++ b/sqlite3-test/distinfo
@@ -0,0 +1,6 @@
+$NetBSD$
+
+BLAKE2s (sqlite-src-3490100.zip) = 9eec3fef2bbe6fa0c550303b537e277e93ee345adbf97164dd5b0b3d616a376f
+SHA512 (sqlite-src-3490100.zip) = 24c81cee52e5655f4e9d6496a366e4787352b5108ea27eb5ce3dc07ef3e1975205bb250584b0758fb2832add84ca922b09a4d925e0dc2f55dd3613a58b414ec3
+Size (sqlite-src-3490100.zip) = 14372402 bytes
+SHA1 (patch-test_testrunner.tcl) = 485ee6c69b489bc9405159e3319abe57095c6bc9
diff --git a/sqlite3-test/patches/patch-test_testrunner.tcl b/sqlite3-test/patches/patch-test_testrunner.tcl
new file mode 100644
index 0000000000..5f28b182e6
--- /dev/null
+++ b/sqlite3-test/patches/patch-test_testrunner.tcl
@@ -0,0 +1,22 @@
+$NetBSD$
+
+Add NetBSD support.
+
+--- test/testrunner.tcl.orig	2025-02-18 14:09:33.000000000 +0000
++++ test/testrunner.tcl
+@@ -246,6 +246,15 @@ switch -nocase -glob -- $tcl_platform(os
+     set TRG(run)         run.sh
+     set TRG(runcmd)      "bash run.sh"
+   }
++  *netbsd* {
++    set TRG(platform)    linux
++    set TRG(make)        make.sh
++    set TRG(makecmd)     "sh make.sh"
++    set TRG(testfixture) testfixture
++    set TRG(shell)       sqlite3
++    set TRG(run)         run.sh
++    set TRG(runcmd)      "sh run.sh"
++  }
+   *openbsd* {
+     set TRG(platform)    linux
+     set TRG(make)        make.sh


Home | Main Index | Thread Index | Old Index