summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2011-07-22 15:53:00 +1000
committerQt by Nokia <qt-info@nokia.com>2011-07-25 02:09:37 +0200
commitc595567c66c7817ecf0eab208e1f0ae19dcc3810 (patch)
tree20941b16c8f17404863c3f70075ad757aaf6168b
parent07d76f5c139e90a255fc8c4a25c1a1e812ce46dc (diff)
downloadqtqa-c595567c66c7817ecf0eab208e1f0ae19dcc3810.tar.gz
QtQA::TestScript: mark failing Windows argument-passing tests as TODO
The behavior for passing arguments between processes is entirely different on Unix and Windows. For now, disable the parts of this autotest which rely on Unix-style argument passing. Change-Id: I83fc41a622db0af4c6128cafd809715326987f25 Reviewed-on: http://codereview.qt.nokia.com/2018 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
-rw-r--r--scripts/lib/perl5/QtQA/t/10-TestScript.t60
1 files changed, 40 insertions, 20 deletions
diff --git a/scripts/lib/perl5/QtQA/t/10-TestScript.t b/scripts/lib/perl5/QtQA/t/10-TestScript.t
index 67a4884..c976746 100644
--- a/scripts/lib/perl5/QtQA/t/10-TestScript.t
+++ b/scripts/lib/perl5/QtQA/t/10-TestScript.t
@@ -11,11 +11,15 @@ use warnings;
use FindBin;
use lib "$FindBin::Bin/../..";
+use English qw( -no_match_vars );
use Data::Dumper qw( Dumper );
use IO::CaptureOutput qw( capture );
use Test::Exception;
use Test::Exit;
use Test::More;
+use Readonly;
+
+Readonly my $WINDOWS => ($OSNAME =~ m{win32}i);
BEGIN { use_ok 'QtQA::TestScript'; }
@@ -233,7 +237,10 @@ sub test_exe
lives_ok( sub { capture { $script->exe(@good_cmd) } \$stdout, \$stderr },
'successful command lives');
- is( $stdout, $TEST_EXE_ARGS1_DUMP, 'exe passes arguments correctly' );
+ TODO: {
+ local $TODO = 'fix or document argument passing on Windows' if $WINDOWS;
+ is( $stdout, $TEST_EXE_ARGS1_DUMP, 'exe passes arguments correctly' );
+ }
is( $stderr, q{}, 'no unexpected warnings or stderr' );
# If verbose, should print out the command being run
@@ -245,7 +252,10 @@ sub test_exe
# + cmd with each arg separated by space
# Note it currently does not attempt to print args with whitespace unambiguously
my $expected_log = "+ @good_cmd\n$TEST_EXE_ARGS1_DUMP";
- is( $stdout, $expected_log, 'exe logs correctly' );
+ TODO: {
+ local $TODO = 'fix or document argument passing on Windows' if $WINDOWS;
+ is( $stdout, $expected_log, 'exe logs correctly' );
+ }
is( $stderr, q{}, 'no unexpected warnings or stderr' );
return;
@@ -291,9 +301,12 @@ sub test_exe_qx
'successful command lives'
);
- is( $stdout, $test_stdout, 'exe_qx passes arguments correctly' );
- is( $stderr, $test_stderr, 'stderr OK' );
- is( $merged, $test_merged, 'merged output OK' );
+ TODO: {
+ local $TODO = 'fix or document argument passing on Windows' if $WINDOWS;
+ is( $stdout, $test_stdout, 'exe_qx passes arguments correctly' );
+ is( $merged, $test_merged, 'merged output OK' );
+ }
+ is( $stderr, $test_stderr, 'stderr OK' );
ok( !$log_stdout, 'no log output (verbose1)' );
ok( !$log_stderr, 'no log error (verbose1)' );
@@ -311,9 +324,12 @@ sub test_exe_qx
'successful command lives (verbose1)'
);
- is( $stdout, $test_stdout, 'exe_qx passes arguments correctly (verbose1)' );
- is( $stderr, $test_stderr, 'stderr OK (verbose1)' );
- is( $merged, $test_merged, 'merged output OK (verbose1)' );
+ is( $stderr, $test_stderr, 'stderr OK (verbose1)' );
+ TODO: {
+ local $TODO = 'fix or document argument passing on Windows' if $WINDOWS;
+ is( $stdout, $test_stdout, 'exe_qx passes arguments correctly (verbose1)' );
+ is( $merged, $test_merged, 'merged output OK (verbose1)' );
+ }
ok( !$log_stdout, 'no log output (verbose1)' );
ok( !$log_stderr, 'no log error (verbose1)' );
@@ -332,9 +348,12 @@ sub test_exe_qx
'successful command lives (verbose2)'
);
- is( $stdout, $test_stdout, 'exe_qx passes arguments correctly (verbose2)' );
- is( $stderr, $test_stderr, 'stderr OK (verbose2)' );
- is( $merged, $test_merged, 'merged output OK (verbose2)' );
+ is( $stderr, $test_stderr, 'stderr OK (verbose2)' );
+ TODO: {
+ local $TODO = 'fix or document argument passing on Windows' if $WINDOWS;
+ is( $stdout, $test_stdout, 'exe_qx passes arguments correctly (verbose2)' );
+ is( $merged, $test_merged, 'merged output OK (verbose2)' );
+ }
is( $log_stdout, "qx @good_cmd\n", 'log output OK (verbose2)' );
ok( !$log_stderr, 'no log error (verbose2)' );
@@ -389,15 +408,16 @@ EOF
'successful command lives (verbose2)'
);
- is( $stdout, $test_stdout, 'exe_qx passes arguments correctly (verbose2)' );
- is( $stderr, $test_stderr, 'stderr OK (verbose2)' );
- is( $merged, $test_merged, 'merged output OK (verbose2)' );
-
- is( $log_stdout, $expected_log_stdout, 'log output OK (verbose2)' );
- ok( !$log_stderr, 'no log error (verbose2)' );
-
- is( $log_stdout_merged, $expected_log_stdout_merged, 'log output OK (verbose2, merged)' );
- ok( !$log_stderr, 'no log error (verbose2, merged)' );
+ is( $stderr, $test_stderr, 'stderr OK (verbose2)' );
+ ok( !$log_stderr, 'no log error (verbose2)' );
+ ok( !$log_stderr_merged, 'no log error (verbose2, merged)' );
+ TODO: {
+ local $TODO = 'fix or document argument passing on Windows' if $WINDOWS;
+ is( $stdout, $test_stdout, 'exe_qx passes arguments correctly (verbose2)' );
+ is( $merged, $test_merged, 'merged output OK (verbose2)' );
+ is( $log_stdout, $expected_log_stdout, 'log output OK (verbose2)' );
+ is( $log_stdout_merged, $expected_log_stdout_merged, 'log output OK (verbose2, merged)' );
+ }
return;
}