[PATCH 4/4] Test that systems can build with YAML morphologies

Sam Thursfield sam.thursfield at codethink.co.uk
Tue Jan 22 11:36:03 GMT 2013


On 01/22/2013 11:09 AM, Sam Thursfield wrote:
> On 01/21/2013 06:16 PM, Richard Maw wrote:
>> ---
>>   .../{lib => builds-with-yaml-morphologies.script}  |   22 +---
>>   tests.as-root/builds-with-yaml-morphologies.setup  |  117
>> ++++++++++++++++++++
>>   tests.as-root/lib                                  |    2 +-
>>   3 files changed, 122 insertions(+), 19 deletions(-)
>>   copy tests.as-root/{lib => builds-with-yaml-morphologies.script} (54%)
>>   mode change 100644 => 100755
>>   create mode 100755 tests.as-root/builds-with-yaml-morphologies.setup
>>
>> diff --git a/tests.as-root/lib
>> b/tests.as-root/builds-with-yaml-morphologies.script
>> old mode 100644
>> new mode 100755
>> similarity index 54%
>> copy from tests.as-root/lib
>> copy to tests.as-root/builds-with-yaml-morphologies.script
>> index cdeb1ce..d59c1c7
>> --- a/tests.as-root/lib
>> +++ b/tests.as-root/builds-with-yaml-morphologies.script
>> @@ -1,6 +1,6 @@
>>   #!/bin/sh
>>   #
>> -# Copyright (C) 2012  Codethink Limited
>> +# Copyright (C) 2013  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
>> @@ -15,22 +15,8 @@
>>   # with this program; if not, write to the Free Software Foundation,
>> Inc.,
>>   # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
>>
>> +set -eu
>>
>> -## Helper functions for as-root tests
>> +. "$SRCDIR/scripts/fix-committer-info"
>>
>> -loopback_rootfs() {
>> -    # Find offset partition offset in a rootfs and mount it
>> -    ROOTFS="$1"
>> -
>> -    PYTHONPATH="$PYTHONPATH:$SRCDIR" "$SRCDIR/scripts/sparse-gunzip" \
>> -                         <"$ROOTFS" >"$ROOTFS-unzipped"
>> -
>> -    OFFSET=$(sfdisk -d "$ROOTFS-unzipped" | \
>> -        grep -m 1 -o 'start=\s\+\([0-9]\+\)' | awk '{ print $2 }')
>> -    OFFSET=$(expr "$OFFSET" '*' 512)
>> -
>> -    DEVICE=$(losetup --show -o "$OFFSET" -f "$ROOTFS-unzipped")
>> -    udevadm settle
>> -
>> -    echo "$DEVICE"
>> -}
>> +"$SRCDIR/scripts/test-morph" build-morphology test:morphs master
>> linux-system
>
> Something very strange has happened here! Maybe Daniel can shed some light.

Apparently this is just git's rename detection going into overdrive. 
Since no info on renames / copies is actually stored we don't need to do 
anything, although generating the patch set with a higher similarity 
threshold for rename detection would make things neater.








More information about the baserock-dev mailing list