pip install lava-test and said no module apt

Asked by songqi on 2012-03-12

Hi all:
When I set python env on board,then install lava-test on board use pip
pip install lava-test
and it occur
Traceback (most recent call last):
  File "/usr/bin/lava-test", line 8, in <module>
    load_entry_point('lava-test==0.4', 'console_scripts', 'lava-test')()
  File "/usr/lib/python2.6/site-packages/lava_test/main.py", line 49, in main
  File "/usr/lib/python2.6/site-packages/lava_tool/dispatcher.py", line 56, in run_with_dispatcher_class
    raise SystemExit(cls().dispatch())
  File "/usr/lib/python2.6/site-packages/lava_tool/dispatcher.py", line 39, in __init__
    self.import_commands("%s.commands" % prefix)
  File "/usr/lib/python2.6/site-packages/lava_tool/interface.py", line 208, in import_commands
  File "/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 1954, in load
  File "/usr/lib/python2.6/site-packages/lava_test/commands.py", line 27, in <module>
    from lava_test.core.artifacts import TestArtifacts
  File "/usr/lib/python2.6/site-packages/lava_test/core/artifacts.py", line 26, in <module>
    from lava_test.core import hwprofile, swprofile
  File "/usr/lib/python2.6/site-packages/lava_test/core/swprofile.py", line 16, in <module>
    import apt
ImportError: No module named apt

How to fix it?
If I install python-apt-0.7.8 (I down from internet),it occur
building 'apt_pkg' extension
arm-angstrom-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb --sysroot=/home/qisong/Work/OE/oe_2011_training/tmp/sysroots/armv5te-angstrom-linux-gnueabi -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb2 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c python/apt_pkgmodule.cc -o build/temp.linux-armv5tejl-2.6/python/apt_pkgmodule.o
unable to execute arm-angstrom-linux-gnueabi-gcc: No such file or directory
error: command 'arm-angstrom-linux-gnueabi-gcc' failed with exit status 1

What a nightmare,it call tools chain
can this part delete ,because I think my board don't use apt command?It not ,then how to fix?
Thanks a lot

Question information

English Edit question
Obsolete LAVA Test Edit question
No assignee Edit question
Last query:
Last reply:

This question was originally filed as bug #952875.

Zygmunt Krynicki (zyga) said : #1

This is a question, not a bug.

python-apt is not available on pypi and thus we cannot depend on it directly.

Zygmunt Krynicki (zyga) said : #2

Apt support is optional now. Code for this has landed in trunk.

If you don't use apt then simply pass the -S / --skip-software-context option to lava-test run.

See below:

$ lava-test run --help
usage: lava-test run [-h] [-v] [-q] [-Q] [-S] [-H] [--trusted-time]
                     [--analyzer-assigned-uuid UUID] [-o FILE] [-A]
                     [-t TEST_OPTIONS]

positional arguments:
  test_id Test or test suite identifier

optional arguments:
  -h, --help show this help message and exit
  -v, --verbose Be verbose about undertaken actions
  -q, --quiet Be less verbose about undertaken actions
  -Q, --quiet-subcommands
                        Hide the output of all sub-commands (including tests)
  -t TEST_OPTIONS, --test-options TEST_OPTIONS
                        Override the default test options. The value is passed
                        verbatim to test definition. Typically this is simply
                        used in shell commands by expanding the string
                        $(OPTIONS). Please refer to the built-in
                        peacekeeper.py for examples. Depending on your shell
                        you probably have to escape spaces and other special
                        characters if you wish to include them in your
                        argument options.

initial bundle configuration:
  -S, --skip-software-context
                        Do not store the software context in the initial
                        bundle. Typically this saves OS image name and all the
                        installed software packages.
  -H, --skip-hardware-context
                        Do not store the hardware context in the initial
                        bundle. Typically this saves CPU, memory and USB
                        device information.
  --trusted-time Indicate that the real time clock has accurate data.
                        This can differentiate test results created on
                        embedded devices that often have inaccurate real time
                        clock settings.
  --analyzer-assigned-uuid UUID
                        Set the analyzer_assigned_uuid to the specified value.
                        This will prevent the test device from attempting to
                        generate an UUID by itself. This option may be
                        required if the test device has unreliable real time
                        clock (no battery backed, not ensure to be up-to-date)
                        and unreliable/random hardware ethernet address.

complete bundle configuration:
  -o FILE, --output FILE
                        After running the test parse the result artifacts,
                        fuse them with the initial bundle and finally save the
                        complete bundle to the specified FILE.
  -A, --skip-attachments
                        Do not store standard output and standard error log
                        files as attachments. This option is only affecting
                        the bundle created with --output, the initial bundle
                        is not affected as it never stores any attachments.

Can you help with this problem?

Provide an answer of your own, or ask songqi for more information if necessary.

To post a message you must log in.