From 0952c0010fc69110cfcba4072fcb0f822e7fe1e7 Mon Sep 17 00:00:00 2001 From: Erik Huelsmann Date: Sun, 13 Aug 2023 14:17:48 +0200 Subject: [PATCH] Don't run test-data based tests out-of-tree (#128) The tests based on the test data fail everywhere, except in our repository, because the test data isn't distributed. Fixing this is important, because Perl insists on running tests whenever it installs software on a system. Which - without this fix - fails everywhere. --- CHANGELOG.md | 4 ++++ perl/Makefile | 4 ++-- perl/t/03-shared-tests.t | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62e34bfd..fa98c837 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Fixed +- [Perl] Fixed test failures when running tests out-of-tree by +resticting testdata based tests to run in development only +(by [ehuelsmann](https://github.com/ehuelsmann)) ## [5.0.5] - 2023-08-11 ### Fixed diff --git a/perl/Makefile b/perl/Makefile index 2231ec3e..d04bd773 100644 --- a/perl/Makefile +++ b/perl/Makefile @@ -1,11 +1,11 @@ include default.mk test: .cpanfile_dependencies - AUTHOR_TESTS=1 prove -l + AUTHOR_TESTING=1 prove -l .PHONY: test authortest: .cpanfile_dev_dependencies - AUTHOR_TESTS=1 prove -l + AUTHOR_TESTING=1 prove -l .PHONY: authortest clean: diff --git a/perl/t/03-shared-tests.t b/perl/t/03-shared-tests.t index 6032bdeb..068402e6 100644 --- a/perl/t/03-shared-tests.t +++ b/perl/t/03-shared-tests.t @@ -11,6 +11,8 @@ use YAML qw(LoadFile); use Cucumber::TagExpressions; +plan skip_all => 'AUTHOR_TESTING not enabled' + if not $ENV{AUTHOR_TESTING}; my $cases = LoadFile('../testdata/evaluations.yml');