Fix handling of IPC::Run::run exit status

[?]
Jan 23, 2013, 2:56 PM
A43SLRSH6OIIEZWLRKLMERX7HOMBICKG7WHELCZYLOJWZ3JFRV2AC

Dependencies

  • [2] G7XYM6MU use local clone to limit bandwidth usage
  • [3] 5FP63F5T More command renaming.
  • [4] GAZHOBWE Better fix
  • [5] OXJ4QT6K Strip all whitespace from revision from subversion call. Patch provided by Petr Ročkai
  • [6] OSTNUSGY Fallback for git fetch, which allows specific gits revisions to be used as build inputs.
  • [7] QIW2WZKW Fix indentation
  • [8] 3RL7VFKE Add tests for "git describe --long".
  • [9] HQ4QHAOF make default branch default, remove quotes
  • [10] PXUCXYZI * Pass `-j 1' to hydra_eval_jobs to ensure that it can make progress
  • [11] AMFMXR52 Provide a command ‘hydra-init’ to initialise/upgrade the database
  • [12] KW3M6NSR hydra: run nix-prefetch-git on local clone of git repo
  • [13] 4FWDVNWA Pass additional attributes for Git inputs
  • [14] C7CXMZ66 hydra: do not perform git clone every time. in stead work on local clone and pull
  • [15] ARD6Z67T Do incremental SVN checkouts
  • [16] QMW24O5S Add support for Guile & Guix.
  • [17] RBZRCTAL hydra: fixed and re-enabled evaluation tests
  • [18] Y5DJHUBM Allow Subversion inputs to specify a revision number.
  • [19] PNPT3Y7R Use git fetch --all to update local clone in stead of git pull. Also, do not use --branch in initial clone.
  • [20] SBKX3YH2 cleanup
  • [21] WHS5RMPO
  • [22] KQS7DSKJ * Clean up indentation.
  • [23] G2ZB6464 first test, not yet in buildprocess
  • [24] PVBTVPKJ nix needs env vars as absolute paths
  • [25] M73H45NE add support for mercurial tags/revs
  • [26] UO67NQMR Change `fetchInputGit' to do `git clone -b BRANCH' instead of `git clone'.
  • [27] 6ZSLRO7M fetchInputGit: Populate TopGit branches when on a topic branch.
  • [28] BK24VA6Q * for git inputs, check latest revision of branch (defaults to master for now), if there is change, only use input if last checkout was > hour ago.
  • [29] O25D52TA initial support for mercurial
  • [30] X3COYEVI Add missing /
  • [31] N3KBVX6G Set $PERL5LIB properly in hydra-init in "make check"
  • [32] P5XCKTFD Fix sysbuild input type handling
  • [33] VOBFCHIX use top_srcdir in stead of srcdir
  • [34] I3TU2UJQ
  • [35] 3XTHEUMP * Implemented the clone feature.
  • [36] FXW2UR7F initial bzr support
  • [37] ZHBEOOUQ show evaluation errors in log of tests
  • [38] SGNXIOI4 Hydra/32: Add option to force evaluation of a certain jobset via web interface (for admins only)
  • [39] 3PNG7NIB Remove trailing whitespace
  • [40] CHQEG6WY Hydra/29: Added timeout to svn/git checkouts, job evaluation
  • [41] EDRUQ4UK Die TABs die
  • [42] INNOEHO6 * Fix getBuildLog for bzip2'd files.
  • [43] PIMGMGAF Rename hydra_eval_jobs to hydra-eval-jobs
  • [44] EDDTVGB4 set BZR_HOME env var so bzr won't fail
  • [45] WWUOQ7V4 * hydra: indentation and fixed duplicate key in cachedgitinputs bug
  • [46] JTRG7RDQ add support for git as jobinput
  • [47] HABC6L4G Revert "Use git fetch --all to update local clone in stead of git pull. Also, do not use --branch in initial clone."
  • [48] 2WRTOU2Z Cleanup
  • [49] 7XC62UTY Use git fetch -fu origin +$branch:$branch to fetch all changes for branch.
  • [50] 7RO7CINM setup environment variables for tests
  • [51] DAKY4N64 Allow use of a single Git clone for several branches.
  • [52] V2MLUZRP Random indentation fix
  • [53] OB7GB5DL Test environment cleanups
  • [54] HX4QYOYA add first evaluations tests
  • [55] 3I6BNF4S hydra: do not use refs/heads while checking for latest commit in branch
  • [56] 6KJXJB7N qualify ordery_by clauses when necessary, remove unnecessary order_by's, reported by Ludo, resulted in errors in sqlite
  • [57] YFPZ46YK * hydra: added variant of build input type, 'build output (same system)' to allow better continous integration in one jobset for multiple system. it makes sure that the system of the build that is passed as input for a job has the same system as the job.
  • [58] VLS2QTLM Add numbered revision id of mercurial as revCount.
  • [59] YL5OIJNQ disabled evaluation tests until i figure out why it fails in buildfarm and succeeds locally
  • [60] DCHQR576 add bzr-repo target
  • [61] HE3GX5IP Optimize fetch-git.
  • [62] BMSQD2ZH Indentation
  • [63] 2WUNXJGW Hydra/26: Go back to using "svn export" as default for svn, added svn-checkout type for jobset which need .svn dirs. export is much more efficient
  • [64] WFJ3ZPRM add tests for scm inputs
  • [65] QQQSXZWR remove debug target
  • [66] FAIJDQKZ
  • [67] OOQ2D3KC * Refactoring: move fetchInput out of hydra_scheduler into a separate
  • [68] YRKCK7UB Fix Mercurial input fetching if a cached input has been GC'ed
  • [69] V2ALOFRR Fix the test
  • [*] ZWCTAZGL added newsitems, added some admin options to clear various caches.

Change contents

  • replacement in src/lib/Hydra/Controller/Admin.pm at line 427
    [8.423][3.180:293]()
    (my $res, my $stdout, my $stderr) = captureStdoutStderr(60, ("hydra-evaluator", $projectName, $jobsetName));
    [8.423]
    [8.424]
    captureStdoutStderr(60, "hydra-evaluator", $projectName, $jobsetName);
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 119
    [8.678][8.678:742]()
    or die "Cannot copy path $uri to the Nix store.\n";
    [8.678]
    [8.742]
    or die "cannot copy path $uri to the Nix store.\n";
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 173
    [8.217][8.217:361]()
    die "Cannot get head revision of Subversion repository at `$uri':\n$stderr"
    unless IPC::Run::run(@cmd, \$stdout, \$stderr);
    [8.217]
    [5.0]
    IPC::Run::run(@cmd, \$stdout, \$stderr);
    die "cannot get head revision of Subversion repository at `$uri':\n$stderr" if $?;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 197
    [8.493][8.0:63](),[8.257][8.0:63](),[8.63][8.494:560]()
    (my $res, $stdout, $stderr) = captureStdoutStderr(600,
    ("svn", "checkout", $uri, "-r", $revision, $wcPath));
    [8.493]
    [8.560]
    (my $res, $stdout, $stderr) = captureStdoutStderr(600, "svn", "checkout", $uri, "-r", $revision, $wcPath);
    die "error checking out Subversion repo at `$uri':\n$stderr" if $res;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 325
    [8.318][8.318:378](),[8.378][8.0:70](),[8.271][8.0:70](),[8.49][8.320:390](),[8.70][8.320:390](),[8.132][8.320:390](),[8.320][8.320:390]()
    ($res, $stdout, $stderr) = captureStdoutStderr(600,
    ("git", "clone", "--branch", $branch, $uri, $clonePath));
    die "Error cloning git repo at `$uri':\n$stderr" unless $res;
    [8.318]
    [8.390]
    ($res, $stdout, $stderr) = captureStdoutStderr(600, "git", "clone", "--branch", $branch, $uri, $clonePath);
    die "error cloning git repo at `$uri':\n$stderr" if $res;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 335
    [8.264][8.264:328]()
    ("git", "fetch", "-fu", "origin", "+$branch:$branch"));
    [8.264]
    [6.0]
    "git", "fetch", "-fu", "origin", "+$branch:$branch");
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 337
    [6.56][6.56:112](),[6.112][8.328:414](),[8.328][8.328:414]()
    ("git", "fetch", "-fu", "origin")) unless $res;
    die "Error fetching latest change from git repo at `$uri':\n$stderr" unless $res;
    [6.56]
    [8.563]
    "git", "fetch", "-fu", "origin") if $res;
    die "error fetching latest change from git repo at `$uri':\n$stderr" if $res;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 342
    [8.1388][8.1388:1485]()
    die "Error getting revision number of Git branch '$branch' at `$uri':\n$stderr" unless $res;
    [8.1388]
    [8.515]
    die "error getting revision number of Git branch '$branch' at `$uri':\n$stderr" if $res;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 345
    [8.240][8.359:405](),[8.1528][8.359:405](),[8.359][8.359:405](),[8.405][8.1529:1642]()
    die unless $revision =~ /^[0-9a-fA-F]+$/;
    die "Error getting a well-formated revision number of Git branch '$branch' at `$uri':\n$stdout" unless $res;
    [8.1528]
    [8.405]
    die "error getting a well-formated revision number of Git branch '$branch' at `$uri':\n$stdout"
    unless $revision =~ /^[0-9a-fA-F]+$/;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 355
    [8.1890][8.1890:2082]()
    ($res, $stdout, $stderr) = captureStdoutStderr(600,
    ("git", "checkout", "$branch"));
    die "Error checking out Git branch '$branch' at `$uri':\n$stderr" unless $res;
    [8.1890]
    [8.237]
    ($res, $stdout, $stderr) = captureStdoutStderr(600, "git", "checkout", "$branch");
    die "error checking out Git branch '$branch' at `$uri':\n$stderr" if $res;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 362
    [8.2308][8.2308:2464]()
    ("tg", "remote", "--populate", "origin"));
    print STDERR "Warning: `tg remote --populate origin' failed:\n$stderr" unless $res;
    [8.2308]
    [8.2464]
    "tg", "remote", "--populate", "origin");
    print STDERR "warning: `tg remote --populate origin' failed:\n$stderr" if $res;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 400
    [8.1][8.3442:3502](),[8.3502][8.0:58](),[8.299][8.0:58](),[8.58][8.7529:7625](),[8.351][8.7529:7625](),[8.7529][8.7529:7625]()
    ($res, $stdout, $stderr) = captureStdoutStderr(600,
    ("nix-prefetch-git", $clonePath, $revision));
    die "Cannot check out Git repository branch '$branch' at `$uri':\n$stderr" unless $res;
    [8.1]
    [8.2]
    ($res, $stdout, $stderr) = captureStdoutStderr(600, "nix-prefetch-git", $clonePath, $revision);
    die "cannot check out Git repository branch '$branch' at `$uri':\n$stderr" if $res;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 453
    [8.394][8.394:582]()
    (my $res, $stdout, $stderr) = captureStdoutStderr(600,
    ("bzr", "branch", $uri, $clonePath));
    die "Error cloning bazaar branch at `$uri':\n$stderr" unless $res;
    [8.394]
    [8.582]
    (my $res, $stdout, $stderr) = captureStdoutStderr(600, "bzr", "branch", $uri, $clonePath);
    die "error cloning bazaar branch at `$uri':\n$stderr" if $res;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 458
    [8.621][8.621:791]()
    (my $res, $stdout, $stderr) = captureStdoutStderr(600,
    ("bzr", "pull"));
    die "Error pulling latest change bazaar branch at `$uri':\n$stderr" unless $res;
    [8.621]
    [8.791]
    (my $res, $stdout, $stderr) = captureStdoutStderr(600, "bzr", "pull");
    die "error pulling latest change bazaar branch at `$uri':\n$stderr" if $res;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 462
    [8.854][8.854:942]()
    my @cmd = (["bzr", "revno"],
    "|", ["sed", 's/^ *\([0-9]*\).*/\1/']);
    [8.854]
    [8.942]
    my @cmd = (["bzr", "revno"], "|", ["sed", 's/^ *\([0-9]*\).*/\1/']);
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 464
    [8.943][8.943:1071]()
    die "Cannot get head revision of Bazaar branch at `$uri':\n$stderr"
    unless IPC::Run::run(@cmd, \$stdout, \$stderr);
    [8.943]
    [8.1071]
    IPC::Run::run(@cmd, \$stdout, \$stderr);
    die "cannot get head revision of Bazaar branch at `$uri':\n$stderr" if $?;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 484
    [8.1817][8.1817:1950]()
    ("nix-prefetch-bzr", $clonePath, $revision));
    die "Cannot check out Bazaar branch `$uri':\n$stderr" unless $res;
    [8.1817]
    [8.1950]
    "nix-prefetch-bzr", $clonePath, $revision);
    die "cannot check out Bazaar branch `$uri':\n$stderr" if $res;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 523
    [8.612][8.612:736]()
    ("hg", "clone", $uri, $clonePath));
    die "Error cloning mercurial repo at `$uri':\n$stderr" unless $res;
    [8.612]
    [8.736]
    "hg", "clone", $uri, $clonePath);
    die "error cloning mercurial repo at `$uri':\n$stderr" if $res;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 529
    [8.801][8.801:971]()
    (my $res, $stdout, $stderr) = captureStdoutStderr(600,
    ("hg", "pull"));
    die "Error pulling latest change mercurial repo at `$uri':\n$stderr" unless $res;
    [8.801]
    [8.971]
    (my $res, $stdout, $stderr) = captureStdoutStderr(600, "hg", "pull");
    die "error pulling latest change mercurial repo at `$uri':\n$stderr" if $res;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 532
    [8.972][8.0:131](),[8.131][8.171:258](),[8.167][8.171:258](),[8.171][8.171:258]()
    (my $res1, $stdout, $stderr) = captureStdoutStderr(600,("hg", "log", "-r", $id, "--template", "{node|short} {rev} {branch}"));
    die "Error getting branch and revision of $id from `$uri':\n$stderr" unless $res1;
    [8.972]
    [8.1142]
    (my $res1, $stdout, $stderr) = captureStdoutStderr(600,
    "hg", "log", "-r", $id, "--template", "{node|short} {rev} {branch}");
    die "error getting branch and revision of $id from `$uri':\n$stderr" if $res1;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 552
    [8.1878][2.0:57](),[2.57][8.1929:2011](),[8.1929][8.1929:2011]()
    ("nix-prefetch-hg", $clonePath, $revision));
    die "Cannot check out Mercurial repository `$uri':\n$stderr" unless $res;
    [8.1878]
    [8.2011]
    "nix-prefetch-hg", $clonePath, $revision);
    die "cannot check out Mercurial repository `$uri':\n$stderr" if $res;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 619
    [8.10328][8.10328:10391]()
    die "Input `" . $name . "' has unknown type `$type'.";
    [8.10328]
    [8.10391]
    die "input `" . $name . "' has unknown type `$type'.";
  • edit in src/lib/Hydra/Helper/AddBuilds.pm at line 705
    [8.1377][8.385:398](),[8.385][8.385:398]()
    my $res;
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 712
    [8.556][8.2468:2469](),[8.10399][8.2468:2469](),[8.2469][8.557:623]()
    $res = IPC::Run::run(\@cmd, \$stdin, \$stdout, \$stderr);
    [8.556]
    [8.623]
    IPC::Run::run(\@cmd, \$stdin, \$stdout, \$stderr);
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 717
    [8.22][8.1497:1567](),[8.1567][8.3542:3583]()
    die unless $@ eq "timeout\n"; # propagate unexpected errors
    return (undef, "", "timeout\n");
    [8.22]
    [8.116]
    die unless $@ eq "timeout\n"; # propagate unexpected errors
    return (-1, "", "timeout\n");
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 720
    [8.129][8.1606:1647]()
    return ($res, $stdout, $stderr);
    [8.129]
    [8.163]
    return ($?, $stdout, $stderr);
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 729
    [8.2609][8.2609:2779]()
    or die "Cannot find the input containing the job expression.\n";
    die "Multiple alternatives for the input containing the Nix expression are not supported.\n"
    [8.2609]
    [8.2779]
    or die "cannot find the input containing the job expression.\n";
    die "multiple alternatives for the input containing the Nix expression are not supported.\n"
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 738
    [8.906][8.2530:2650](),[8.116][8.3093:3181](),[8.236][8.3093:3181](),[8.1013][8.3093:3181](),[8.2650][8.3093:3181](),[8.3093][8.3093:3181]()
    ($evaluator, $nixExprFullPath, "--gc-roots-dir", getGCRootsDir, "-j", 1, inputsToArgs($inputInfo, $exprType)));
    die "Cannot evaluate the Nix expression containing the jobs:\n$stderr" unless $res;
    [8.906]
    [8.3181]
    $evaluator, $nixExprFullPath, "--gc-roots-dir", getGCRootsDir, "-j", 1, inputsToArgs($inputInfo, $exprType));
    die "cannot evaluate the Nix expression containing the jobs:\n$stderr" if $res;
  • replacement in tests/Makefile.am at line 27
    [8.223][8.429:437](),[8.429][8.429:437]()
    clean :
    [8.429]
    [8.25]
    clean:
  • edit in tests/Makefile.am at line 30
    [8.157]
    [8.125]
    rm -f .*-state
  • replacement in tests/Makefile.am at line 34
    [8.148][8.0:51]()
    db.sqlite : $(top_srcdir)/src/sql/hydra-sqlite.sql
    [8.148]
    [4.59]
    db.sqlite: $(top_srcdir)/src/sql/hydra-sqlite.sql
  • replacement in tests/Makefile.am at line 37
    [8.1][8.0:13]()
    repos : dirs
    [8.1]
    [8.252]
    repos: dirs
  • replacement in tests/Makefile.am at line 39
    [8.253][8.37764:37771]()
    dirs :
    [8.253]
    [8.157]
    dirs:
  • replacement in tests/Setup.pm at line 69
    [7.1755][7.1755:1772]()
    return $res;
    [7.1755]
    [8.1482]
    return !$res;
  • replacement in tests/Setup.pm at line 75
    [7.1897][7.1897:1971]()
    print "STDERR: $stderr" if $res;
    return ($res, $stdout, $stderr);
    [7.1897]
    [8.4328]
    print "STDERR: $stderr" if $stderr ne "";
    return !$res;
  • replacement in tests/Setup.pm at line 82
    [7.2077][7.2077:2145]()
    die "Unexpected update error with $scm: $stderr\n" unless $res;
    [7.2077]
    [7.2145]
    die "unexpected update error with $scm: $stderr\n" if $res;