Merge lp:~le-chi-thu/lava-test/out-of-tree-tests into lp:lava-test/0.0

Proposed by Le Chi Thu
Status: Merged
Merged at revision: 82
Proposed branch: lp:~le-chi-thu/lava-test/out-of-tree-tests
Merge into: lp:lava-test/0.0
Diff against target: 0 lines
To merge this branch: bzr merge lp:~le-chi-thu/lava-test/out-of-tree-tests
Reviewer Review Type Date Requested Status
Paul Larson (community) Needs Information
Review via email: mp+66135@code.launchpad.net

Description of the change

Initial merged of zyga's out of tree tests.

To post a comment you must log in.
Revision history for this message
Le Chi Thu (le-chi-thu) wrote :

How to test
+++++++++++

1. Install the lava-test with command : .setup.py develop

To test tests inside a python package

1. Get the test code from bzr branch lp:~linaro-graphics-wg/+junk/linaro-graphics-wg-tests
2. Install the tests into python packages manager. ./setup.py install
3. Run bin/lava-test list-tests
..

To test test define with a json file

1. bin/lava-test register-test file://localhost/home/thu/projects/linaro/abrek/out-of-tree-tests/examples/stream.json
2. Run /lava-test list-tests

Revision history for this message
Le Chi Thu (le-chi-thu) wrote :

To test test define with a json file

1. bin/lava-test register-test file:///home/thu/projects/linaro/abrek/out-of-tree-tests/examples/stream.json
2. Run /lava-test list-tests

NOTE: the url is corrected. (file:///home/....)

75. By Le Chi Thu <email address hidden> <email address hidden>

Renamed the stream to stream-json. Rename abrek to lava-tool on help text.

Revision history for this message
Paul Larson (pwlars) wrote :

Interesting, this seems to break running some, but not all commands from the checkout branch:

plars@plars-t500:/tmp/lava/out-of-tree-tests/bin$ ./lava-test register-test file:///tmp/lava/out-of-tree-tests/examples/stream.json
plars@plars-t500:/tmp/lava/out-of-tree-tests/bin$ ./lava-test list-tests
Traceback (most recent call last):
  File "./lava-test", line 30, in <module>
    exit_code = abrek.main.main(sys.argv)
  File "/tmp/lava/out-of-tree-tests/abrek/main.py", line 28, in main
    return cmd_func.main(argv)
  File "/tmp/lava/out-of-tree-tests/abrek/command.py", line 66, in main
    return self.run()
  File "/tmp/lava/out-of-tree-tests/abrek/builtins.py", line 151, in run
    for provider in TestLoader().get_providers():
  File "/tmp/lava/out-of-tree-tests/abrek/testdef.py", line 411, in get_providers
    entry_point = pkg_resources.EntryPoint(entry_point_name, module_name, attrs, dist=pkg_resources.get_distribution("lava-test"))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 298, in get_distribution
    if isinstance(dist,Requirement): dist = get_provider(dist)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 177, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 654, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 552, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: lava-test

You may not have noticed, but we removed the install_requires on linaro-dashboard-bundle. It's an optional piece anyway. Still seems to fail for me even after removing the dependency, but haven't looked into why yet.

review: Needs Information
Revision history for this message
Paul Larson (pwlars) wrote :

234 + config.registry["providers"].append(provider_info)
config is not defined here

Revision history for this message
Le Chi Thu (le-chi-thu) wrote :

You need to install the lava-test first before running the lava-test list-tests command.

Install the lava-test with command : ./setup.py develop --user

76. By Le Chi Thu <email address hidden> <email address hidden>

Handled the exception if the lava_test not properly setup.

77. By Le Chi Thu <email address hidden> <email address hidden>

Updated README file with install instructions.

78. By Le Chi Thu <email address hidden> <email address hidden>

Minor update

79. By Le Chi Thu <email address hidden> <email address hidden>

All unit tests passed

Preview Diff

Empty

Subscribers

People subscribed via source and target branches