Hello Wei,bad timing, the documentation was in a bad shape for a long time and you run into the same issues I noticed while cleaning it up. The fixes are already applied so you can give it a try:
http://avocado-vt.readthedocs.io/en/latest/WritingTests/WritingSimpleTests.htmlHopefully it works for you now. There were couple of missing config files and few outdated structures. See the changes here:
https://github.com/avocado-framework/avocado-vt/pull/514/commits/1cf640646ad777501d6bc347a177db17de444d3d Kind regards, Lukáš Dne 16.5.2016 v 16:17 Wei WA Li napsal(a):
Hi Cleber, What I did is as below, did I miss something? 1) mkdir Code 2)git clone https://github.com/autotest/tp-qemu.git 3) touch generic/tests/uptime.py git add generic/tests/uptime.py 4) vi generic/tests/uptime.py [root@zs95kv2 Code]# cat /avocado/Code/tp-qemu/generic/tests/uptime.py import logging def run(test, params, env): """ Uptime test for virt guests: 1) Boot up a VM. 2) Establish a remote connection to it. 3) Run the 'uptime' command and log its results. :param test: QEMU test object. :param params: Dictionary with the test parameters. :param env: Dictionary with test environment. """ vm = env.get_vm(params["main_vm"]) vm.verify_alive() timeout = float(params.get("login_timeout", 240)) session = vm.wait_for_login(timeout=timeout) uptime = session.cmd("uptime") logging.info("Guest uptime result is: %s", uptime) session.close() [root@zs95kv2 Code]# 5) Since we have no external repo setting, I have not installed inspektor, I think it just a source checking tool. 6) [root@zs95kv2 Code]# /avocado/avocado/scripts/avocado list uptime Unable to discover url(s) 'uptime' with loader plugins(s) 'file', 'vt', 'external', try running 'avocado list -V uptime' to see the details. [root@zs95kv2 Code]# /avocado/avocado/scripts/avocado run uptime Unable to discover url(s) 'uptime' with loader plugins(s) 'file', 'vt', 'external', try running 'avocado list -V uptime' to see the details. [root@zs95kv2 Code]# Best regards, - Li, Wei (李 伟) zKVM Solution Test IBM China Systems & Technology Lab, Beijing E-Mail: [email protected] Tel: 86-10-82450631 Notes: Wei WA Li/China/IBM Address: 3BW298, Ring Bldg. No.28 Building, ZhongGuanCun Software Park,No.8 DongBeiWang West Road, ShangDi, Haidian District, Beijing, P.R.China Inactive hide details for Cleber Rosa ---2016/05/16 22:04:23---On 05/16/2016 09:18 AM, Wei WA Li wrote: >Cleber Rosa ---2016/05/16 22:04:23---On 05/16/2016 09:18 AM, Wei WA Li wrote: > From: Cleber Rosa <[email protected]> To: Wei WA Li/China/IBM@IBMCN, [email protected] Date: 2016/05/16 22:04 Subject: Re: [Avocado-devel] Can't execute avocado run --vt-type uptime as VT guide. ------------------------------------------------------------------------ On 05/16/2016 09:18 AM, Wei WA Li wrote:Hi all, I am following the guide as below.http://avocado-vt.readthedocs.io/en/latest/WritingTests/WritingSimpleTests.htmlI have create uptime.py file in local dir, but as guide said, I can't list and run uptime, I think I did not enable this python to excution list. Did I miss some steps? But I can't find any information about this on the guide. [root@zs95kv2 tests]# pwd /avocado/Code/tp-qemu/generic/tests [root@zs95kv2 tests]# ll uptime.py -rw-r--r--. 1 root root 631 May 16 08:05 uptime.py [root@zs95kv2 tests]# /avocado/avocado/scripts/avocado run --vt-typeuptime The documentation is broken. Can you try without `--vt-type` and let us know how it goes? Thanks, -Cleber.Test discovery plugin <avocado_vt.loader.VirtTestLoader object at 0xb11715f8> failed: Virt Backend uptime is not currently supported by avocado-vt. Check for typos and the list of supported backends No urls provided nor any arguments produced runable tests. Please double check the executed command. [root@zs95kv2 tests]# /avocado/avocado/scripts/avocado list uptime Unable to discover url(s) 'uptime' with loader plugins(s) 'file', 'vt', 'external', try running 'avocado list -V uptime' to see the details. [root@zs95kv2 tests]# Best regards, - Li, Wei (李 伟) zKVM Solution Test IBM China Systems & Technology Lab, Beijing E-Mail: [email protected] Tel: 86-10-82450631 Notes: Wei WA Li/China/IBM Address: 3BW298, Ring Bldg. No.28 Building, ZhongGuanCun SoftwarePark,No.8DongBeiWang West Road, ShangDi, Haidian District, Beijing, P.R.China _______________________________________________ Avocado-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/avocado-devel-- Cleber Rosa [ Sr Software Engineer - Virtualization Team - Red Hat ] [ Avocado Test Framework - avocado-framework.github.io ] _______________________________________________ Avocado-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/avocado-devel
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Avocado-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/avocado-devel
