Linux Foundation Wiki

project collaboration site

User Tools

Site Tools


civilinfrastructureplatform:ciptestingreferencetestcases

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
civilinfrastructureplatform:ciptestingreferencetestcases [2018/06/11 10:38]
rajmarshall [Procedure:] correct formatting
civilinfrastructureplatform:ciptestingreferencetestcases [2018/09/21 13:32] (current)
rajmarshall [Test #6: Use lava-tool utility] punctuate lavacli note correctly
Line 378: Line 378:
  
 ===== Test #6: Use lava-tool utility ===== ===== Test #6: Use lava-tool utility =====
 +
 +Note that lava-tool is deprecated so, in preference, set up and use lavacli see [[ciptestingreferencetestcases#​test-7use-lavacli-utility|lavacli instructions]].
 +
 ==== Prerequisites:​ ==== ==== Prerequisites:​ ====
  
Line 477: Line 480:
 // Note: After running the test, if the (4) user LED's are all off, manually reboot the board by pressing the reset button (S1) or disconnect and reconnect the power cable to the board before re-running the test.// // Note: After running the test, if the (4) user LED's are all off, manually reboot the board by pressing the reset button (S1) or disconnect and reconnect the power cable to the board before re-running the test.//
  
-9. You can see an example of a successful test log file [[https://​gitlab.com/​snippets/​1715994| the Beaglebone Black Test results ]]. +10. You can see an example of a successful test log file [[https://​gitlab.com/​snippets/​1715994| the Beaglebone Black Test results ]].  
 + 
 +===== Test #7: Use lavacli utility ===== 
 +==== Prerequisites:​ ==== 
 + 
 +   * A working CIP Board-at-Desk Single-Developer (B@D) Virtual Machine 
 +   * A Beaglebone Black or a Renesas IWG20M board that is powered up, connected to the LAN with an ethernet cable and connected to the host machine with an FTDI cable. 
 +   * A built kernel for the appropriate board (see Test #3 or #5 depending upon your board) 
 +   * The board has a current successful health check (it is marked as online in LAVA) 
 + 
 +==== Procedure: ==== 
 + 
 +1. On the Virtual machine change to the ''​~/​git-repos/​linux-cip''​ directory. 
 + 
 +''​vagrant@guest:​~$ **cd ~/​git-repos/​linux-cip**''​ 
 + 
 +2. If you have not done so you will need to install lavacli: 
 + 
 +''​vagrant@guest:​~$ **sudo apt install lavacli** ''​ 
 + 
 +''​vagrant@guest:​~$ ** mkdir ~/.config** ''​ 
 + 
 +3. //If you have not already done so//, you will need to create an authentication token 
 +    In the LAVA web interface, click on API->​Authentication Tokens and then on the '​new'​ button,  
 +    give it a description and then click the 'View Token Hash' button and copy the displayed hash value. 
 +    Then:  
 +''​ vagrant@guest:​~/​git-repos/​linux-cip$ **lavacli identities add --token <paste token here> --uri <​nowiki>​http://​localhost:​8080/​RPC2</​nowiki>​ --username lavauser boardAtDesk** ''​ 
 + 
 + 
 +4. Set the TREE_NAME environment variable. 
 + 
 +''​ vagrant@guest:​~/​git-repos/​linux-cip$ **export TREE_NAME=cip-example** ''​ 
 + 
 +// Note: This should be the same name you used when you built the kernel. // 
 + 
 +5. Create a test for use with the ''​lava-tool''​ utility from within the ''​linux-cip''​ git repository.  
 + 
 +''​ vagrant@guest:​~/​git-repos/​linux-cip$ **/​vagrant/​scripts/​create_test.sh /​vagrant/​tests/​bbb_debian_local.yaml ~/​mytest-board.yaml**''​ 
 +- if you are using the Renesas IWG20M use /​vagrant/​tests/​iwg20m-test-ramdisk.yaml as the second parameter! 
 + 
 +// Note: ''​create_test.sh''​ must be run in the ''​linux-cip''​ directory so that the script can retrieve the git settings. // 
 + 
 +// Note: ''​mytest-board.yaml''​ is an example filename. Substitute your own test file name in its place. // 
 + 
 +6. Run the ''​lavacli command''​ to submit the job to LAVA.  
 + 
 +''​ vagrant@guest:​~/​git-repos/​linux-cip$ **<​nowiki>​lavacli -i boardAtDesk jobs submit ~/​mytest-bbb.yaml</​nowiki>​**''​ 
 +    // a job number will be echoed // 
 + 
 + 
 +// Note: Please see the LAVA documentation for help [[https://​validation.linaro.org/​static/​docs/​v2/​developing-tests.html|writing tests]] in LAVA, // 
 + 
 +7. On your host machine, open a web browser and navigate to the LAVA Website: 
 + 
 +''​**http://​localhost:​8080**''​ 
 + 
 +8. Click on the Scheduler menu and select the All Jobs option. 
 + 
 +9. Click on the View Job Results icon for the top job to watch the build. 
 + 
 +10. The results are displayed in the web page as the test runs. When the test is done, the status of the Job will show as **Complete** at the top of the page. 
 + 
 +This is an example what the start of the test looks like in the Beaglebone case: 
 + 
 +   ​lava-dispatcher,​ installed at version: 2018.4-2~bpo9+1 
 +   ​start:​ 0 validate 
 +   Start time: 2018-05-10 12:​14:​13.326013+00:​00 (UTC) 
 +   ​Validating that http://​localhost:​8010/​initramfs/​initramfs.cpio.gz exists 
 +   ​Validating that http://​localhost:​8010/​cip-test/​cip_v4.4.126/​v4.4.126-cip22/​arm/​omap2plus_defconfig/​zImage exists 
 +   ​Validating that http://​localhost:​8010/​cip-test/​cip_v4.4.126/​v4.4.126-cip22/​arm/​omap2plus_defconfig/​dtbs/​am335x-boneblack.dtb exists 
 +   ​Validating that http://​localhost:​8010/​cip-test/​cip_v4.4.126/​v4.4.126-cip22/​arm/​omap2plus_defconfig/​modules.tar.xz exists 
 +   ​validate duration: 0.02 
 +   case: validate 
 +   ​case_id:​ 128 
 +   ​definition:​ lava 
 +   ​result:​ pass 
 +   ​start:​ 1 tftp-deploy (timeout 00:04:00) [common] 
 +   ​start:​ 1.1 download-retry (timeout 00:04:00) [common] 
 +   ​start:​ 1.1.1 http-download (timeout 00:04:00) [common] 
 +   Not decompressing ramdisk as can be used compressed. 
 +   ​downloading http://​localhost:​8010/​initramfs/​initramfs.cpio.gz 
 +   ​saving as /​var/​lib/​lava/​dispatcher/​tmp/​11/​tftp-deploy-pozjv6jf/​ramdisk/​initramfs.cpio.gz 
 +   <​snip>​ 
 + 
 +This is what the end of a successful test looks like: 
 + 
 +   </​snip>​ 
 +   ​Finalising connection for namespace '​common'​ 
 +   end: 4.2 read-feedback (duration 00:00:01) [common] 
 +   end: 4 finalize (duration 00:00:01) [common] 
 +   ​Cleaning after the job 
 +   ​Cleaning up download directory: /​var/​lib/​lava/​dispatcher/​tmp/​11/​tftp-deploy-pozjv6jf/​ramdisk 
 +   ​Cleaning up download directory: /​var/​lib/​lava/​dispatcher/​tmp/​11/​tftp-deploy-pozjv6jf/​kernel 
 +   ​Cleaning up download directory: /​var/​lib/​lava/​dispatcher/​tmp/​11/​tftp-deploy-pozjv6jf/​dtb 
 +   ​Cleaning up download directory: /​var/​lib/​lava/​dispatcher/​tmp/​11/​tftp-deploy-pozjv6jf/​modules 
 +   ​Override tmp directory removed at /​var/​lib/​lava/​dispatcher/​tmp/​11 
 +   Root tmp directory removed at /​var/​lib/​lava/​dispatcher/​tmp/​11 
 +   Job finished correctly 
 +   case: job 
 +   ​case_id:​ 142 
 +   ​definition:​ lava 
 +   ​result:​ pass 
 + 
 + 
 +// Note: After running the test, if the (4) user LED's are all off, manually reboot the board by pressing the reset button (S1) or disconnect and reconnect the power cable to the board before re-running the test.// 
 + 
 +11. You can see an example of a successful test log file [[https://​gitlab.com/​snippets/​1715994| the Beaglebone Black Test results ]].  
  
-===== Test #7: Testing Externally Built Kernels =====+===== Test #8: Testing Externally Built Kernels =====
 ==== Prerequisites:​ ==== ==== Prerequisites:​ ====
  
Line 511: Line 621:
    ​vagrant@guest:​~$ sudo cp testFileName.yaml /​etc/​lava-server/​dispatcher-config/​health-checks/​DeviceName.yaml    ​vagrant@guest:​~$ sudo cp testFileName.yaml /​etc/​lava-server/​dispatcher-config/​health-checks/​DeviceName.yaml
        
-If you wish to just test then use the [[ciptestingreferencetestcases#​test-6use-lava-tool-utility|lava-tool ​instructions]],​ replacing the file with your appropriate test.+If you wish to just test then use the [[ciptestingreferencetestcases#​test-7use-lavacli-utility|lavacli ​instructions]],​ replacing the file with your appropriate test.
 ---- ----
  
 Return to the B@D [[ciptestingboardatdesksingledevfeaturepage|feature page]] Return to the B@D [[ciptestingboardatdesksingledevfeaturepage|feature page]]
  
civilinfrastructureplatform/ciptestingreferencetestcases.1528713488.txt.gz · Last modified: 2018/06/11 10:38 by rajmarshall