Skip to content

Commit

Permalink
use LC_ALL-C in the test suite and also skip "no home" tests on non-l…
Browse files Browse the repository at this point in the history
…inux systems
  • Loading branch information
agentzh committed Apr 26, 2009
1 parent 69c3862 commit 8686fa6
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 4 deletions.
6 changes: 6 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
0.017
- now in the test scaffold, we use LC_ALL=C rather than LC_ALL=en_US.UTF-8.
the latter is not available on certain systems.
- skipped the "no home" tests on non-linux systems.
- minor doc fixes.

0.016
- fixed a doc typo found by franck.

Expand Down
2 changes: 1 addition & 1 deletion lib/SSH/Batch.pm
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ clusters to local file system (maybe grouped by host name).
=item *
Add the C<betweenodes> script to transfer files between clusters through
Add the C<betweennodes> script to transfer files between clusters through
localhost.
=back
Expand Down
12 changes: 11 additions & 1 deletion t/atnodes.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ our @EXPORT = qw( run_tests );
if (!-d 't/tmp') {
mkdir 't/tmp';
}
$ENV{LC_ALL} = 'en_US.UTF-8';
$ENV{LC_ALL} = 'C';
delete $ENV{SSH_BATCH_SSH_CMD};
$ENV{HOME} = "$FindBin::Bin/tmp";
#warn $ENV{HOME};
my $RcFile = $ENV{HOME} . '/.fornodesrc';

my $is_linux = ($^O =~ /linux/i);

sub run_tests () {
for my $block (blocks()) {
run_test($block);
Expand All @@ -31,6 +33,14 @@ sub write_rc (@) {
sub run_test ($) {
my $block = shift;
my $name = $block->name;

if (defined $block->linux_only && ! $is_linux) {
diag "$name - Tests skipped on $^O\n";
for (1..3) {
pass("tests skipped on $^O\n");
}
}

my $args = $block->args;
if (!defined $args) {
die "$name - No --- args specified.\n";
Expand Down
1 change: 1 addition & 0 deletions t/atnodes.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ __DATA__
Can't find the home for the current user.
--- out
--- status: 2
--- linux_only
Expand Down
11 changes: 10 additions & 1 deletion t/fornodes.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ our @EXPORT = qw( run_tests );
if (!-d 't/tmp') {
mkdir 't/tmp';
}
$ENV{LC_ALL} = 'en_US.UTF-8';
$ENV{LC_ALL} = 'C';
$ENV{HOME} = "$FindBin::Bin/tmp";
#warn $ENV{HOME};
my $RcFile = $ENV{HOME} . '/.fornodesrc';

my $is_linux = ($^O =~ /linux/i);

sub run_tests () {
for my $block (blocks()) {
run_test($block);
Expand All @@ -30,6 +32,13 @@ sub write_rc (@) {
sub run_test ($) {
my $block = shift;
my $name = $block->name;

if (defined $block->linux_only && ! $is_linux) {
diag "$name - Tests skipped on $^O\n";
for (1..3) {
pass("tests skipped on $^O\n");
}
}
my $expr = $block->expr;
chomp $expr;
if (!defined $expr) {
Expand Down
1 change: 1 addition & 0 deletions t/fornodes.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ __DATA__
Can't find the home for the current user.
--- out
--- status: 2
--- linux_only



Expand Down
12 changes: 11 additions & 1 deletion t/tonodes.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ our @EXPORT = qw( run_tests );
if (!-d 't/tmp') {
mkdir 't/tmp';
}
$ENV{LC_ALL} = 'en_US.UTF-8';
$ENV{LC_ALL} = 'C';
$ENV{HOME} = "$FindBin::Bin/tmp";
#warn $ENV{HOME};
my $RcFile = $ENV{HOME} . '/.fornodesrc';

my $is_linux = ($^O =~ /linux/i);

sub run_tests () {
for my $block (blocks()) {
run_test($block);
Expand All @@ -30,6 +32,14 @@ sub write_rc (@) {
sub run_test ($) {
my $block = shift;
my $name = $block->name;

if (defined $block->linux_only && ! $is_linux) {
diag "$name - Tests skipped on $^O\n";
for (1..3) {
pass("tests skipped on $^O\n");
}
}

my $args = $block->args;
if (!defined $args) {
die "$name - No --- args specified.\n";
Expand Down
1 change: 1 addition & 0 deletions t/tonodes.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ __DATA__
Can't find the home for the current user.
--- out
--- status: 2
--- linux_only



Expand Down

0 comments on commit 8686fa6

Please sign in to comment.