lava_test_shell's testdef_repos assumes flat repo layout

Reported by Paul Sokolovsky on 2012-12-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LAVA Dispatcher
Medium
Michael Hudson-Doyle

Bug Description

I'm trying new testdef_repos functionality with:

    {
        "command": "lava_test_shell",
        "parameters": {
            "testdef_repos": [
                {
                    "bzr-repo": "lp:~linaro-infrastructure/cbuild/lava-build-slave",
                    "testdef": "slaves/lava-build/cbuild-gcc-mockbuild.yaml"
                }
            ],
            "timeout": 36000
        }
    },

I get (with added debug output):

Traceback (most recent call last):
  File "/srv/lava/instances/cbuild/code/r85/bin/lava", line 65, in <module>
    lava.tool.main.LavaDispatcher.run()
  File "/srv/lava/.cache/eggs/lava_tool-0.6-py2.7.egg/lava/tool/dispatcher.py", line 147, in run
    raise SystemExit(cls().dispatch(args))
  File "/srv/lava/.cache/eggs/lava_tool-0.6-py2.7.egg/lava/tool/dispatcher.py", line 137, in dispatch
    return command.invoke()
  File "/srv/lava/.cache/eggs/lava_dispatcher-0.23-py2.7.egg/lava/dispatcher/commands.py", line 100, in invoke
shutil.copy2( tmp0wcFLd/tmpteTXJU/bzrtestrepo/report.sh , /tmp/tmpeMZDKU/lava/tests/0_cbuild-gcc )

shutil.copy2( tmp0wcFLd/tmpteTXJU/bzrtestrepo/start.sh , /tmp/tmpeMZDKU/lava/tests/0_cbuild-gcc )
shutil.copy2( tmp0wcFLd/tmpteTXJU/bzrtestrepo/files , /tmp/tmpeMZDKU/lava/tests/0_cbuild-gcc )
Lava failed at action lava_test_shell with error:[Errno 21] Is a directory: 'tmp0wcFLd/tmpteTXJU/bzrtestrepo/files'

So, there're 2 issues: 1) testdef_repos doesn't expect the repo to contain any subdirectories, and bails out if it does, which is definitely a bug. And 2) it's not necessarily does what user expect - in this particular case, it's a repo for standalone project, and lava testdef are just part of it, in one of subdirs. Just copying top-level files doesn't help much, and testdef_repos can't really know which files of a repo a user may need. Assuming it's too cumbersome to list all needed files explicitly, it would make sense to just copy over entire repo checkout recursively, which would solve both issues.

Andy Doan (doanac) on 2012-12-03
Changed in lava-dispatcher:
importance: Undecided → Critical
importance: Critical → Medium
milestone: none → 2012.12
assignee: nobody → Senthil Kumaran S (stylesen)

I have a fix for this in another branch. Will cherry pick it to trunk
today.

Andy Doan (doanac) on 2012-12-03
Changed in lava-dispatcher:
assignee: Senthil Kumaran S (stylesen) → Michael Hudson-Doyle (mwhudson)
Changed in lava-dispatcher:
status: New → Fix Committed
Changed in lava-dispatcher:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers