[Avocado-devel] Avocado related questions

Cleber Rosa crosa at redhat.com
Wed Feb 27 03:45:25 UTC 2019



On 2/26/19 9:13 PM, Junchao Zhang wrote:
> Hi Cleber,
> 
> Thanks for your investigation! It works for me now and I can run avocado
> by "python -m avocado run". One more thing I did after copying all .whl
> files is I removed all old .egg files. You saved my life!
> 
> One more question I have is:
> 
> When I ran my test, I got the following issue:
> 
> [root at kindle avocado]# python -m avocado run /bin/true
> JOB ID     : daad74698c75ea4d610d7747ab68b4028cc4046c
> JOB LOG    :
> /tmp/root/avocado/job-results/job-2019-02-26T18.05-daad746/job.log
>  (1/1) /bin/true: PASS (0.04 s)
> RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 |
> CANCEL 0
> JOB TIME   : 0.23 s
> Error running method "render" of plugin "html": [Errno 28] No space left
> on device
> Error running method "render" of plugin "json": [Errno 28] No space left
> on device
> Error running method "render" of plugin "xunit": [Errno 28] No space
> left on device
> 
> I think the reason is my /tmp which is linked to /var/tmp has no more space:
> tmpfs                    32.0M     32.0M         0 100% /var
> 
> I tried to find a way to generate the result files and stored to other
> folder which has more space:
> fsp                      27.3G      3.3G     24.0G  12% /mnt/us
> 
> But I cannot find any option when I execute "python -m avocado run"
> commands. Is there any way to redirect the results output directory?
> 

Yes,

Try '--job-results-dir'.  I'm not sure it'll help with the temporary
directory, though.

Finally, "python -m avocado" is equivalent to "avocado", so you can do:

  $ python -m avocado run --help

To the see all options for run.

Regards,
- Cleber.

> Thanks,
> Junchao
> 
> 
> On Tue, Feb 26, 2019 at 2:29 PM Cleber Rosa <crosa at redhat.com
> <mailto:crosa at redhat.com>> wrote:
> 
>     Junchao,
> 
>     I can't really tell what's going wrong there.  I'd suggest you to
>     first check if the location you're using:
> 
>        /mnt/us/testutils/python/lib/python2.7/site-packages/
> 
>     Is really a location your Python install is aware of.  Then, I'd
>     suggest is that you attempt to get binary packages and extract them
>     on your destination system.  Something like this:
> 
>        $ python2 -m virtualenv /tmp/download-venv
>        $ . /tmp/download-venv/bin/activate
>        $ mkdir /tmp/download-venv/downloads
>        $ cd /tmp/download-venv/downloads
>        $ pip download avocado-framework
> 
>     You should have a number of heel packages (.whl suffix) packages. 
>     On my system it resulted in:
> 
>        avocado_framework-68.0-py2-none-any.whl 
>     requests-2.21.0-py2.py3-none-any.whl
>        certifi-2018.11.29-py2.py3-none-any.whl 
>     setuptools-40.8.0-py2.py3-none-any.whl
>        chardet-3.0.4-py2.py3-none-any.whl     
>      six-1.12.0-py2.py3-none-any.whl
>        enum34-1.1.6-py2-none-any.whl           
>     stevedore-1.30.0-py2.py3-none-any.whl
>        idna-2.8-py2.py3-none-any.whl           
>     urllib3-1.24.1-py2.py3-none-any.whl
>        pbr-5.1.2-py2.py3-none-any.whl
> 
>     Now, copy those to your remote (kindle) system.  There
> 
>        $ for i in *.whl; do python -m zipfile -e $i
>     /mnt/us/testutils/python/lib/python2.7/site-packages/; done;
> 
>     Because you're only extracting the files, no script will be created
>     for you.  Try to start avocado with:
> 
>        $ python -m avocado
> 
>     On my system, following those steps, it results in a successful
>     command listing.  Let me know if that works for you.
> 
>     Regards,
>     - Cleber.
> 
>     ----- Original Message -----
>     > From: "Junchao Zhang" <zhangjckimi at gmail.com
>     <mailto:zhangjckimi at gmail.com>>
>     > To: "Cleber Rosa" <crosa at redhat.com <mailto:crosa at redhat.com>>
>     > Cc: "Lukáš Doktor" <ldoktor at redhat.com
>     <mailto:ldoktor at redhat.com>>, avocado-devel at redhat.com
>     <mailto:avocado-devel at redhat.com>
>     > Sent: Tuesday, February 26, 2019 4:59:43 PM
>     > Subject: Re: [Avocado-devel] Avocado related questions
>     >
>     > Hi Cleber,
>     >
>     > I can see the content in
>     >
>     /mnt/us/testutils/python/lib/python2.7/site-packages/avocado_framework-68.0-py2.7.egg/EGG-INFO/entry_points.txt:
>     > [root at kindle site-packages]# cat
>     > ./avocado_framework-68.0-py2.7.egg/EGG-INFO/ent
>     > ry_points.txt
>     > [avocado.plugins.cli]
>     > envkeep = avocado.plugins.envkeep:EnvKeep
>     > gdb = avocado.plugins.gdb:GDB
>     > journal = avocado.plugins.journal:Journal
>     > json = avocado.plugins.jsonresult:JSONCLI
>     > json_variants = avocado.plugins.json_variants:JsonVariantsCLI
>     > replay = avocado.plugins.replay:Replay
>     > tap = avocado.plugins.tap:TAP
>     > wrapper = avocado.plugins.wrapper:Wrapper
>     > xunit = avocado.plugins.xunit:XUnitCLI
>     > zip_archive = avocado.plugins.archive:ArchiveCLI
>     >
>     > [avocado.plugins.cli.cmd]
>     > config = avocado.plugins.config:Config
>     > diff = avocado.plugins.diff:Diff
>     > distro = avocado.plugins.distro:Distro
>     > exec-path = avocado.plugins.exec_path:ExecPath
>     > list = avocado.plugins.list:List
>     > multiplex = avocado.plugins.multiplex:Multiplex
>     > plugins = avocado.plugins.plugins:Plugins
>     > run = avocado.plugins.run:Run
>     > sysinfo = avocado.plugins.sysinfo:SysInfo
>     > variants = avocado.plugins.variants:Variants
>     >
>     > [avocado.plugins.job.prepost]
>     > human = avocado.plugins.human:HumanJob
>     > jobscripts = avocado.plugins.jobscripts:JobScripts
>     > teststmpdir = avocado.plugins.teststmpdir:TestsTmpDir
>     >
>     > [avocado.plugins.result]
>     > json = avocado.plugins.jsonresult:JSONResult
>     > xunit = avocado.plugins.xunit:XUnitResult
>     > zip_archive = avocado.plugins.archive:Archive
>     >
>     > [avocado.plugins.result_events]
>     > human = avocado.plugins.human:Human
>     > journal = avocado.plugins.journal:JournalResult
>     > tap = avocado.plugins.tap:TAPResult
>     >
>     > [avocado.plugins.varianter]
>     > json_variants = avocado.plugins.json_variants:JsonVariants
>     >
>     >
>     > Thanks,
>     > Junchao
>     >
>     > On Tue, Feb 26, 2019 at 1:32 PM Cleber Rosa <crosa at redhat.com
>     <mailto:crosa at redhat.com>> wrote:
>     >
>     > >
>     > >
>     > > ----- Original Message -----
>     > > > From: "Junchao Zhang" <zhangjckimi at gmail.com
>     <mailto:zhangjckimi at gmail.com>>
>     > > > To: "Cleber Rosa" <crosa at redhat.com <mailto:crosa at redhat.com>>
>     > > > Cc: "Lukáš Doktor" <ldoktor at redhat.com
>     <mailto:ldoktor at redhat.com>>, avocado-devel at redhat.com
>     <mailto:avocado-devel at redhat.com>
>     > > > Sent: Tuesday, February 26, 2019 3:47:20 PM
>     > > > Subject: Re: [Avocado-devel] Avocado related questions
>     > > >
>     > > > HI Cleber,
>     > > >
>     > > > Here is some problem:
>     > > > I cannot see anything when I ran the command:
>     > > > >>> pkg_resources.get_entry_map(dist)
>     > > > {}
>     > > >
>     > >
>     > > As I suspected, there are no entry points... These are usually in a
>     > > (generated)
>     > > file called "entry_points.txt", inside a "dist-info" or
>     ".egg/EGG-INFO"
>     > > directory
>     > > (depending on versions and installation methods).
>     > >
>     > > These are usually created by setup.py/pip <http://setup.py/pip>,
>     etc.  You should double check
>     > > if
>     > > you're also copying all of those generated files to the "kindle"
>     system.
>     > >
>     > > But, this is just a guess, I have never installed on one system and
>     > > attempted
>     > > to run on another one.
>     > >
>     > > Regards,
>     > > - Cleber.
>     > >
>     > > > Thanks,
>     > > > Junchao
>     > > >
>     > > > On Tue, Feb 26, 2019 at 11:37 AM Cleber Rosa <crosa at redhat.com
>     <mailto:crosa at redhat.com>> wrote:
>     > > >
>     > > > >
>     > > > >
>     > > > > ----- Original Message -----
>     > > > > > From: "Junchao Zhang" <zhangjckimi at gmail.com
>     <mailto:zhangjckimi at gmail.com>>
>     > > > > > To: "Cleber Rosa" <crosa at redhat.com <mailto:crosa at redhat.com>>
>     > > > > > Cc: "Lukáš Doktor" <ldoktor at redhat.com
>     <mailto:ldoktor at redhat.com>>, avocado-devel at redhat.com
>     <mailto:avocado-devel at redhat.com>
>     > > > > > Sent: Tuesday, February 26, 2019 2:23:39 PM
>     > > > > > Subject: Re: [Avocado-devel] Avocado related questions
>     > > > > >
>     > > > > > Hi Cleber,
>     > > > > >
>     > > > > > Here is the output:
>     > > > > > >>> import pkg_resources
>     > > > > > >>> pkg_resources.get_distribution('avocado-framework')
>     > > > > > avocado-framework 68.0
>     > > > > > (/mnt/us/testutils/python/lib/python2.7/site-packages)
>     > > > > >
>     > > > > > [root at kindle scripts]# cd
>     > > > > > /mnt/us/testutils/python/lib/python2.7/site-packages
>     > > > > > [root at kindle site-packages]# find . -name "avocado*-info"
>     > > > > > ./avocado_framework-68.0-py2.7.egg-info
>     > > > > >
>     > > > > > I did not see something like *.dist-info in this folder.
>     > > > > >
>     > > > >
>     > > > > OK, but the 'egg-info' should be just as good (different
>     > > > > installation methods produce different ".info" dirs).
>     > > > >
>     > > > > Could you please try:
>     > > > >
>     > > > >    >>> dist =
>     pkg_resources.get_distribution('avocado-framework')
>     > > > >    >>> pkg_resources.get_entry_map(dist)
>     > > > >
>     > > > > On my system it shows (beautified):
>     > > > >
>     > > > > {'avocado.plugins.cli': {'envkeep': EntryPoint.parse('envkeep =
>     > > > > avocado.plugins.envkeep:EnvKeep'),
>     > > > >                          'gdb': EntryPoint.parse('gdb =
>     > > > > avocado.plugins.gdb:GDB'),
>     > > > >                          'journal': EntryPoint.parse('journal =
>     > > > > avocado.plugins.journal:Journal'),
>     > > > >                          'json': EntryPoint.parse('json =
>     > > > > avocado.plugins.jsonresult:JSONCLI'),
>     > > > >                          'json_variants':
>     > > EntryPoint.parse('json_variants
>     > > > > = avocado.plugins.json_variants:JsonVariantsCLI'),
>     > > > >                          'replay': EntryPoint.parse('replay =
>     > > > > avocado.plugins.replay:Replay'),
>     > > > >                          'tap': EntryPoint.parse('tap =
>     > > > > avocado.plugins.tap:TAP'),
>     > > > >                          'wrapper': EntryPoint.parse('wrapper =
>     > > > > avocado.plugins.wrapper:Wrapper'),
>     > > > >                          'xunit': EntryPoint.parse('xunit =
>     > > > > avocado.plugins.xunit:XUnitCLI'),
>     > > > >                          'zip_archive':
>     EntryPoint.parse('zip_archive =
>     > > > > avocado.plugins.archive:ArchiveCLI')},
>     > > > >  'avocado.plugins.cli.cmd': {'config':
>     EntryPoint.parse('config =
>     > > > > avocado.plugins.config:Config'),
>     > > > >                              'diff': EntryPoint.parse('diff =
>     > > > > avocado.plugins.diff:Diff'),
>     > > > >                              'distro':
>     EntryPoint.parse('distro =
>     > > > > avocado.plugins.distro:Distro'),
>     > > > >                              'exec-path':
>     EntryPoint.parse('exec-path =
>     > > > > avocado.plugins.exec_path:ExecPath'),
>     > > > >                              'list': EntryPoint.parse('list =
>     > > > > avocado.plugins.list:List'),
>     > > > >                              'multiplex':
>     EntryPoint.parse('multiplex =
>     > > > > avocado.plugins.multiplex:Multiplex'),
>     > > > >                              'plugins':
>     EntryPoint.parse('plugins =
>     > > > > avocado.plugins.plugins:Plugins'),
>     > > > >                              'run': EntryPoint.parse('run =
>     > > > > avocado.plugins.run:Run'),
>     > > > >                              'sysinfo':
>     EntryPoint.parse('sysinfo =
>     > > > > avocado.plugins.sysinfo:SysInfo'),
>     > > > >                              'variants':
>     EntryPoint.parse('variants =
>     > > > > avocado.plugins.variants:Variants')},
>     > > > >  'avocado.plugins.job.prepost': {'human':
>     EntryPoint.parse('human =
>     > > > > avocado.plugins.human:HumanJob'),
>     > > > >                                  'jobscripts':
>     > > > > EntryPoint.parse('jobscripts =
>     avocado.plugins.jobscripts:JobScripts'),
>     > > > >                                  'teststmpdir':
>     > > > > EntryPoint.parse('teststmpdir =
>     > > avocado.plugins.teststmpdir:TestsTmpDir')},
>     > > > >  'avocado.plugins.result': {'json': EntryPoint.parse('json =
>     > > > > avocado.plugins.jsonresult:JSONResult'),
>     > > > >                             'xunit': EntryPoint.parse('xunit =
>     > > > > avocado.plugins.xunit:XUnitResult'),
>     > > > >                             'zip_archive':
>     > > EntryPoint.parse('zip_archive =
>     > > > > avocado.plugins.archive:Archive')},
>     > > > >  'avocado.plugins.result_events': {'human':
>     EntryPoint.parse('human =
>     > > > > avocado.plugins.human:Human'),
>     > > > >                                    'journal':
>     > > EntryPoint.parse('journal =
>     > > > > avocado.plugins.journal:JournalResult'),
>     > > > >                                    'tap':
>     EntryPoint.parse('tap =
>     > > > > avocado.plugins.tap:TAPResult')},
>     > > > >  'avocado.plugins.varianter': {'json_variants':
>     > > > > EntryPoint.parse('json_variants =
>     > > > > avocado.plugins.json_variants:JsonVariants')}}
>     > > > >
>     > > > >
>     > > > > FIY, the available commands come from the
>     avocado.plugins.cli.cmd key.
>     > > > >
>     > > > > Regards,
>     > > > > - Cleber.
>     > > > >
>     > > > >
>     > > > > > Thanks,
>     > > > > > Junchao
>     > > > > >
>     > > > > > On Tue, Feb 26, 2019 at 11:14 AM Cleber Rosa
>     <crosa at redhat.com <mailto:crosa at redhat.com>>
>     > > wrote:
>     > > > > >
>     > > > > > >
>     > > > > > >
>     > > > > > > ----- Original Message -----
>     > > > > > > > From: "Junchao Zhang" <zhangjckimi at gmail.com
>     <mailto:zhangjckimi at gmail.com>>
>     > > > > > > > To: "Lukáš Doktor" <ldoktor at redhat.com
>     <mailto:ldoktor at redhat.com>>
>     > > > > > > > Cc: avocado-devel at redhat.com
>     <mailto:avocado-devel at redhat.com>
>     > > > > > > > Sent: Tuesday, February 26, 2019 1:38:40 PM
>     > > > > > > > Subject: Re: [Avocado-devel] Avocado related questions
>     > > > > > > >
>     > > > > > > > Hi Lukas,
>     > > > > > > >
>     > > > > > > > Here is some update:
>     > > > > > > > I replace the setuptools with a new one and reran "python
>     > > setup.py
>     > > > > > > > install". I have attached the output below. Everything
>     looks
>     > > great.
>     > > > > But
>     > > > > > > > after the installation, when I execute
>     > > > > /mnt/us/avocado/scripts/avocado,
>     > > > > > > > there is still not options for valid subcommands:
>     > > > > > > > [root at kindle scripts]# python avocado run
>     > > > > > > > ***
>     > > > > > > > subcommands:
>     > > > > > > >   valid subcommands
>     > > > > > > >
>     > > > > > > >   {}                    subcommand help
>     > > > > > > >
>     > > > > > > > avocado: error: argument subcommand: invalid choice: 'run'
>     > > (choose
>     > > > > from )
>     > > > > > > >
>     > > > > > >
>     > > > > > > Hi Junchao,
>     > > > > > >
>     > > > > > > Getting a bit more "under the hood", could you please
>     open a Python
>     > > > > > > interpreter
>     > > > > > > on your kindle system and execute:
>     > > > > > >
>     > > > > > >    >>> import pkg_resources
>     > > > > > >    >>> pkg_resources.get_distribution('avocado-framework')
>     > > > > > >
>     > > > > > > It should return something like:
>     > > > > > >
>     > > > > > >    avocado-framework 68.0
>     (/tmp/venv/lib/python3.7/site-packages)
>     > > > > > >
>     > > > > > > Then, in the directory given under parenthesis, there
>     should be a
>     > > > > directory
>     > > > > > > named after the "distribution" name, and ending in   In
>     this case:
>     > > > > > >
>     > > > > > >
>     > > > >
>     /tmp/venv/lib/python3.7/site-packages/avocado_framework-68.0.dist-info
>     > > > > > >
>     > > > > > > Can you please check if this directory exists, and if
>     you have a
>     > > > > content
>     > > > > > > similar to:
>     > > > > > >
>     > > > > > >    $ ls
>     > > > > > >
>     > >
>     /tmp/venv/lib/python3.7/site-packages/avocado_framework-68.0.dist-info
>     > > > > > >    entry_points.txt  INSTALLER  METADATA  RECORD 
>     top_level.txt
>     > > WHEEL
>     > > > > > >
>     > > > > > > Thanks,
>     > > > > > > - Cleber.
>     > > > > > >
>     > > > > > > > Thanks,
>     > > > > > > > Junchao
>     > > > > > > >
>     > > > > > > > On Tue, Feb 26, 2019 at 9:47 AM Junchao Zhang <
>     > > zhangjckimi at gmail.com <mailto:zhangjckimi at gmail.com>
>     > > > > >
>     > > > > > > wrote:
>     > > > > > > >
>     > > > > > > > > Hi Lukas,
>     > > > > > > > >
>     > > > > > > > > I am using Kindle which is armv7l. There is no "pip"
>     on this
>     > > > > server.
>     > > > > > > What
>     > > > > > > > > I did is I directly copy the setuptools package from
>     my x86_64
>     > > > > Ubuntu
>     > > > > > > and
>     > > > > > > > > removed all the .pyc files in the package. The
>     setuptools work
>     > > > > fine on
>     > > > > > > my
>     > > > > > > > > x86_64 server. We want to keep the system clean so
>     probably
>     > > cannot
>     > > > > > > install
>     > > > > > > > > "pip" on the server. Do you have any solution for this
>     > > situation?
>     > > > > > > > >
>     > > > > > > > > Thanks,
>     > > > > > > > > Junchao
>     > > > > > > > >
>     > > > > > > > > On Mon, Feb 25, 2019 at 11:51 PM Lukáš Doktor <
>     > > ldoktor at redhat.com <mailto:ldoktor at redhat.com>>
>     > > > > > > wrote:
>     > > > > > > > >
>     > > > > > > > >> Dne 26. 02. 19 v 2:46 Junchao Zhang napsal(a):
>     > > > > > > > >> > HI Lukas,
>     > > > > > > > >> >
>     > > > > > > > >> > Thanks for your explanation. My situation is I am
>     trying to
>     > > use
>     > > > > > > Avocado
>     > > > > > > > >> on my arm server.
>     > > > > > > > >> > When I ran 'python setup.py install', it had the
>     following
>     > > > > output:
>     > > > > > > > >> >
>     > > > > > > > >> > [root at kindle avocado]# python setup.py install
>     > > > > > > > >> >
>     > > /mnt/us/testutils/python/lib/python2.7/distutils/dist.py:267:
>     > > > > > > > >> UserWarning: Unknown distribution option:
>     'entry_points'
>     > > > > > > > >> >
>     > > /mnt/us/testutils/python/lib/python2.7/distutils/dist.py:267:
>     > > > > > > > >> UserWarning: Unknown distribution option: 'zip_safe'
>     > > > > > > > >> >
>     > > /mnt/us/testutils/python/lib/python2.7/distutils/dist.py:267:
>     > > > > > > > >> UserWarning: Unknown distribution option:
>     > > 'include_package_data'
>     > > > > > > > >> >
>     > > /mnt/us/testutils/python/lib/python2.7/distutils/dist.py:267:
>     > > > > > > > >> UserWarning: Unknown distribution option:
>     'python_requires'
>     > > > > > > > >> >
>     > > /mnt/us/testutils/python/lib/python2.7/distutils/dist.py:267:
>     > > > > > > > >> UserWarning: Unknown distribution option:
>     'install_requires'
>     > > > > > > > >> >
>     > > /mnt/us/testutils/python/lib/python2.7/distutils/dist.py:267:
>     > > > > > > > >> UserWarning: Unknown distribution option: 'test_suite'
>     > > > > > > > >>
>     > > > > > > > >> Hello Kimi,
>     > > > > > > > >>
>     > > > > > > > >> this looks like old setuptools. What version are
>     you using?
>     > > Can
>     > > > > you
>     > > > > > > > >> please provide the output of `pip list` to see the
>     installed
>     > > > > > > libraries?
>     > > > > > > > >> Also if `setuptools` is not listed, you should
>     install it (or
>     > > try
>     > > > > > > updating
>     > > > > > > > >> it). Currently I'm using "setuptools==40.4.3".
>     > > > > > > > >>
>     > > > > > > > >> What could also help is knowing what distribution
>     are you
>     > > working
>     > > > > on.
>     > > > > > > I'm
>     > > > > > > > >> running avocado jobs on aarch64 on RHEL7 and RHEL8
>     and it
>     > > works
>     > > > > like a
>     > > > > > > > >> charm.
>     > > > > > > > >>
>     > > > > > > > >> Regards,
>     > > > > > > > >> Lukáš
>     > > > > > > > >>
>     > > > > > > > >> > running install
>     > > > > > > > >> > running build
>     > > > > > > > >> > running build_py
>     > > > > > > > >> > running build_scripts
>     > > > > > > > >> > running install_lib
>     > > > > > > > >> > running install_scripts
>     > > > > > > > >> > changing mode of
>     /mnt/us/testutils/python/bin/avocado to 777
>     > > > > > > > >> > changing mode of
>     > > > > /mnt/us/testutils/python/bin/avocado-rest-client
>     > > > > > > to 777
>     > > > > > > > >> > running install_egg_info
>     > > > > > > > >> > Removing
>     > > > > > > > >>
>     > > > > > >
>     > > > >
>     > >
>     /mnt/us/testutils/python/lib/python2.7/site-packages/avocado_framework-68.0-py2.7.egg-info
>     > > > > > > > >> > Writing
>     > > > > > > > >>
>     > > > > > >
>     > > > >
>     > >
>     /mnt/us/testutils/python/lib/python2.7/site-packages/avocado_framework-68.0-py2.7.egg-info
>     > > > > > > > >> >
>     > > > > > > > >> >
>     > > > > > > > >> > And I still cannot see any subcommands when I
>     directly
>     > > executed
>     > > > > the
>     > > > > > > > >> avocado file:
>     > > > > > > > >> > [root at kindle us]# python avocado_s
>     > > > > > > > >> > ******
>     > > > > > > > >> > subcommands:
>     > > > > > > > >> >   valid subcommands
>     > > > > > > > >> >
>     > > > > > > > >> >   {}                    subcommand help
>     > > > > > > > >> >
>     > > > > > > > >> >
>     > > > > > > > >> > Do you have any idea?
>     > > > > > > > >> >
>     > > > > > > > >> > Thanks,
>     > > > > > > > >> > Junchao
>     > > > > > > > >> >
>     > > > > > > > >> >
>     > > > > > > > >> > On Mon, Feb 25, 2019 at 2:53 AM Lukáš Doktor <
>     > > > > ldoktor at redhat.com <mailto:ldoktor at redhat.com>
>     > > > > > > > >> <mailto:ldoktor at redhat.com
>     <mailto:ldoktor at redhat.com>>> wrote:
>     > > > > > > > >> >
>     > > > > > > > >> >     Dne 22. 02. 19 v 18:09 Junchao Zhang napsal(a):
>     > > > > > > > >> >     > Dear avocado development team,
>     > > > > > > > >> >     >
>     > > > > > > > >> >     > My name is Kimi. Currently I am working on
>     Linux
>     > > > > development.
>     > > > > > > Our
>     > > > > > > > >> team used Autotest before. Currently I am trying to use
>     > > Avocado.
>     > > > > It is
>     > > > > > > > >> really a great framework. I have some questions
>     that hope you
>     > > can
>     > > > > > > help me
>     > > > > > > > >> with.
>     > > > > > > > >> >     >
>     > > > > > > > >> >     > 1. Since I do not want to do installation
>     on our arm
>     > > > > system, I
>     > > > > > > > >> tried to manually run avocado.
>     > > > > > > > >> >     > I copied the avocado script
>     ~/.local/bin/avocado and
>     > > added
>     > > > > > > > >> necessary packages on the device. Then I can
>     successfully
>     > > running
>     > > > > > > "python
>     > > > > > > > >> SCRIPT_NAME". But looks like there is no
>     subcommands options
>     > > > > > > available.
>     > > > > > > > >> >     > subcommands:
>     > > > > > > > >> >     >   valid subcommands
>     > > > > > > > >> >     >
>     > > > > > > > >> >     >   {}                    subcommand help
>     > > > > > > > >> >     >
>     > > > > > > > >> >     > Did I miss something so that I can do "python
>     > > SCRIPT_NAME
>     > > > > > > run"?
>     > > > > > > > >> >     >
>     > > > > > > > >> >     > 2. When I tried avocado on my Ubuntu, it
>     works fine.
>     > > The
>     > > > > only
>     > > > > > > > >> issue is there isn't any tests available when I run
>     "Avocado
>     > > > > list". I
>     > > > > > > just
>     > > > > > > > >> followed the instructions on online doc.
>     > > > > > > > >> >     >
>     > > > > > > > >> >     > Hope to hear back from you soon!
>     > > > > > > > >> >     >
>     > > > > > > > >> >     > Thanks,
>     > > > > > > > >> >     > Junchao
>     > > > > > > > >> >
>     > > > > > > > >> >     Dear Kimi,
>     > > > > > > > >> >
>     > > > > > > > >> >     Avocado uses stevedore as a plugin system
>     which uses
>     > > > > setuptools
>     > > > > > > > >> entry points
>     > > > > > > > >>
>     > > > > > >
>     > > > >
>     > >
>     https://avocado-framework.readthedocs.io/en/latest/Plugins.html#registering-plugins
>     > > > > > > > >> to discover available plugins.
>     > > > > > > > >> >
>     > > > > > > > >> >     To setup Avocado for development you can
>     simply clone
>     > > the
>     > > > > git
>     > > > > > > repo
>     > > > > > > > >> to any location and use `python setup.py develop
>     --user` (user
>     > > > > means
>     > > > > > > use
>     > > > > > > > >> "~/.local" and not "/usr") or simply by our `make
>     develop` or
>     > > > > `make
>     > > > > > > link`
>     > > > > > > > >> makefile target (see `make help` for details),
>     which creates
>     > > > > "links"
>     > > > > > > in
>     > > > > > > > >> "~/.local/lib". The difference in "install" vs.
>     "develop" is
>     > > that
>     > > > > it
>     > > > > > > won't
>     > > > > > > > >> copy the scripts, it simply tells python that this
>     library is
>     > > > > located
>     > > > > > > in
>     > > > > > > > >> this directory, therefor any change in your cloned
>     directory
>     > > is
>     > > > > > > propagated
>     > > > > > > > >> (apart from new/renamed entry-points which requires to
>     > > re-execute
>     > > > > > > "make
>     > > > > > > > >> develop").
>     > > > > > > > >> >
>     > > > > > > > >> >     Note the "develop" puts "avocado" binary to
>     > > > > > > "~/.local/bin/avocado".
>     > > > > > > > >> Using it usually requires extending the PATH, or
>     executing
>     > > > > "python3
>     > > > > > > > >> scripts/avocado" from the cloned git location.
>     > > > > > > > >> >
>     > > > > > > > >> >     Last but not least, details on installing
>     from git are
>     > > here:
>     > > > > > > > >>
>     > > > > > >
>     > > > >
>     > >
>     https://avocado-framework.readthedocs.io/en/latest/GetStartedGuide.html#generic-installation-from-a-git-repository
>     > > > > > > > >> >
>     > > > > > > > >> >     Happy hacking,
>     > > > > > > > >> >     Lukáš
>     > > > > > > > >> >
>     > > > > > > > >> >     PS: Not sure what you require in your
>     testing, there
>     > > are two
>     > > > > > > debts
>     > > > > > > > >> we have compare to Autotest and that is multi-host
>     testing
>     > > > > > > > >>
>     > > > > > >
>     > > > >
>     > >
>     https://trello.com/c/AnoH6vhP/530-rfc-multiple-machine-support-for-tests
>     > > > > > > > >> and tests surviving host reboot
>     > > > > > > > >>
>     > > > > > >
>     > > > >
>     > >
>     https://trello.com/c/mzhpqQyx/1233-add-avocado-service-to-allow-reboot-between-test-communication-and-even-safer-funcatexit
>     > > > > > > > >> >
>     > > > > > > > >>
>     > > > > > > > >>
>     > > > > > > > >>
>     > > > > > > >
>     > > > > > >
>     > > > > >
>     > > > >
>     > > >
>     > >
>     >
> 

-- 
Cleber Rosa
[ Sr Software Engineer - Virtualization Team - Red Hat ]
[ Avocado Test Framework - avocado-framework.github.io ]
[  7ABB 96EB 8B46 B94D 5E0F  E9BB 657E 8D33 A5F2 09F3  ]




More information about the Avocado-devel mailing list