You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by da...@apache.org on 2013/05/14 19:24:59 UTC
svn commit: r1482476 - in /pig/trunk: ./ test/e2e/harness/ test/e2e/pig/
test/e2e/pig/drivers/ test/e2e/pig/resource/ test/e2e/pig/tests/
Author: daijy
Date: Tue May 14 17:24:59 2013
New Revision: 1482476
URL: http://svn.apache.org/r1482476
Log:
PIG-2955: Fix bunch of Pig e2e tests on Windows
Added:
pig/trunk/test/e2e/pig/resource/
pig/trunk/test/e2e/pig/resource/default.res
pig/trunk/test/e2e/pig/resource/windows.res
Modified:
pig/trunk/CHANGES.txt
pig/trunk/test/e2e/harness/TestDriver.pm
pig/trunk/test/e2e/harness/test_harness.pl
pig/trunk/test/e2e/pig/build.xml
pig/trunk/test/e2e/pig/drivers/TestDriverPig.pm
pig/trunk/test/e2e/pig/tests/cmdline.conf
pig/trunk/test/e2e/pig/tests/grunt.conf
pig/trunk/test/e2e/pig/tests/nightly.conf
pig/trunk/test/e2e/pig/tests/streaming.conf
Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1482476&r1=1482475&r2=1482476&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Tue May 14 17:24:59 2013
@@ -28,6 +28,8 @@ PIG-3174: Remove rpm and deb artifacts
IMPROVEMENTS
+PIG-2955: Fix bunch of Pig e2e tests on Windows (daijy)
+
PIG-3311: add pig-withouthadoop-h2 to mvn-jar (julien)
PIG-2873: Converting bin/pig shell script to python (vikram.dixit via daijy)
Modified: pig/trunk/test/e2e/harness/TestDriver.pm
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/harness/TestDriver.pm?rev=1482476&r1=1482475&r2=1482476&view=diff
==============================================================================
--- pig/trunk/test/e2e/harness/TestDriver.pm (original)
+++ pig/trunk/test/e2e/harness/TestDriver.pm Tue May 14 17:24:59 2013
@@ -417,7 +417,7 @@ sub cleanup
sub run
{
my ($self, $testsToRun, $testsToMatch, $cfg, $log, $dbh, $testStatuses,
- $confFile, $startat, $logname ) = @_;
+ $confFile, $startat, $logname, $resources ) = @_;
my $subName = (caller(0))[3];
my $msg="";
@@ -698,11 +698,11 @@ sub runTestGroup() {
my $endTime = 0;
my ($testResult, $benchmarkResult);
eval {
- $testResult = $self->runTest(\%testHash, $subLog);
+ $testResult = $self->runTest(\%testHash, $subLog, $resources);
$endTime = time;
$benchmarkResult = $self->generateBenchmark(\%testHash, $subLog);
my $result =
- $self->compare($testResult, $benchmarkResult, $subLog, \%testHash);
+ $self->compare($testResult, $benchmarkResult, $subLog, \%testHash, $resources);
$msg = "INFO: $subName() at ".__LINE__.":Test $testName";
if ($result eq $self->{'wrong_execution_mode'}) {
Modified: pig/trunk/test/e2e/harness/test_harness.pl
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/harness/test_harness.pl?rev=1482476&r1=1482475&r2=1482476&view=diff
==============================================================================
--- pig/trunk/test/e2e/harness/test_harness.pl (original)
+++ pig/trunk/test/e2e/harness/test_harness.pl Tue May 14 17:24:59 2013
@@ -160,6 +160,47 @@ sub readCfg($)
return $cfg;
}
+##############################################################################
+# Sub: readResource
+# Read the resource file, The resource file is in Perl format so we'll
+# just eval it. If anything goes wrong we'll complain and quit.
+#
+# Var: resourceFile
+# Full path name of resourceFile
+#
+# Returns:
+# returns reference to hash built from resource file.
+#
+
+sub readResource($)
+{
+ my $resourceFile = shift;
+
+ open RES, "< $resourceFile" or die "FATAL ERROR $0 at ".__LINE__.": Can't open $resourceFile, $!\n";
+
+ my $resContents;
+
+ $resContents .= $_ while (<RES>);
+
+ close RES;
+
+ my $resources = undef;
+ eval("$resContents");
+
+ if ($@) {
+ chomp $@;
+ die "FATAL ERROR $0 at ".__LINE__." : Error reading resource file <$resourceFile>, <$@>\n";
+ }
+
+ if (not defined $resources) {
+ die "FATAL ERROR $0 at ".__LINE__." : Resource file <$resourceFile> should have defined \$resources\n";
+ }
+
+ # Add the name of the file
+ $resources->{'file'} = $resourceFile;
+
+ return $resources;
+}
##############################################################################
@@ -294,6 +335,19 @@ if ( -e "$harnessCfg" ) {
die "FATAL ERROR: $0 at ".__LINE__." - Configuration file <$harnessCfg> does NOT exist\n";
}
+my $harnessRes = "";
+if (defined($ENV{'HARNESS_RESOURCE'})) {
+ $harnessRes = $ENV{'HARNESS_RESOURCE'};
+} elsif($^O =~ /mswin/i) {
+ $harnessRes = "$ROOT/resource/windows.res";
+} elsif ($globalCfg->{'hadoopversion'} == '23') {
+ $harnessRes = "$ROOT/resource/hadoop23.res";
+} else {
+ $harnessRes = "$ROOT/resource/default.res";
+}
+
+my $resources = readResource("$harnessRes");
+
# *pig* -help | -c <cluster> | -h <dir> | (-testjar <jar> -testconfigpath <path>) [-r <retention_days>] [-latest yes] [-x local] [-cleanuponly] [-secretDebugCmd] [-t <testcase>] <configfile>
@@ -538,7 +592,7 @@ foreach my $arg (@ARGV) {
# eval this in a separate block to catch possible error and exit status:
eval
{
- $driver->run(\@testgroups, \@testMatches, $cfg, $subLog, $dbh, \%testStatuses, $arg, $startat, $subLogName);
+ $driver->run(\@testgroups, \@testMatches, $cfg, $subLog, $dbh, \%testStatuses, $arg, $startat, $subLogName, $resources);
};
my $runStatus = $@;
my $runExitCode = $?; # exit code of the code block above.
Modified: pig/trunk/test/e2e/pig/build.xml
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/build.xml?rev=1482476&r1=1482475&r2=1482476&view=diff
==============================================================================
--- pig/trunk/test/e2e/pig/build.xml (original)
+++ pig/trunk/test/e2e/pig/build.xml Tue May 14 17:24:59 2013
@@ -45,6 +45,7 @@
<property name="driver.src" value="${basedir}/drivers"/>
<property name="deployer.src" value="${basedir}/deployers"/>
<property name="conf.src" value="${basedir}/conf"/>
+ <property name="resource.src" value="${basedir}/resource"/>
<property name="tool.src" value="${basedir}/tools"/>
<property name="harness.dir" value="${basedir}/../harness"/>
@@ -162,6 +163,10 @@
<fileset dir="${conf.src}"/>
</copy>
+ <copy todir="${tar.dir}/resource">
+ <fileset dir="${resource.src}"/>
+ </copy>
+
<copy todir="${tar.dir}/libexec/PigTest">
<fileset dir="${tool.src}/test"/>
<fileset dir="${tool.src}/generate"/>
Modified: pig/trunk/test/e2e/pig/drivers/TestDriverPig.pm
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/drivers/TestDriverPig.pm?rev=1482476&r1=1482475&r2=1482476&view=diff
==============================================================================
--- pig/trunk/test/e2e/pig/drivers/TestDriverPig.pm (original)
+++ pig/trunk/test/e2e/pig/drivers/TestDriverPig.pm Tue May 14 17:24:59 2013
@@ -58,7 +58,7 @@ sub replaceParameters
{
##!!! Move this to Util.pm
- my ($self, $cmd, $outfile, $testCmd, $log) = @_;
+ my ($self, $cmd, $outfile, $testCmd, $log, $resources) = @_;
# $self
$cmd =~ s/:LATESTOUTPUTPATH:/$self->{'latestoutputpath'}/g;
@@ -98,6 +98,11 @@ sub replaceParameters
$param =~ s/:HCATBIN:/$testCmd->{'hcatbin'}/g;
}
}
+
+ foreach (keys(%$resources)) {
+ $cmd =~ s/:$_:/$resources->{$_}/g;
+ }
+
return $cmd;
}
@@ -178,7 +183,7 @@ sub globalCleanupConditional() {
sub runTest
{
- my ($self, $testCmd, $log) = @_;
+ my ($self, $testCmd, $log, $resources) = @_;
my $subName = (caller(0))[3];
# Check that we should run this test. If the current execution type
@@ -193,6 +198,12 @@ sub runTest
if ( $testCmd->{'pig'} && $self->hasCommandLineVerifications( $testCmd, $log) ) {
my $oldpig;
+
+ if ( Util::isWindows() && $testCmd->{'pig_win'}) {
+ $oldpig = $testCmd->{'pig'};
+ $testCmd->{'pig'} = $testCmd->{'pig_win'};
+ }
+
if ( $testCmd->{'hadoopversion'} == '23' && $testCmd->{'pig23'}) {
$oldpig = $testCmd->{'pig'};
$testCmd->{'pig'} = $testCmd->{'pig23'};
@@ -200,24 +211,30 @@ sub runTest
if ( $testCmd->{'hadoopversion'} == '23' && $testCmd->{'expected_err_regex23'}) {
$testCmd->{'expected_err_regex'} = $testCmd->{'expected_err_regex23'};
}
- my $res = $self->runPigCmdLine( $testCmd, $log, 1);
+ my $res = $self->runPigCmdLine( $testCmd, $log, 1, $resources );
if ($oldpig) {
$testCmd->{'pig'} = $oldpig;
}
return $res;
} elsif( $testCmd->{'pig'} ){
my $oldpig;
+
+ if ( Util::isWindows() && $testCmd->{'pig_win'}) {
+ $oldpig = $testCmd->{'pig'};
+ $testCmd->{'pig'} = $testCmd->{'pig_win'};
+ }
+
if ( $testCmd->{'hadoopversion'} == '23' && $testCmd->{'pig23'}) {
$oldpig = $testCmd->{'pig'};
$testCmd->{'pig'} = $testCmd->{'pig23'};
}
- my $res = $self->runPig( $testCmd, $log, 1);
+ my $res = $self->runPig( $testCmd, $log, 1, $resources );
if ($oldpig) {
$testCmd->{'pig'} = $oldpig;
}
return $res;
} elsif( $testCmd->{'script'} ){
- return $self->runScript( $testCmd, $log );
+ return $self->runScript( $testCmd, $log, $resources );
} else {
die "$subName FATAL Did not find a testCmd that I know how to handle";
}
@@ -226,7 +243,7 @@ sub runTest
sub runPigCmdLine
{
- my ($self, $testCmd, $log) = @_;
+ my ($self, $testCmd, $log, $copyResults, $resources) = @_;
my $subName = (caller(0))[3];
my %result;
@@ -245,7 +262,7 @@ sub runPigCmdLine
}
# Write the pig script to a file.
- my $pigcmd = $self->replaceParameters( $testCmd->{'pig'}, $outfile, $testCmd, $log );
+ my $pigcmd = $self->replaceParameters( $testCmd->{'pig'}, $outfile, $testCmd, $log, $resources );
open(FH, "> $pigfile") or die "Unable to open file $pigfile to write pig script, $ERRNO\n";
print FH $pigcmd . "\n";
@@ -299,7 +316,7 @@ sub runPigCmdLine
sub runScript
{
- my ($self, $testCmd, $log) = @_;
+ my ($self, $testCmd, $log, $resources) = @_;
my $subName = (caller(0))[3];
my %result;
@@ -318,7 +335,7 @@ sub runScript
}
# Write the script to a file
- my $cmd = $self->replaceParameters( $testCmd->{'script'}, $outfile, $testCmd, $log );
+ my $cmd = $self->replaceParameters( $testCmd->{'script'}, $outfile, $testCmd, $log, $resources );
open(FH, ">$script") or die "Unable to open file $script to write script, $ERRNO\n";
print FH $cmd . "\n";
@@ -442,7 +459,7 @@ sub getPigCmd($$$)
sub runPig
{
- my ($self, $testCmd, $log, $copyResults) = @_;
+ my ($self, $testCmd, $log, $copyResults, $resources) = @_;
my $subName = (caller(0))[3];
my %result;
@@ -451,7 +468,7 @@ sub runPig
my $pigfile = $testCmd->{'localpath'} . $testCmd->{'group'} . "_" . $testCmd->{'num'} . ".pig";
my $outfile = $testCmd->{'outpath'} . $testCmd->{'group'} . "_" . $testCmd->{'num'} . ".out";
- my $pigcmd = $self->replaceParameters( $testCmd->{'pig'}, $outfile, $testCmd, $log );
+ my $pigcmd = $self->replaceParameters( $testCmd->{'pig'}, $outfile, $testCmd, $log, $resources );
open(FH, "> $pigfile") or die "Unable to open file $pigfile to write pig script, $ERRNO\n";
print FH $pigcmd . "\n";
@@ -608,6 +625,9 @@ sub generateBenchmark
$modifiedTestCmd{'pig'} = $testCmd->{'verify_pig_script'};
}
else {
+ if ( Util::isWindows() && $testCmd->{'pig_win'}) {
+ $modifiedTestCmd{'pig'} = $testCmd->{'pig_win'};
+ }
# Change so we're looking at the old version of Pig
$modifiedTestCmd{'pigpath'} = $testCmd->{'oldpigpath'};
if (defined($testCmd->{'oldconfigpath'})) {
@@ -693,7 +713,7 @@ sub hasCommandLineVerifications
sub compare
{
- my ($self, $testResult, $benchmarkResult, $log, $testCmd) = @_;
+ my ($self, $testResult, $benchmarkResult, $log, $testCmd, $resources) = @_;
my $subName = (caller(0))[3];
# Check that we should run this test. If the current execution type
@@ -715,9 +735,9 @@ sub compare
# doing the benchmark compare.
if ( $testCmd->{'script'} || $self->hasCommandLineVerifications( $testCmd, $log) ){
- return $self->compareScript ( $testResult, $log, $testCmd);
+ return $self->compareScript ( $testResult, $log, $testCmd, $resources);
} elsif( $testCmd->{'pig'} ){
- return $self->comparePig ( $testResult, $benchmarkResult, $log, $testCmd);
+ return $self->comparePig ( $testResult, $benchmarkResult, $log, $testCmd, $resources);
} else {
# Should have been caught by runTest, still...
print $log "$0.$subName WARNING Did not find a testCmd that I know how to handle\n";
@@ -728,7 +748,7 @@ sub compare
sub compareScript
{
- my ($self, $testResult, $log, $testCmd) = @_;
+ my ($self, $testResult, $log, $testCmd, $resources) = @_;
my $subName = (caller(0))[3];
@@ -759,6 +779,7 @@ sub compareScript
# Standard Out
if (defined $testCmd->{'expected_out'}) {
+ $testCmd->{'expected_out'} = $self->replaceParameters( $testCmd->{'expected_out'}, "", $testCmd, $log, $resources );
print $log "$0::$subName INFO Checking test stdout' " .
"as exact match against expected <$testCmd->{'expected_out'}>\n";
if ($testResult->{'stdout'} ne $testCmd->{'expected_out'}) {
@@ -768,6 +789,7 @@ sub compareScript
}
if (defined $testCmd->{'not_expected_out'}) {
+ $testCmd->{'not_expected_out'} = $self->replaceParameters( $testCmd->{'not_expected_out'}, "", $testCmd, $log, $resources );
print $log "$0::$subName INFO Checking test stdout " .
"as NOT exact match against expected <$testCmd->{'expected_out'}>\n";
if ($testResult->{'stdout'} eq $testCmd->{'not_expected_out'}) {
@@ -777,6 +799,7 @@ sub compareScript
}
if (defined $testCmd->{'expected_out_regex'}) {
+ $testCmd->{'expected_out_regex'} = $self->replaceParameters( $testCmd->{'expected_out_regex'}, "", $testCmd, $log, $resources );
print $log "$0::$subName INFO Checking test stdout " .
"for regular expression <$testCmd->{'expected_out_regex'}>\n";
if ($testResult->{'stdout'} !~ $testCmd->{'expected_out_regex'}) {
@@ -786,6 +809,7 @@ sub compareScript
}
if (defined $testCmd->{'not_expected_out_regex'}) {
+ $testCmd->{'not_expected_out_regex'} = $self->replaceParameters( $testCmd->{'not_expected_out_regex'}, "", $testCmd, $log, $resources );
print $log "$0::$subName INFO Checking test stdout " .
"for NON-match of regular expression <$testCmd->{'not_expected_out_regex'}>\n";
if ($testResult->{'stdout'} =~ $testCmd->{'not_expected_out_regex'}) {
@@ -796,6 +820,7 @@ sub compareScript
# Standard Error
if (defined $testCmd->{'expected_err'}) {
+ $testCmd->{'expected_err'} = $self->replaceParameters( $testCmd->{'expected_err'}, "", $testCmd, $log, $resources );
print $log "$0::$subName INFO Checking test stderr " .
"as exact match against expected <$testCmd->{'expected_err'}>\n";
if ($testResult->{'stderr'} ne $testCmd->{'expected_err'}) {
@@ -805,6 +830,7 @@ sub compareScript
}
if (defined $testCmd->{'not_expected_err'}) {
+ $testCmd->{'not_expected_err'} = $self->replaceParameters( $testCmd->{'not_expected_err'}, "", $testCmd, $log, $resources );
print $log "$0::$subName INFO Checking test stderr " .
"as NOT an exact match against expected <$testCmd->{'expected_err'}>\n";
if ($testResult->{'stderr'} eq $testCmd->{'not_expected_err'}) {
@@ -814,6 +840,7 @@ sub compareScript
}
if (defined $testCmd->{'expected_err_regex'}) {
+ $testCmd->{'expected_err_regex'} = $self->replaceParameters( $testCmd->{'expected_err_regex'}, "", $testCmd, $log, $resources );
print $log "$0::$subName INFO Checking test stderr " .
"for regular expression <$testCmd->{'expected_err_regex'}>\n";
if ($testResult->{'stderr'} !~ $testCmd->{'expected_err_regex'}) {
@@ -823,6 +850,7 @@ sub compareScript
}
if (defined $testCmd->{'not_expected_err_regex'}) {
+ $testCmd->{'not_expected_err_regex'} = $self->replaceParameters( $testCmd->{'not_expected_err_regex'}, "", $testCmd, $log, $resources );
print $log "$0::$subName INFO Checking test stderr " .
"for NON-match of regular expression <$testCmd->{'not_expected_err_regex'}>\n";
if ($testResult->{'stderr'} =~ $testCmd->{'not_expected_err_regex'}) {
@@ -837,7 +865,7 @@ sub compareScript
sub comparePig
{
- my ($self, $testResult, $benchmarkResult, $log, $testCmd) = @_;
+ my ($self, $testResult, $benchmarkResult, $log, $testCmd, $resources) = @_;
my $subName = (caller(0))[3];
my $result;
Added: pig/trunk/test/e2e/pig/resource/default.res
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/resource/default.res?rev=1482476&view=auto
==============================================================================
--- pig/trunk/test/e2e/pig/resource/default.res (added)
+++ pig/trunk/test/e2e/pig/resource/default.res Tue May 14 17:24:59 2013
@@ -0,0 +1,9 @@
+$resources = {
+ 'Unicode_cmdline_1_output' => '(bobÏ)',
+ 'Warning_1_err' => 'Encountered Warning DIVIDE_BY_ZERO 2387 time.*',
+ 'Warning_4_err' => '(Encountered Warning UDF_WARNING_4 22 time.*\n.*Encountered Warning UDF_WARNING_3 10989 time.*)|(Encountered Warning UDF_WARNING_3 10989 time.*\n.*Encountered Warning UDF_WARNING_4 22 time.*)',
+ 'Grunt_8_output' => 'gabriella brown\\t60\\t1.71',
+ 'Grunt_13_output' => 'gabriella brown\\t60\\t1.71',
+ 'Grunt_14_output' => 'jessica xylophone\\t41\\tgreen\\t638.13',
+ 'UdfDistributedCache_1_out' => 'tom van buren\\t68\\tsocialist\\t390.19',
+};
Added: pig/trunk/test/e2e/pig/resource/windows.res
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/resource/windows.res?rev=1482476&view=auto
==============================================================================
--- pig/trunk/test/e2e/pig/resource/windows.res (added)
+++ pig/trunk/test/e2e/pig/resource/windows.res Tue May 14 17:24:59 2013
@@ -0,0 +1,9 @@
+$resources = {
+ 'Unicode_cmdline_1_output' => 'bobμ',
+ 'Warning_1_err' => 'Encountered Warning DIVIDE_BY_ZERO 2390 time.*',
+ 'Warning_4_err' => '(Encountered Warning UDF_WARNING_4 27 time.*\n.*Encountered Warning UDF_WARNING_3 10984 time.*)|(Encountered Warning UDF_WARNING_3 10984 time.*\n.*Encountered Warning UDF_WARNING_4 27 time.*)',
+ 'Grunt_8_output' => 'zach johnson\\t77\\t3.27',
+ 'Grunt_13_output' => 'zach johnson\\t77\\t3.27',
+ 'Grunt_14_output' => 'priscilla young\\t72\\tindependent\\t3.23',
+ 'UdfDistributedCache_1_out' => 'priscilla young\\t72\\tindependent\\t3.23',
+};
Modified: pig/trunk/test/e2e/pig/tests/cmdline.conf
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/tests/cmdline.conf?rev=1482476&r1=1482475&r2=1482476&view=diff
==============================================================================
--- pig/trunk/test/e2e/pig/tests/cmdline.conf (original)
+++ pig/trunk/test/e2e/pig/tests/cmdline.conf Tue May 14 17:24:59 2013
@@ -243,7 +243,7 @@ describe D;\,
'pig' => q\
A = load ':INPATH:/singlefile/unicode100' as (name:chararray);
dump A;\,
- 'expected_out_regex' => "(bobÏ)"
+ 'expected_out_regex' => ":Unicode_cmdline_1_output:"
},
],
@@ -263,7 +263,7 @@ dump A;\,
b = foreach a generate (int)((int)gpa/((int)gpa - 1)) as norm_gpa:int;
c = foreach b generate (norm_gpa is null? 0 :norm_gpa);
store c into ':OUTPATH:';\,
- 'expected_err_regex' => "Encountered Warning DIVIDE_BY_ZERO 2387 time.*",
+ 'expected_err_regex' => ":Warning_1_err:",
},
{
#Checking field discarded warning
@@ -289,7 +289,7 @@ describe b;\,
a = load ':INPATH:/singlefile/studentnulltab10k' as (name, age: int, gpa: float);
b = foreach a generate org.apache.pig.test.udf.evalfunc.TestWarningFunc(name, age, gpa);
store b into ':OUTPATH:';\,
- 'expected_err_regex' => "(Encountered Warning UDF_WARNING_4 22 time.*\n.*Encountered Warning UDF_WARNING_3 10989 time.*)|(Encountered Warning UDF_WARNING_3 10989 time.*\n.*Encountered Warning UDF_WARNING_4 22 time.*)",
+ 'expected_err_regex' => ":Warning_4_err:",
},
{
#Checking non existent field warnings
Modified: pig/trunk/test/e2e/pig/tests/grunt.conf
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/tests/grunt.conf?rev=1482476&r1=1482475&r2=1482476&view=diff
==============================================================================
--- pig/trunk/test/e2e/pig/tests/grunt.conf (original)
+++ pig/trunk/test/e2e/pig/tests/grunt.conf Tue May 14 17:24:59 2013
@@ -69,7 +69,7 @@ sh touch /bin/bad
},{
'num' => 8,
'pig' => "cat :INPATH:/singlefile/studenttab10k",
- 'expected_out_regex' => "gabriella brown\\t60\\t1.71",
+ 'expected_out_regex' => ":Grunt_8_output:",
'rc' => 0
},{
'num' => 9,
@@ -100,14 +100,14 @@ sh touch /bin/bad
'num' => 13,
'pig' => "copyToLocal :INPATH:/singlefile/studenttab10k :TMP:
sh cat :TMP:/studenttab10k",
- 'expected_out_regex' => "gabriella brown\\t60\\t1.71",
+ 'expected_out_regex' => ":Grunt_13_output:",
'rc' => 0
},{
'num' => 14,
'pig' => "copyToLocal :INPATH:/singlefile/votertab10k :TMP:
copyFromLocal :TMP:/votertab10k ./joe
cat ./joe",
- 'expected_out_regex' => "jessica xylophone\\t41\\tgreen\\t638.13",
+ 'expected_out_regex' => ":Grunt_14_output:",
'rc' => 0
},{
'num' => 15,
Modified: pig/trunk/test/e2e/pig/tests/nightly.conf
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/tests/nightly.conf?rev=1482476&r1=1482475&r2=1482476&view=diff
==============================================================================
--- pig/trunk/test/e2e/pig/tests/nightly.conf (original)
+++ pig/trunk/test/e2e/pig/tests/nightly.conf Tue May 14 17:24:59 2013
@@ -55,7 +55,7 @@ i = order h by $1;
store i into ':OUTPATH:';\,
'floatpostprocess' => 1,
'delimiter' => ' ',
- 'sortArgs' => ['-t', ' ', '-k', '2,2'],
+ 'sortArgs' => ['-t', ' ', '-k', '2,2n'],
}
]
},
@@ -4344,12 +4344,8 @@ store C into ':OUTPATH:';\,
a = load ':INPATH:/singlefile/studenttab10k' as (name, age, gpa);
b = limit a 1;
c = foreach b generate udfdc(age);
- STORE c into ':OUTPATH:';?,
- 'verify_pig_script' => q?
- a = load ':INPATH:/singlefile/studenttab10k' as (name, age, gpa);
- b = limit a 1;
- c = foreach b generate 'tom van buren', 68, 'socialist', 390.19;
- STORE c into ':OUTPATH:';?,
+ dump c;?,
+ 'expected_out_regex' => ":UdfDistributedCache_1_out:",
},
]
}, {
Modified: pig/trunk/test/e2e/pig/tests/streaming.conf
URL: http://svn.apache.org/viewvc/pig/trunk/test/e2e/pig/tests/streaming.conf?rev=1482476&r1=1482475&r2=1482476&view=diff
==============================================================================
--- pig/trunk/test/e2e/pig/tests/streaming.conf (original)
+++ pig/trunk/test/e2e/pig/tests/streaming.conf Tue May 14 17:24:59 2013
@@ -42,6 +42,11 @@ A = load ':INPATH:/singlefile/studenttab
B = foreach A generate $2, $1, $0;
C = stream B through `awk 'BEGIN {FS = "\t"; OFS = "\t"} {print $3, $2, $1}'`;
store C into ':OUTPATH:';#,
+ 'pig_win' => q#
+A = load ':INPATH:/singlefile/studenttab10k';
+B = foreach A generate $2, $1, $0;
+C = stream B through `awk "BEGIN {FS = \\\\"\t\\\\"; OFS = \\\\"\t\\\\"} {print $3, $2, $1}"`;
+store C into ':OUTPATH:';#,
'sql' => "select name, age, gpa from studenttab10k;",
},
{
@@ -53,6 +58,12 @@ B = foreach A generate $2, $1, $0;
C = stream B through `awk 'BEGIN {FS = "\t"; OFS = "\t"} {print $3, $2, $1}'` as (name, age, gpa);
D = foreach C generate name, age;
store D into ':OUTPATH:';#,
+ 'pig_win' => q#
+A = load ':INPATH:/singlefile/studenttab10k';
+B = foreach A generate $2, $1, $0;
+C = stream B through `awk "BEGIN {FS = \\\\"\t\\\\"; OFS = \\\\"\t\\\\"} {print $3, $2, $1}"` as (name, age, gpa);
+D = foreach C generate name, age;
+store D into ':OUTPATH:';#,
'sql' => "select name, age from studenttab10k;",
},
{