Add eval test for specific git revision

[?]
Apr 12, 2016, 8:27 PM
ABB3BIS2X3MOXUJD5CUEODSJ3QCRZ4YDSNME2AHNCPG5OJ2F2I5QC

Dependencies

  • [2] L7RW467Z Add a test for darcs inputs.
  • [3] WFJ3ZPRM add tests for scm inputs
  • [4] SBKX3YH2 cleanup
  • [5] FAIJDQKZ
  • [6] HX4QYOYA add first evaluations tests
  • [7] RBZRCTAL hydra: fixed and re-enabled evaluation tests
  • [8] 5SMQ2PLK Fix tests
  • [9] PY5GVGC7 Implemented quoted strings support in hydra-build-products to allow file names with spaces + testcase
  • [10] 3RL7VFKE Add tests for "git describe --long".
  • [11] HE3GX5IP Optimize fetch-git.

Change contents

  • replacement in tests/evaluation-tests.pl at line 10
    [3.969][2.180:210]()
    use Test::Simple tests => 72;
    [3.969]
    [3.998]
    use Test::Simple tests => 76;
  • edit in tests/evaluation-tests.pl at line 79
    [3.968]
    [3.968]
    name => "git-rev",
    nixexpr => "git-rev-input.nix",
    type => "git",
    uri => "$jobsBaseUri/git-repo 7f60df502b96fd54bbfa64dd94b56d936a407701",
    update => getcwd . "/jobs/git-rev-update.sh"
    },
    {
  • file addition: git-rev-input.nix (----------)
    [3.1729]
    with import ./config.nix;
    { src }:
    {
    copy =
    mkDerivation {
    name = "git-rev-input";
    builder = ./scm-builder.sh;
    inherit src;
    };
    }
  • file addition: git-rev-update.sh (---r------)
    [3.1729]
    #! /bin/sh
    set -e
    repo=git-repo
    export HOME=$(pwd)
    STATE_FILE=$(pwd)/.git-rev-state
    if test -e $STATE_FILE; then
    state=1
    rm $STATE_FILE
    else
    state=0
    touch $STATE_FILE
    fi
    echo "STATE: $state"
    case $state in
    (0) echo "::Create repo. -- continue -- updated::"
    git init $repo
    cd $repo
    git config --global user.email "you@example.com"
    git config --global user.name "Your Name"
    touch foo
    git add foo
    GIT_AUTHOR_DATE="1970-01-01T00:00:00 +0000" GIT_COMMITTER_DATE="1970-01-01T00:00:00 +0000" git commit -m "Add foo"
    git tag -a -m "First Tag." tag0
    ;;
    (*) echo "::End. -- stop -- nothing::"
    rm -rf $repo
    ;;
    esac