Implemented quoted strings support in hydra-build-products to allow file names with spaces + testcase
[?]
Mar 20, 2013, 5:05 PM
PY5GVGC7QVTOTCZ52LRHUCUJY5MER6ADCMTC2FR2WQACQV4QV5CQCDependencies
- [2]
S5NPXZG3Fix indentation - [3]
YDVFPMKPSecurity: Ensure that a build product refers to the Nix store - [4]
RBZRCTALhydra: fixed and re-enabled evaluation tests - [5]
3RL7VFKEAdd tests for "git describe --long". - [6]
FAIJDQKZ - [7]
HE3GX5IPOptimize fetch-git. - [8]
HX4QYOYAadd first evaluations tests - [9]
SBKX3YH2cleanup - [10]
5SMQ2PLKFix tests - [11]
FM4O2L4Mhydra: if evaluator sees cached build, also add the buildproducts - [12]
WFJ3ZPRMadd tests for scm inputs - [13]
PMNWRTGJAdd multiple output support - [*]
OOQ2D3KC* Refactoring: move fetchInput out of hydra_scheduler into a separate
Change contents
- replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 785
/^([\w\-]+)\s+([\w\-]+)\s+(\S+)(\s+(\S+))?$/ or next;/^([\w\-]+)\s+([\w\-]+)\s+("[^"]*"|\S+)(\s+(\S+))?$/ or next; - replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 788
my $path = File::Spec->canonpath($3);my $path = File::Spec->canonpath((substr $3, 0, 1) eq "\"" ? substr $3, 1, -1 : $3); - replacement in tests/evaluation-tests.pl at line 10
use Test::Simple tests => 60;use Test::Simple tests => 68; - edit in tests/evaluation-tests.pl at line 137
}}# Test build products$jobset = createBaseJobset("build-products", "build-products.nix");ok(evalSucceeds($jobset), "Evaluating jobs/build-products.nix should exit with return code 0");ok(nrQueuedBuildsForJobset($jobset) == 2 , "Evaluating jobs/build-products.nix should result in 2 builds");for my $build (queuedBuildsForJobset($jobset)) {ok(runBuild($build), "Build '".$build->job->name."' from jobs/build-products.nix should exit with code 0");my $newbuild = $db->resultset('Builds')->find($build->id);ok($newbuild->finished == 1 && $newbuild->buildstatus == 0, "Build '".$build->job->name."' from jobs/build-products.nix should have buildstatus 0");my $buildproducts = $db->resultset('BuildProducts')->search({ build => $build->id });my $buildproduct = $buildproducts->next;if($build->job->name eq "simple") {ok($buildproduct->name eq "text.txt", "We should have text.txt, but found: ".$buildproduct->name."\n");} elsif ($build->job->name eq "with_spaces") {ok($buildproduct->name eq "some text.txt", "We should have: \"some text.txt\", but found: ".$buildproduct->name."\n");