FAIL: test_dump_symlinks (snapcraft.tests.test_plugin_dump.DumpPluginTestCase)

Bug #1614913 reported by jean-christophe manciot
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Critical
Leo Arias

Bug Description

Ubuntu 16.04 4.4.0-34
snapcraft sources commit 2.15 from https://github.com/ubuntu-core/snapcraft

Building with release_number=2.15:

        echo --------
        echo Cleaning
        echo --------
        cd git-snapcraft
        git reset --hard
        git clean -fxd :/
        git checkout master
        git pull -v --progress --rebase
        return_code=$?
        if [[ $return_code != 0 ]]; then
                exit $return_code
        fi
        git checkout ${release_number}

        echo --------
        echo Building
        echo --------
        dpkg-buildpackage -b -m"Jean-Christophe Manciot <email address hidden>"

...
Pulling pull0
ok
test_pull_invalid_part (snapcraft.tests.test_commands_pull.PullCommandTestCase) ... The part named 'no-pull' is not defined in 'snapcraft.yaml'
ok
test_pull_one_part_only_from_3 (snapcraft.tests.test_commands_pull.PullCommandTestCase) ... Preparing to pull pull1
Pulling pull1
ok
test_pull_stage_packages_with_geoip (snapcraft.tests.test_commands_pull.PullCommandTestCase) ... Preparing to pull pull1
Pulling pull1
ok
test_pull_stage_packages_without_geoip (snapcraft.tests.test_commands_pull.PullCommandTestCase) ... Preparing to pull pull1
Pulling pull1
ok

======================================================================
FAIL: test_dump_symlinks (snapcraft.tests.test_plugin_dump.DumpPluginTestCase) [link: /tmp/tmpu40vm03k/parts/dump/install/subdir/relative2]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/actionmystique/Program-Files/Ubuntu/Snap/git-snapcraft/snapcraft/tests/test_plugin_dump.py", line 105, in test_dump_symlinks
    'Expected {!r} to be a symlink'.format(destination))
AssertionError: False is not true : Expected '/tmp/tmpu40vm03k/parts/dump/install/subdir/relative2' to be a symlink

======================================================================
FAIL: test_dump_symlinks (snapcraft.tests.test_plugin_dump.DumpPluginTestCase) [link: /tmp/tmpu40vm03k/parts/dump/install/subdir/relative3]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/actionmystique/Program-Files/Ubuntu/Snap/git-snapcraft/snapcraft/tests/test_plugin_dump.py", line 105, in test_dump_symlinks
    'Expected {!r} to be a symlink'.format(destination))
AssertionError: False is not true : Expected '/tmp/tmpu40vm03k/parts/dump/install/subdir/relative3' to be a symlink

----------------------------------------------------------------------
Ran 700 tests in 93.942s

FAILED (failures=2)
E: pybuild pybuild:274: test: plugin distutils failed with: exit code=1: python3.5 setup.py test
dh_auto_test: pybuild --test -i python{version} -p 3.5 --dir . returned exit code 13
debian/rules:5: recipe for target 'build' failed
make: *** [build] Error 25
dpkg-buildpackage: error: debian/rules build gave error exit status 2

Revision history for this message
Leo Arias (elopio) wrote :

I can reproduce this with dpkg-buildpackage in a clean up-to-date xenial machine in scalingstack. But I don't get the failure running ./runtests.sh unit in the same machine.

Changed in snapcraft:
status: New → Confirmed
importance: Undecided → Critical
Revision history for this message
Leo Arias (elopio) wrote :

Set priority to critical because it's blocking landings in master.

Revision history for this message
Leo Arias (elopio) wrote :

git bisect points to https://github.com/snapcore/snapcraft/pull/729 as the culprit. It doesn't make a lot of sense, because that was landed two weeks ago and we have had successful builds since then.

That was the PR that introduced these two tests. And if I run only the dump plugin tests during the package build they pass. So maybe something that landed new in xenial? But it seems it's not related to the two tests on isolation.

Revision history for this message
Leo Arias (elopio) wrote :

I got it. I don't know why it's triggered under such weird circumstances, but the problem is that something is leaking into common.SNAPCRAFT_FILES

(Pdb) common.SNAPCRAFT_FILES
['snapcraft.yaml', '.snapcraft.yaml', 'parts', 'stage', 'prime', 'snap', 'foo.snap', 'subdir']

Changed in snapcraft:
assignee: nobody → Leo Arias (elopio)
milestone: none → 2.16
status: Confirmed → In Progress
Revision history for this message
Leo Arias (elopio) wrote :
Changed in snapcraft:
status: In Progress → Fix Committed
Changed in snapcraft:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.