Update "make check" for the new queue runner

[?]
Jun 25, 2015, 1:29 PM
7VQ4ALFYKJBFR46T3WZDMGOXNRR3QNJEJQVBYJM4HSJUOOUD6WBQC

Dependencies

  • [2] RMQG4FT3 make clean: Delete darcs-repo
  • [3] 2PPFPWQL Fix test
  • [4] 5Q7X5FPJ hydra-queue-runner: Improve SSH flags
  • [5] 7I7XHQAE Fix sending notifications in the successful case
  • [6] SODOV2CM Automatically reload $NIX_REMOTE_SYSTEMS when it changes
  • [7] HX4QYOYA add first evaluations tests
  • [8] Q5HZWFCY Add support for darcs repositories.
  • [9] FANTYCR7 Materialize the number of finished builds
  • [10] M2MAIY22 Add bar with 1
  • [11] WKJFPR77 hydra-queue-runner: Maintain count of active build steps
  • [12] OB7GB5DL Test environment cleanups
  • [13] GS4BE6TB Asynchronously compress build logs
  • [14] PLOZBRTR Add command ‘hydra-queue-runner --status’ to show current status
  • [15] S5KKIQ3F * Remove accidentally commited foo/bar.
  • [16] RQUAATWB Add status dump facility
  • [17] YZAI5GQU Implement a database connection pool
  • [18] 24BMQDZA Start of single-process hydra-queue-runner
  • [19] A43SLRSH Fix handling of IPC::Run::run exit status
  • [20] QQQSXZWR remove debug target
  • [21] PVBTVPKJ nix needs env vars as absolute paths
  • [22] HE3GX5IP Optimize fetch-git.
  • [23] MESO2HDV Remove obsolete JobStatus source
  • [24] K5G5GZY7 Guard against concurrent invocations of hydra-queue-runner
  • [25] O64P4XJS Keep per-machine stats
  • [26] RBZRCTAL hydra: fixed and re-enabled evaluation tests
  • [27] P43FHUUV there are 43 tests
  • [28] OSZDLGMP add target to make simple git/hg/svn inputs
  • [29] L4AI5YL6 Rename hydra_*.pl to hydra-*
  • [30] S5NPXZG3 Fix indentation
  • [31] FQQRJUO4 Mark builds as busy
  • [32] WFJ3ZPRM add tests for scm inputs
  • [33] PBJJSE3D make sure jobs/* and Setup.pm is in tarball
  • [34] LZVO64YG Merge in the first bits of the API work
  • [35] L7RW467Z Add a test for darcs inputs.
  • [36] YL5OIJNQ disabled evaluation tests until i figure out why it fails in buildfarm and succeeds locally
  • [37] DES4PSRL add basic query tests for JobStatus/LatestSucceeded/ActiveJobs
  • [38] JRVI4XTV tests: Use $(builddir) instead of `pwd`.
  • [39] D6EL7KR6 Fix broken test
  • [40] I3TU2UJQ
  • [41] FDHQ2OLB Forgot to commit
  • [42] 2FT4LEIP Remove unused ActiveJobs source
  • [43] JFD25IUU hydra-queue-runner: Implement --unlock
  • [44] 7RO7CINM setup environment variables for tests
  • [45] WHS5RMPO
  • [46] 5AIYUMTB Basic remote building
  • [47] IWB3F4Z6 Fail builds with previously failed steps early
  • [48] YTJBF27T set BZR_HOME env var so bzr won't fail
  • [49] AK66K4KY Fix the test
  • [50] 3XM2QEGW Fix query-all-tables test count, there are more tables now
  • [51] ZHBEOOUQ show evaluation errors in log of tests
  • [52] XEQNMJ73 Increase depth 0
  • [53] 4HPT4SDD Revert "Remove now-unused SystemTypes table"
  • [54] CKN4PV3J Stupid brittle tests
  • [55] WZ7PXAIT Doh
  • [56] DCHQR576 add bzr-repo target
  • [57] ZSBPKI2P Pass ssh key
  • [58] MB3TISH2 Rate-limit the number of threads copying closures at the same time
  • [59] N3KBVX6G Set $PERL5LIB properly in hydra-init in "make check"
  • [60] QIW2WZKW Fix indentation
  • [61] YDW2NUIW Fix "make check"
  • [62] G2ZB6464 first test, not yet in buildprocess
  • [63] UGA45FNC Add a plugin for backing up builds in s3
  • [64] E7FID72S Remove the BuildMachines and BuildMachinesSystemTypes tables
  • [65] NJJ7H64S Very basic multi-threaded queue runner
  • [66] FAIJDQKZ
  • [67] PXUP3HRC hydra: query-all-tables.pl.in, set executable
  • [68] 5SMQ2PLK Fix tests
  • [69] V2ALOFRR Fix the test
  • [70] JD7AWXQG Remove now-unused SystemTypes table
  • [*] ENXUSMSV Make concurrency more robust
  • [*] ATJ54SPX Use PostgreSQL notifications for queue events
  • [*] QJRDO2B4 Simplify retry handling
  • [*] HUUZFPPK Fix race between the queue monitor and the builder threads
  • [*] 63W4T5PU hydra-queue-runner: More stats

Change contents

  • replacement in src/hydra-queue-runner/Makefile.am at line 3
    [7.255][7.0:83]()
    hydra_queue_runner_SOURCES = hydra-queue-runner.cc build-result.cc build-remote.cc
    [7.255]
    [7.322]
    hydra_queue_runner_SOURCES = hydra-queue-runner.cc build-result.cc build-remote.cc \
    build-remote.hh build-result.hh counter.hh pool.hh sync.hh token-server.hh
  • edit in src/hydra-queue-runner/build-remote.cc at line 22
    [7.379]
    [7.379]
    static void append(Strings & dst, const Strings & src)
    {
    dst.insert(dst.end(), src.begin(), src.end());
    }
  • replacement in src/hydra-queue-runner/build-remote.cc at line 48
    [7.45][7.45:83](),[7.83][4.0:212]()
    // FIXME: connection timeouts
    Strings argv(
    { "ssh", sshName, "-i", sshKey, "-x", "-a"
    , "-oBatchMode=yes", "-oConnectTimeout=60", "-oTCPKeepAlive=yes"
    , "--", "nix-store", "--serve", "--write" });
    [7.917]
    [7.1010]
    Strings argv;
    if (sshName == "localhost")
    argv = {"nix-store", "--serve", "--write"};
    else {
    argv = {"ssh", sshName};
    if (sshKey != "" && sshKey != "-") append(argv, {"-i", sshKey});
    append(argv,
    { "-x", "-a", "-oBatchMode=yes", "-oConnectTimeout=60", "-oTCPKeepAlive=yes"
    , "--", "nix-store", "--serve", "--write" });
    }
  • replacement in src/hydra-queue-runner/build-remote.cc at line 59
    [7.1011][7.1011:1099]()
    execvp("ssh", (char * *) stringsToCharPtrs(argv).data()); // FIXME: remove cast
    [7.1011]
    [7.1099]
    execvp(argv.front().c_str(), (char * *) stringsToCharPtrs(argv).data()); // FIXME: remove cast
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 235
    [6.365][7.7016:7045](),[7.7016][7.7016:7045]()
    Sync<Machines> machines;
    [6.365]
    [6.366]
    Sync<Machines> machines; // FIXME: use atomic_shared_ptr
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 272
    [7.7254]
    [7.6420]
    /* Specific build to do for --build-one (testing only). */
    BuildID buildOne;
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 348
    [7.1378][7.1378:1394]()
    void run();
    [7.1378]
    [7.7481]
    void run(BuildID buildOne = 0);
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 568
    [72.2137]
    [73.1642]
    if (buildOne && id != buildOne) continue;
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1128
    [72.8141]
    [7.15415]
    bool quit = build->id == buildOne;
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1197
    [74.474]
    [74.474]
    if (quit) exit(1);
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1389
    [5.519]
    [75.9900]
    if (buildOne == b->id) quit = true;
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1410
    [76.527]
    [74.2182]
    if (quit) exit(0); // testing hack
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 1707
    [7.1312][7.3180:3198](),[7.3180][7.3180:3198]()
    void State::run()
    [7.1312]
    [7.3198]
    void State::run(BuildID buildOne)
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1710
    [7.1131]
    [7.1131]
    this->buildOne = buildOne;
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1766
    [7.3931]
    [7.19176]
    BuildID buildOne = 0;
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 1773
    [7.4004][7.193:210](),[7.193][7.193:210]()
    else
    [7.4004]
    [7.210]
    else if (*arg == "--build-one") {
    if (!string2Int<BuildID>(getArg(*arg, arg, end), buildOne))
    throw Error("‘--build-one’ requires a build ID");
    } else
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 1791
    [7.344][7.344:369]()
    state.run();
    [7.344]
    [7.19568]
    state.run(buildOne);
  • file deletion: query-all-tables.pl.in (---r------)query-all-tables.pl.in (----------)query-all-tables.pl (---r------)
    [7.73][7.0:46](),[7.46][7.291:291](),[7.73][7.725:771](),[7.771][7.291:291](),[7.73][7.899:942](),[7.942][7.291:291]()
    use strict;
    use Hydra::Schema;
    use Hydra::Model::DB;
    my $db = Hydra::Model::DB->new;
    my @sources = $db->schema->sources;
    my $nrtables = scalar(@sources);
    use Test::Simple tests => 38;
    foreach my $source (@sources) {
    my $title = "Basic select query for $source";
    if ($source eq "SchemaVersion" || $source eq "NrBuilds") {
    ok(scalar($db->resultset($source)->all) == 1, $title);
    } elsif( $source !~ m/^LatestSucceeded/) {
    ok(scalar($db->resultset($source)->all) == 0, $title);
    } else {
    ok(scalar($db->resultset($source)->search({},{ bind => ["", "", ""] })) == 0, $title);
    }
    }
  • replacement in tests/Makefile.am at line 3
    [7.36][7.26:65](),[7.176][7.26:65](),[7.26][7.26:65]()
    HYDRA_DBI="dbi:SQLite:db.sqlite" \
    [7.176]
    [7.177]
    HYDRA_DBI="dbi:Pg:dbname=hydra-test-suite;" \
  • replacement in tests/Makefile.am at line 25
    [7.103][7.118:164](),[7.45][7.428:429](),[7.164][7.428:429](),[7.428][7.428:429](),[7.429][7.3550:3557](),[7.3557][7.25:51](),[7.437][7.25:51](),[7.51][2.0:122](),[2.122][7.3558:3574](),[7.157][7.3558:3574]()
    query-all-tables.pl \
    evaluation-tests.pl
    clean:
    chmod -R a+w nix || true
    rm -rf db.sqlite data nix git-repo hg-repo svn-repo svn-checkout svn-checkout-repo bzr-repo bzr-checkout-repo darcs-repo
    rm -f .*-state
    [7.103]
    [7.125]
    set-up.pl \
    evaluation-tests.pl \
    tear-down.pl
  • replacement in tests/Makefile.am at line 29
    [7.126][7.218:250]()
    check_SCRIPTS = db.sqlite repos
    [7.126]
    [7.147]
    check_SCRIPTS = repos
  • replacement in tests/Setup.pm at line 74
    [7.1795][7.9464:9552](),[7.9552][7.3665:3711](),[7.1897][7.3665:3711]()
    my ($res, $stdout, $stderr) = captureStdoutStderr(60, ("hydra-build", $build->id));
    print "STDERR: $stderr" if $stderr ne "";
    [7.1795]
    [7.3711]
    my ($res, $stdout, $stderr) = captureStdoutStderr(60, ("hydra-queue-runner", "-vvvv", "--build-one", $build->id));
  • file move: evaluation-tests.pl (---r------)evaluation-tests.pl (----------)
    [7.73]
    [7.804]
  • replacement in tests/evaluation-tests.pl at line 31
    [7.166][7.166:223]()
    my $expected = $build->job->name eq "fails" ? 1 : 0;
    [7.166]
    [7.223]
    my $expected = $build->job->name eq "fails" ? 1 : $build->job->name =~ /with_failed/ ? 6 : 0;
  • file move: s3-backup-test.pl (---r------)s3-backup-test.pl (----------)
    [7.73]
    [7.9772]
  • file addition: set-up.pl (----------)
    [7.73]
    use strict;
    system("createdb hydra-test-suite") == 0 or die;
    system("hydra-init") == 0 or die;
  • file addition: tear-down.pl (----------)
    [7.73]
    use strict;
    system("chmod -R a+w nix") == 0 or die;
    system("rm -rf data nix git-repo hg-repo svn-repo svn-checkout svn-checkout-repo bzr-repo bzr-checkout-repo darcs-repo") == 0 or die;
    system("rm -f .*-state") == 0 or die;
    system("dropdb hydra-test-suite") == 0 or die;