#!/bin/sh # # Test that 'morph update-gits' updates every chunk that depends on the # strata listed on the command line # # Copyright (C) 2012 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. set -eu # create an empty commit in a chunk repository cd "$DATADIR/chunk-repo" git checkout --quiet farrokh git commit --quiet --allow-empty --allow-empty-message -m "" NEWREF="$(git show-ref --hash farrokh)" "$SRCDIR/scripts/test-morph" update-gits test:morphs-repo master hello-stratum # check the top commit of the cached repo's farrokh branch cd "$DATADIR/cache/gits/"*chunk?repo* test "$(git show-ref --hash refs/remotes/origin/farrokh)" = "$NEWREF"