Hi Neil,
But the problem is I want to define a job and use python script to communicate with the Android DUT, for example I want to use script.py in dispatcher to control the DUT. And the "lava_test_shell" will copy all these commands in steps to run.sh.
# test_script.yaml run: steps: - echo "hello world" - ./android/script/script.py
# run.sh in DUT ###default parameters from yaml### ###### ###test parameters from json### ###### ###other parameters### LAVA_SERVER_IP='172.16.117.50' TARGET_TYPE='android' ###### set -e export TESTRUN_ID=python cd /data/local/tmp/lava-mstar01/tests/0_c7a6f9e0-ae70-4d8b-8c06-f6da04b7a26c UUID=`cat uuid` echo "<LAVA_SIGNAL_STARTRUN $TESTRUN_ID $UUID>" #wait for an ack from the dispatcher read echo "hello world" ./android/script/script.py echo "<LAVA_SIGNAL_ENDRUN $TESTRUN_ID $UUID>" #wait for an ack from the dispatcher read
------------------ 原始邮件 ------------------ 发件人: "Neil Williams";neil.williams@linaro.org; 发送时间: 2016年1月30日(星期六) 晚上11:29 收件人: "wangbo"wangbo.hfut@qq.com; 抄送: "Lava Users Mailman list"lava-users@lists.linaro.org; 主题: Re: Forward of moderated message
On 29 January 2016 at 04:08, wangbo wangbo.hfut@qq.com wrote:
Hi Neil,
Thanks very much to your quickly and warmly answer.
One more question:
LAVA copy all the test scripts defined in the YAML to the DUT at the specified directory, then the job will be executed on the DUT.
The LAVA test shell scripts are POSIX shell. If a shell is not available, the test can be rewritten to use ADB commands, as the CTS tests do.
And if I want to test one android device, but almost all the android images don't support python interpreter,
LAVA does not run any python code on the DUT unless the test writer puts python commands into their test shell definition YAML. The python code only runs on the dispatcher and handles communications over the serial port (or using ADB).
so it's impossible to write case with python, in most cases we should use shell to run the test case. But sometimes we want to use Appium/Robotium to test the android image, and use LAVA to deploy the image, analyze and record the test results, so LAVA is unavailable in such conditions. Do you have any advice to integrate these tools in LAVA or will LAVA support such conditions in the future.
You'd need to use multinode (as with CTS) to install the test support binaries into a VM which then communicates with the device. That VM then reports results that are retrieved with LAVA.
Best Regards.
------------------ 原始邮件 ------------------ 发件人: "Neil Williams";neil.williams@linaro.org; 发送时间: 2016年1月29日(星期五) 凌晨3:27 收件人: "wangbo"wangbo.hfut@qq.com; 抄送: "Lava Users Mailman list"lava-users@lists.linaro.org; 主题: Re: Forward of moderated message
From: wangbo wangbo.hfut@qq.com Date: Thu, 28 Jan 2016 20:39:25 +0800 Subject: LAVA uninstall and upgrade, build method from the source code Hi all,
I installed LAVA on Ubuntu 14.04 in our lab, but later we plan to upgrade the system to Ubuntu 15.10, so what should I do now?
I'm afraid the only long term option is to migrate to Debian Jessie, possibly using a VM, and then using jessie-backports. It is uncertain whether it will be possible to support LAVA on the upcoming Ubuntu Xenial 16.04LTS and support for Trusty has already been frozen. There have been problems upgrading from 14.04 - these issues have already been discussed on the lists.
https://lists.linaro.org/pipermail/lava-announce/2015-November/000003.html
The next upload of LAVA should be able to migrate into Ubuntu ahead of the cut off for the Xenial release but that is outside our control. It is also unknown whether it will be possible to maintain a system based on Xenial - the LAVA software team will be unable to maintain such support and users would need to be proactive in fixing problems that may arise.
Because I have already installed LAVA, so should I uninstall it firstly, and then use apt-get install to reinstall LAVA? But I can't find more information about this in the website, can you give me some advice, thanks very much.
https://staging.validation.linaro.org/static/docs/installing_on_debian.html#...
The main problems will be with the database, so building in any way will have the same difficulties. Trusty is, sadly, a dead end at the moment.
And, how to install LAVA from the source code?
Not supported - installation is only supported as Debian packages. LAVA is much more than a pip install / virtualenv can ever manage.
LAVA includes different parts, like lava-server, lava-dispatcher, lava-tool, etc. So which one should be installed firstly? By the way in the Git, for example "https://git.linaro.org/lava/lava-server.git/tree", there is no document about the install method. Now, I will modify some code to meet our demands in our lab, and then replace the corresponding file. We plan to manage the code with Git too. So if we know the install method from the source code, it will be better to build the code.
There is no documentation for installing from git because the installation method has moved to using packages. We abandoned the old install from git methods a long time ago due to interminable bugs and insolvable dilemmas.
During the migration to the new dispatcher, things are too complex to support more than Debian Jessie (and the next Debian release, Stretch). Once the migration is complete (in 2017), the advantages of the new design should also make it easier to support other operating systems. We are a long way from that at the moment.
--
Neil Williams
neil.williams@linaro.org http://www.linux.codehelp.co.uk/
Hi Neil,
After review the test-definition in git.linaro.org/qa/test-definitions.git, we can define a job to test the android image and run the python code to communicate with the DUT, for example use one KVM as the host to run the python code, and one DUT as the target to be tested. In such condition, we don't use the python environment in the dispatcher, is it right? And of course we can't use python script in the Job/YAML to test the DUT.
Thanks.
发件人: "wangbo";wangbo.hfut@qq.com; 发送时间: 2016年2月1日(星期一) 下午5:01 收件人: "Neil Williams"neil.williams@linaro.org; 抄送: "Lava Users Mailman list"lava-users@lists.linaro.org; 主题: 回复: Forward of moderated message
Hi Neil,
But the problem is I want to define a job and use python script to communicate with the Android DUT, for example I want to use script.py in dispatcher to control the DUT. And the "lava_test_shell" will copy all these commands in steps to run.sh.
# test_script.yaml run: steps: - echo "hello world" - ./android/script/script.py
# run.sh in DUT ###default parameters from yaml### ###### ###test parameters from json### ###### ###other parameters### LAVA_SERVER_IP='172.16.117.50' TARGET_TYPE='android' ###### set -e export TESTRUN_ID=python cd /data/local/tmp/lava-mstar01/tests/0_c7a6f9e0-ae70-4d8b-8c06-f6da04b7a26c UUID=`cat uuid` echo "<LAVA_SIGNAL_STARTRUN $TESTRUN_ID $UUID>" #wait for an ack from the dispatcher read echo "hello world" ./android/script/script.py echo "<LAVA_SIGNAL_ENDRUN $TESTRUN_ID $UUID>" #wait for an ack from the dispatcher read
------------------ 原始邮件 ------------------ 发件人: "Neil Williams";neil.williams@linaro.org; 发送时间: 2016年1月30日(星期六) 晚上11:29 收件人: "wangbo"wangbo.hfut@qq.com; 抄送: "Lava Users Mailman list"lava-users@lists.linaro.org; 主题: Re: Forward of moderated message
On 29 January 2016 at 04:08, wangbo wangbo.hfut@qq.com wrote:
Hi Neil,
Thanks very much to your quickly and warmly answer.
One more question:
LAVA copy all the test scripts defined in the YAML to the DUT at the specified directory, then the job will be executed on the DUT.
The LAVA test shell scripts are POSIX shell. If a shell is not available, the test can be rewritten to use ADB commands, as the CTS tests do.
And if I want to test one android device, but almost all the android images don't support python interpreter,
LAVA does not run any python code on the DUT unless the test writer puts python commands into their test shell definition YAML. The python code only runs on the dispatcher and handles communications over the serial port (or using ADB).
so it's impossible to write case with python, in most cases we should use shell to run the test case. But sometimes we want to use Appium/Robotium to test the android image, and use LAVA to deploy the image, analyze and record the test results, so LAVA is unavailable in such conditions. Do you have any advice to integrate these tools in LAVA or will LAVA support such conditions in the future.
You'd need to use multinode (as with CTS) to install the test support binaries into a VM which then communicates with the device. That VM then reports results that are retrieved with LAVA.
Best Regards.
------------------ 原始邮件 ------------------ 发件人: "Neil Williams";neil.williams@linaro.org; 发送时间: 2016年1月29日(星期五) 凌晨3:27 收件人: "wangbo"wangbo.hfut@qq.com; 抄送: "Lava Users Mailman list"lava-users@lists.linaro.org; 主题: Re: Forward of moderated message
From: wangbo wangbo.hfut@qq.com Date: Thu, 28 Jan 2016 20:39:25 +0800 Subject: LAVA uninstall and upgrade, build method from the source code Hi all,
I installed LAVA on Ubuntu 14.04 in our lab, but later we plan to upgrade the system to Ubuntu 15.10, so what should I do now?
I'm afraid the only long term option is to migrate to Debian Jessie, possibly using a VM, and then using jessie-backports. It is uncertain whether it will be possible to support LAVA on the upcoming Ubuntu Xenial 16.04LTS and support for Trusty has already been frozen. There have been problems upgrading from 14.04 - these issues have already been discussed on the lists.
https://lists.linaro.org/pipermail/lava-announce/2015-November/000003.html
The next upload of LAVA should be able to migrate into Ubuntu ahead of the cut off for the Xenial release but that is outside our control. It is also unknown whether it will be possible to maintain a system based on Xenial - the LAVA software team will be unable to maintain such support and users would need to be proactive in fixing problems that may arise.
Because I have already installed LAVA, so should I uninstall it firstly, and then use apt-get install to reinstall LAVA? But I can't find more information about this in the website, can you give me some advice, thanks very much.
https://staging.validation.linaro.org/static/docs/installing_on_debian.html#...
The main problems will be with the database, so building in any way will have the same difficulties. Trusty is, sadly, a dead end at the moment.
And, how to install LAVA from the source code?
Not supported - installation is only supported as Debian packages. LAVA is much more than a pip install / virtualenv can ever manage.
LAVA includes different parts, like lava-server, lava-dispatcher, lava-tool, etc. So which one should be installed firstly? By the way in the Git, for example "https://git.linaro.org/lava/lava-server.git/tree", there is no document about the install method. Now, I will modify some code to meet our demands in our lab, and then replace the corresponding file. We plan to manage the code with Git too. So if we know the install method from the source code, it will be better to build the code.
There is no documentation for installing from git because the installation method has moved to using packages. We abandoned the old install from git methods a long time ago due to interminable bugs and insolvable dilemmas.
During the migration to the new dispatcher, things are too complex to support more than Debian Jessie (and the next Debian release, Stretch). Once the migration is complete (in 2017), the advantages of the new design should also make it easier to support other operating systems. We are a long way from that at the moment.
--
Neil Williams
neil.williams@linaro.org http://www.linux.codehelp.co.uk/
On 1 February 2016 at 10:59, wangbo wangbo.hfut@qq.com wrote:
Hi Neil,
After review the test-definition in git.linaro.org/qa/test-definitions.git, we can define a job to test the android image and run the python code to communicate with the DUT, for example use one KVM as the host to run the python code, and one DUT as the target to be tested. In such condition, we don't use the python environment in the dispatcher, is it right?
Yes, using KVM and multinode means that you do not use the python environment on the dispatcher. The python script then runs in a python environment which you define, inside the KVM. You need to make sure either that this image has any python dependencies pre-installed or that the necessary python support is installed before the script runs.
And of course we can't use python script in the Job/YAML to test the DUT.
Not unless you have a way of deploying the python interpreter as part of your test or part of the image.
Your tests in the KVM need to use ADB to run tasks on the DUT.
Thanks.
发件人: "wangbo";wangbo.hfut@qq.com; 发送时间: 2016年2月1日(星期一) 下午5:01 收件人: "Neil Williams"neil.williams@linaro.org; 抄送: "Lava Users Mailman list"lava-users@lists.linaro.org; 主题: 回复: Forward of moderated message
Hi Neil,
But the problem is I want to define a job and use python script to communicate with the Android DUT, for example I want to use script.py in dispatcher to control the DUT. And the "lava_test_shell" will copy all these commands in steps to run.sh.
# test_script.yaml run: steps: - echo "hello world" - ./android/script/script.py
# run.sh in DUT ###default parameters from yaml### ###### ###test parameters from json### ###### ###other parameters### LAVA_SERVER_IP='172.16.117.50' TARGET_TYPE='android' ###### set -e export TESTRUN_ID=python cd /data/local/tmp/lava-mstar01/tests/0_c7a6f9e0-ae70-4d8b-8c06-f6da04b7a26c UUID=`cat uuid` echo "<LAVA_SIGNAL_STARTRUN $TESTRUN_ID $UUID>" #wait for an ack from the dispatcher read echo "hello world" ./android/script/script.py echo "<LAVA_SIGNAL_ENDRUN $TESTRUN_ID $UUID>" #wait for an ack from the dispatcher read
Just for clarity and for others reading the list, this is a run.sh as generated by LAVA. Do not use LAVA_SIGNAL in test scripts.
Yes, I understand now. But KVM is not a suitable solution in our test environment. So I plan to add one command in lava dispatcher to call the local python script (Appium/Robotium) to communicate with the DUT. And if I do so, the problem should be the parse of the test results.
Now we use Jenkins to auto-build the source image, and is it possible to receive the email send by Jenkins to start one test Job in LAVA? Otherwise, I can write a script to retrieve the content of the email, and then use "lava sumit-job" to start one test job.
发件人: "Neil Williams";neil.williams@linaro.org; 发送时间: 2016年2月1日(星期一) 晚上7:08 收件人: "wangbo"wangbo.hfut@qq.com; 抄送: "Lava Users Mailman list"lava-users@lists.linaro.org; 主题: Re: Forward of moderated message
On 1 February 2016 at 10:59, wangbo wangbo.hfut@qq.com wrote:
Hi Neil,
After review the test-definition in git.linaro.org/qa/test-definitions.git, we can define a job to test the android image and run the python code to communicate with the DUT, for example use one KVM as the host to run the python code, and one DUT as the target to be tested. In such condition, we don't use the python environment in the dispatcher, is it right?
Yes, using KVM and multinode means that you do not use the python environment on the dispatcher. The python script then runs in a python environment which you define, inside the KVM. You need to make sure either that this image has any python dependencies pre-installed or that the necessary python support is installed before the script runs.
And of course we can't use python script in the Job/YAML to test the DUT.
Not unless you have a way of deploying the python interpreter as part of your test or part of the image.
Your tests in the KVM need to use ADB to run tasks on the DUT.
Thanks.
发件人: "wangbo";wangbo.hfut@qq.com; 发送时间: 2016年2月1日(星期一) 下午5:01 收件人: "Neil Williams"neil.williams@linaro.org; 抄送: "Lava Users Mailman list"lava-users@lists.linaro.org; 主题: 回复: Forward of moderated message
Hi Neil,
But the problem is I want to define a job and use python script to communicate with the Android DUT, for example I want to use script.py in dispatcher to control the DUT. And the "lava_test_shell" will copy all these commands in steps to run.sh.
# test_script.yaml run: steps: - echo "hello world" - ./android/script/script.py
# run.sh in DUT ###default parameters from yaml### ###### ###test parameters from json### ###### ###other parameters### LAVA_SERVER_IP='172.16.117.50' TARGET_TYPE='android' ###### set -e export TESTRUN_ID=python cd /data/local/tmp/lava-mstar01/tests/0_c7a6f9e0-ae70-4d8b-8c06-f6da04b7a26c UUID=`cat uuid` echo "<LAVA_SIGNAL_STARTRUN $TESTRUN_ID $UUID>" #wait for an ack from the dispatcher read echo "hello world" ./android/script/script.py echo "<LAVA_SIGNAL_ENDRUN $TESTRUN_ID $UUID>" #wait for an ack from the dispatcher read
Just for clarity and for others reading the list, this is a run.sh as generated by LAVA. Do not use LAVA_SIGNAL in test scripts.
Hi Neil,
After the completion of job, we find that sometimes the job don't stop automatically and status of the device is still running. And we must cancel the job manually.
------------------ Best Regards. Bo Wang
------------------ 原始邮件 ------------------ 发件人: "wangbo";wangbo.hfut@qq.com; 发送时间: 2016年2月1日(星期一) 晚上7:19 收件人: "Neil Williams"neil.williams@linaro.org; 抄送: "Lava Users Mailman list"lava-users@lists.linaro.org; 主题: 回复: Forward of moderated message
Yes, I understand now. But KVM is not a suitable solution in our test environment. So I plan to add one command in lava dispatcher to call the local python script (Appium/Robotium) to communicate with the DUT. And if I do so, the problem should be the parse of the test results.
Now we use Jenkins to auto-build the source image, and is it possible to receive the email send by Jenkins to start one test Job in LAVA? Otherwise, I can write a script to retrieve the content of the email, and then use "lava sumit-job" to start one test job.
发件人: "Neil Williams";neil.williams@linaro.org; 发送时间: 2016年2月1日(星期一) 晚上7:08 收件人: "wangbo"wangbo.hfut@qq.com; 抄送: "Lava Users Mailman list"lava-users@lists.linaro.org; 主题: Re: Forward of moderated message
On 1 February 2016 at 10:59, wangbo wangbo.hfut@qq.com wrote:
Hi Neil,
After review the test-definition in git.linaro.org/qa/test-definitions.git, we can define a job to test the android image and run the python code to communicate with the DUT, for example use one KVM as the host to run the python code, and one DUT as the target to be tested. In such condition, we don't use the python environment in the dispatcher, is it right?
Yes, using KVM and multinode means that you do not use the python environment on the dispatcher. The python script then runs in a python environment which you define, inside the KVM. You need to make sure either that this image has any python dependencies pre-installed or that the necessary python support is installed before the script runs.
And of course we can't use python script in the Job/YAML to test the DUT.
Not unless you have a way of deploying the python interpreter as part of your test or part of the image.
Your tests in the KVM need to use ADB to run tasks on the DUT.
Thanks.
发件人: "wangbo";wangbo.hfut@qq.com; 发送时间: 2016年2月1日(星期一) 下午5:01 收件人: "Neil Williams"neil.williams@linaro.org; 抄送: "Lava Users Mailman list"lava-users@lists.linaro.org; 主题: 回复: Forward of moderated message
Hi Neil,
But the problem is I want to define a job and use python script to communicate with the Android DUT, for example I want to use script.py in dispatcher to control the DUT. And the "lava_test_shell" will copy all these commands in steps to run.sh.
# test_script.yaml run: steps: - echo "hello world" - ./android/script/script.py
# run.sh in DUT ###default parameters from yaml### ###### ###test parameters from json### ###### ###other parameters### LAVA_SERVER_IP='172.16.117.50' TARGET_TYPE='android' ###### set -e export TESTRUN_ID=python cd /data/local/tmp/lava-mstar01/tests/0_c7a6f9e0-ae70-4d8b-8c06-f6da04b7a26c UUID=`cat uuid` echo "<LAVA_SIGNAL_STARTRUN $TESTRUN_ID $UUID>" #wait for an ack from the dispatcher read echo "hello world" ./android/script/script.py echo "<LAVA_SIGNAL_ENDRUN $TESTRUN_ID $UUID>" #wait for an ack from the dispatcher read
Just for clarity and for others reading the list, this is a run.sh as generated by LAVA. Do not use LAVA_SIGNAL in test scripts.
lava-users@lists.lavasoftware.org