mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-29 05:38:00 +00:00
databases/mongodb50: update to 5.0.28 and add do-test
Changes: https://www.mongodb.com/docs/manual/release-notes/5.0/#5.0.28---jul-09--2024 do-test: The port has had situations in which the code compiled, but the executables did not work. Try to catch this early with make test.
This commit is contained in:
parent
51012f8fa8
commit
0d2c09e668
@ -1,7 +1,6 @@
|
||||
PORTNAME= mongodb
|
||||
DISTVERSIONPREFIX= r
|
||||
DISTVERSION= 5.0.27
|
||||
PORTREVISION= 1
|
||||
DISTVERSION= 5.0.28
|
||||
CATEGORIES= databases net
|
||||
PKGNAMESUFFIX= ${DISTVERSION:R:S/.//}
|
||||
|
||||
@ -119,4 +118,7 @@ do-install:
|
||||
.endfor
|
||||
${RM} ${STAGEDIR}${PREFIX}/bin/resmoke.py
|
||||
|
||||
do-test:
|
||||
${SH} ${FILESDIR}/make.test.sh "${STAGEDIR}${PREFIX}/bin"
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1719241119
|
||||
SHA256 (mongodb-mongo-r5.0.27_GH0.tar.gz) = 62a51dee664b6d2722edc8443c2a8d2e1e7400bf48d44ae25b1ad799d3bee5da
|
||||
SIZE (mongodb-mongo-r5.0.27_GH0.tar.gz) = 57287707
|
||||
TIMESTAMP = 1720509272
|
||||
SHA256 (mongodb-mongo-r5.0.28_GH0.tar.gz) = d3d21296ec71e199ff2b66ecf9385210519e37a230ef180f4a92f81439db94f2
|
||||
SIZE (mongodb-mongo-r5.0.28_GH0.tar.gz) = 57289502
|
||||
|
32
databases/mongodb50/files/make.test.sh
Executable file
32
databases/mongodb50/files/make.test.sh
Executable file
@ -0,0 +1,32 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 <path>"
|
||||
echo "<path> path to the executables"
|
||||
}
|
||||
|
||||
test "$#" -eq 1 || ( usage && exit 1 )
|
||||
|
||||
set -x
|
||||
|
||||
PATH="$1:$PATH"
|
||||
|
||||
DBDIR=$( mktemp -d -t tmp.mongodb )
|
||||
|
||||
trap 'rm -rf "$DBDIR"' EXIT
|
||||
|
||||
# Trivial check if the binaries execute at all.
|
||||
mongod --version
|
||||
mongos --version
|
||||
mongo --version
|
||||
|
||||
# Check if an empty database can be created.
|
||||
mkdir "$DBDIR/db"
|
||||
tail -F "$DBDIR/log" | ( grep -qFe "Waiting for connections" && kill $(cat "$DBDIR/pid") ) &
|
||||
script -eF "$DBDIR/log" \
|
||||
timeout -s TERM -k 30s 60s \
|
||||
mongod --dbpath "$DBDIR/db" --pidfilepath "$DBDIR/pid"
|
||||
|
||||
echo "Test successful"
|
Loading…
Reference in New Issue
Block a user