Skip to content
This repository has been archived by the owner on Aug 4, 2024. It is now read-only.

Some test portability fixes #296

Merged
merged 2 commits into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions t/modules/Require/AutomatedTesting.t
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use Test2::Bundle::Extended -target => 'Test2::Require::AutomatedTesting';

{
local %ENV = %ENV;
$ENV{AUTOMATED_TESTING} = 0;
local $ENV{AUTOMATED_TESTING} = 0;
is($CLASS->skip(), 'Automated test, set the $AUTOMATED_TESTING environment variable to run it', "will skip");

$ENV{AUTOMATED_TESTING} = 1;
Expand Down
3 changes: 1 addition & 2 deletions t/modules/Require/ExtendedTesting.t
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use Test2::Bundle::Extended -target => 'Test2::Require::ExtendedTesting';

{
local %ENV = %ENV;
$ENV{EXTENDED_TESTING} = 0;
local $ENV{EXTENDED_TESTING} = 0;
is($CLASS->skip(), 'Extended test, set the $EXTENDED_TESTING environment variable to run it', "will skip");

$ENV{EXTENDED_TESTING} = 1;
Expand Down
3 changes: 1 addition & 2 deletions t/modules/Require/NonInteractiveTesting.t
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use Test2::Bundle::Extended -target => 'Test2::Require::NonInteractiveTesting';

{
local %ENV = %ENV;
$ENV{NONINTERACTIVE_TESTING} = 0;
local $ENV{NONINTERACTIVE_TESTING} = 0;
is($CLASS->skip(), 'NonInteractive test, set the $NONINTERACTIVE_TESTING environment variable to run it', "will skip");

$ENV{NONINTERACTIVE_TESTING} = 1;
Expand Down
3 changes: 1 addition & 2 deletions t/modules/Require/ReleaseTesting.t
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use Test2::Bundle::Extended -target => 'Test2::Require::ReleaseTesting';

{
local %ENV = %ENV;
$ENV{RELEASE_TESTING} = 0;
local $ENV{RELEASE_TESTING} = 0;
is($CLASS->skip(), 'Release test, set the $RELEASE_TESTING environment variable to run it', "will skip");

$ENV{RELEASE_TESTING} = 1;
Expand Down
7 changes: 7 additions & 0 deletions t/regression/291-async-subtest-done-testing.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
use Test2::V0;

BEGIN {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be:
use Test2::Require::RealFork
https://metacpan.org/pod/Test2::Require::RealFork

I will merge the PR, and then change this.

require Config;
skip_all('no fork')
unless ($Config::Config{d_fork} or $Config::Config{d_pseudofork});
}

use Test2::Tools::AsyncSubtest qw/fork_subtest/;

my $st = fork_subtest foo => sub {
Expand Down
Loading