pkgsrc-WIP-changes archive

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

gleam: add some checks to test phase.



Module Name:	pkgsrc-wip
Committed By:	nikita <nikita%NetBSD.org@localhost>
Pushed By:	nikita
Date:		Tue May 3 10:52:40 2022 +0200
Changeset:	22d40d515723d9974e56213b193eb4d307bad65b

Modified Files:
	gleam/Makefile

Log Message:
gleam: add some checks to test phase.

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

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

diffstat:
 gleam/Makefile | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diffs:
diff --git a/gleam/Makefile b/gleam/Makefile
index 4f4d7dde89..28ecb06aee 100644
--- a/gleam/Makefile
+++ b/gleam/Makefile
@@ -26,7 +26,19 @@ do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/target/release/gleam ${DESTDIR}${PREFIX}/bin
 
 do-test:
-	(cd ${WRKSRC} && ${DESTDIR}${PREFIX}/bin/gleam new hello && cd hello && ${DESTDIR}${PREFIX}/bin/gleam test)
+	if ${TEST} -x "${DESTDIR}${PREFIX}/bin/gleam"; then \
+		if ${TEST} -d "${WRKSRC}/hello"; then \
+			cd ${WRKSRC}/hello && ${DESTDIR}${PREFIX}/bin/gleam test; \
+		else \
+			cd ${WRKSRC} && ${DESTDIR}${PREFIX}/bin/gleam new hello && cd hello && ${DESTDIR}${PREFIX}/bin/gleam test; \
+		fi; \
+	else \
+		if ${TEST} -d "${WRKSRC}/hello"; then \
+			cd ${WRKSRC}/hello && ${WRKSRC}/target/release/gleam test; \
+		else \
+			cd ${WRKSRC} && ${WRKSRC}/target/release/gleam new hello && cd hello && ${WRKSRC}/target/release/gleam test; \
+		fi; \
+	fi
 
 .include "../../lang/rust/cargo.mk"
 .include "../../security/openssl/buildlink3.mk"


Home | Main Index | Thread Index | Old Index