Skip to content

Commit

Permalink
Don't run test-data based tests out-of-tree (#128)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ehuelsmann authored Aug 13, 2023
1 parent 7cc3983 commit 0952c00
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions perl/Makefile
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 2 additions & 0 deletions perl/t/03-shared-tests.t
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down

0 comments on commit 0952c00

Please sign in to comment.