From b0936c3d17bec2207ce549b0abd7cead021fcce5 Mon Sep 17 00:00:00 2001
From: Marcel Telka <marcel@telka.sk>
Date: Mon, 08 May 2023 06:29:15 +0200
Subject: [PATCH] tools/perl-integrate-module: check test environment before running tests

---
 tools/perl-integrate-module |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tools/perl-integrate-module b/tools/perl-integrate-module
index f2493f4..5f0dc88 100755
--- a/tools/perl-integrate-module
+++ b/tools/perl-integrate-module
@@ -431,6 +431,10 @@
 # Run tests to make sure they pass and to create result snapshots
 TESTED_VERSIONS=
 for v in $PERL_VERSIONS ; do
+	# Check the test environment
+	! $GMAKE PERL_VERSIONS=$v test-env-check > /dev/null 2>&1 && printf "ERROR: 'gmake test-env-check' failed for %s!\n" "$v" >&2 && continue
+
+	# Run the test
 	! $GMAKE PERL_VERSIONS=$v test > /dev/null 2>&1 && printf "ERROR: Testing failed for %s!\n" "$v" >&2 && continue
 
 	# If there is no snapshot produced the component likely does not support tests

--
Gitblit v1.9.3