aboutsummaryrefslogtreecommitdiff
path: root/lava_dispatcher/actions
AgeCommit message (Collapse)Author
2018-10-01Add overrides for bandit false positivesNeil Williams
Reduce the noise in the SAST report further. Override bandit warnings in lava-dispatcher as bandit is overly based on a web UI mindset. Add overrides and fixes for files in ./share/ Signed-off-by: Neil Williams <neil.williams@linaro.org>
2018-10-01Ignore new PEP8 warning W504Neil Williams
Update for some occurrences of W604 but exclude files where this is unrealistic. Ignore W504 as this currently conflicts with black. Signed-off-by: Neil Williams <neil.williams@linaro.org>
2018-09-18Support LXC with IoTNeil Williams
Ensure the connection is picked up from the correct namespace when setting the shared namespace data. Closes: #82 Signed-off-by: Neil Williams <neil.williams@linaro.org>
2018-09-17Remove python2 leftoverRémi Duraffort
In python3, all classes are inheriting from object by default.
2018-09-11Check for download files ending with /Neil Williams
It isn't possible to download a directory as part of a LAVA URL. Fail in validate() instead of waiting for a later failure. Signed-off-by: Neil Williams <neil.williams@linaro.org>
2018-07-31Revert "pyocd: Run connect action before flashing"Neil Williams
This reverts commit 4efd8586a5e8a103f76e9b56abc3a6b9b8a49090. Change-Id: Ia8945a1250a133434e515dcb7059193ff924f512
2018-07-31pyocd: Run connect action before flashingLoic Poulain
The DUT runs new firmware once flashing via pyocd is completed. This can be very quick and booting potentially happens before we even run the connect action. This can cause job failure because dispatcher misses the booting string (e.g. "BOOTING ZEPHYR OS"). This patch fixes this by moving connect action before flashing. This has been tested with a 96Boards nitrogen + zephyr firmware. Update pyocd pipeline refs accordingly. Change-Id: Icdd48d0913294d2d22f5a7f96fd7a9bb27caebe7
2018-07-27LAVA-1295 iMX8M evk device integration.Neil Williams
The iMX8M evk is NXPs new aarch 64 SoC which supports 4k, HDR10 and is supported under the NXP 10 and 15-year Longevity Program. Ensure that the hard_reset command also resets the USB C connection using the Cambrionix hub. Add support for fastboot deployment without changing the bootloader. Add support for TFTP deployment using U-Boot. Change-Id: I3c28c02a69e91f0f8812cd0f5cb416524c6da047
2018-07-26LAVA-1380 Drop 'os' from functional test jobsNeil Williams
Fix check for 'os:' in LXC deploy. Change-Id: I7df7abebaff602b5043742713ecd0b1d2f849d5a
2018-07-25docker: allow to bind devicesRémi Duraffort
We can for instance bind /dev/kvm and use kvm inside docker. Change-Id: I1f04ff81cb1952926a9cc56c9158714961ab1ad5
2018-07-24Check downloaded file size against expectedMatt Hart
If the data stream closes during a download, don't just assume the download is finised. If we have an expected size for calculating the progress, use that to check the file has fully downloaded. Change-Id: I7d6790d867151c991286f46deb0ce320bbe39a37
2018-07-24Use OSError when applicableRémi Duraffort
Since python 3.3, IOError, socket.error has been replaced by OSError. See https://docs.python.org/3/library/exceptions.html#OSError Change-Id: I7318cadf729f9072f80b9537a27eec6da057d993
2018-07-18Rationalise deployment_data for Python3Neil Williams
Various corner cases of the pretend dict deployment_data_dict cause issues and failures. Simplify back to a simple dict and fix the default value of the (little used) os-specific install deps. Change-Id: Ibb121b5d4040bb356729adfbbb8828dea24c7793
2018-07-17Remove lxc_cmd_prefix from Action classRémi Duraffort
Make this an helper function, called when needed as this is only used by Android jobs. Change-Id: I10584f5f37d4edee5b6a8354bbcd5f393d3b4410
2018-07-16Make handle_testcase localNeil Williams
Function only used in one file, move to that file and drop the import. Change-Id: Ib91038c972f0cb07f60a3a6f6c7c70ec417b5ef3
2018-07-16Allow for 'os' to be optional in deploy actionsNeil Williams
Document that 'os' is approximate when it is used. Document when it is still required. Document that other uses are deprecated. Allow the overlay to pick up common POSIX constants. Change-Id: I1f7c8f27615cd33a8d2b505a3f0563373f8111f4
2018-07-11LAVA-1338 Handle STARTTC, ENDTC and TESTCASERémi Duraffort
Send to lava-logs a specific message to mark the start and end of the test case --shell or the creation of a result directly using --result or via patterns. Store the corresponding log line in the TestCase. Add documentation on the limitations of this support. Change-Id: I63c1efd9c23cd8b718b8b235fe19f39a214020be
2018-07-11By default, dict.get() default value is NoneRémi Duraffort
Change-Id: I9d61efc457fb5e49ac1b3ad56acaa1b453b9cc4a
2018-07-10Some pylint fixesNeil Williams
Change-Id: Ic5c1b533c3479b4fdb8cbfe56d051022d1efa779
2018-07-03Dont send an os.linesep when interrupting grubMatt Hart
- fixed the logic in get_device_constant() which didnt handle a constant being set to False Change-Id: I0f34a437e29073c544cf99659ef5fc8c75985b4e
2018-06-29LAVA-939 Integrate cc3220SF boardRémi Duraffort
Add a new GDB boot method for this device. Change-Id: I3283950494c540debc14959233b7d42a7fbd1299
2018-06-27reduce is part of functools in python3Rémi Duraffort
Change-Id: I65533b7a7cb43cb2b8388258abba32cc860755ab
2018-06-27Move debian_package_(version|arch) to lava_commonRémi Duraffort
Change-Id: I41e4ab0f14cae64cc19eccee900a48bb624889bc
2018-06-27Fix undefined variablesRémi Duraffort
Change-Id: Idb03006480388cab7500a6bfb74a97952bc59598
2018-06-27Remove duplicated or unused importsRémi Duraffort
Change-Id: I4b3d8df3ab04af5bc3f5aa4a672022d03e665275
2018-06-26Silence known pytest warningsNeil Williams
Some warnings may be missed with the --disable-warnings option. Change-Id: Ic7daab91b6cdb76a42f81368060b4db3b1ee1ebb
2018-06-25LAVA-836 publish events from a test shellRémi Duraffort
Change-Id: I709bdca92fee30e7695175c40476232592a8e11f
2018-06-22Use /dev/kmsg for LAVA test signals, if requestedMatt Hart
Adds a parameter "lava-signal" to the test definition parameters which when set to "kmsg" will tell the lava test scripts to echo their output to /dev/kmsg. This *might* help with test cases that produce kernel output and can interrupt LAVA signals sent to stdout. This review does NOT cover the issue that lava-test-runner signals will still only be sent to stdout. Change-Id: I8ac92c725ac49e40847d1a54c13bef81030903fa
2018-06-21LAVA-1120 - drop export PS1 lava-testNeil Williams
This export is no longer required and plays awkwardly with second UART support. Change-Id: I2cd74adfdb1b49544727c6175e377193384f8739
2018-06-21Skip wait if no kernel_start_messageNeil Williams
A quiet kernel config will produce no useful output for the kernel message handler, so skip and move on to looking for any auto-login prompts after the kernel has booted. Fixes the RPB OE test job on hikey 960. Change-Id: I3c5c8c21fee135a2aaead691b4e5c76e23c33511
2018-06-20Remove "args" from Action.run()Rémi Duraffort
This argument is not used anymore. Change-Id: I9cc98ed14003e79110c820149570cc1248549535
2018-06-18Use contextlib.suppress when applicableRémi Duraffort
Change-Id: I9b367e3399d53ac5667f8ff615384d030769f1c1
2018-06-18No need to test that a dir exists with os.makedirsRémi Duraffort
When called with exist_ok=True, os.makedirs will not raise an exception when trying to create an existing directory. Change-Id: I70a473bbf0f2a02d9f00544ec5ebbca382047b04
2018-06-15Use yaml.safe_load when parsing user dataRémi Duraffort
Calling yaml.load() on untrusted data is unsafe and can lead to remote code execution. This commit fixes remote code execution in: * the submit page * the xmlrpc api * the scheduler * lava-master and lava-slave This bug was found by running bandit (https://github.com/PyCQA/bandit). Change-Id: I80882f9baeb0e7e1c2127f602cc4b206213cb59f
2018-06-14Add lava-lxc-mocker version to log output.Senthil Kumaran S
Change-Id: Icad8f89b0d541c98eabb062233a6d9810e0b2be5
2018-06-13Use '-q' option whenever apt-get is called.Senthil Kumaran S
Change-Id: Ic3f11880491836fe6bb9d3cd42295a323ac89845
2018-06-12Remove python2 specific codeRémi Duraffort
Change-Id: I15dca273c660b4868f709033485e8ef3332d4e89
2018-06-12Only use "is" when comparing against NoneRémi Duraffort
Change-Id: I6873fe1896bbacfde82906e58d412bf155fac762
2018-06-11LAVA-1305 - catch errors in vexpress mccRémi Duraffort
Fix previous commit. Change-Id: Ic31750bb9d2e84df4c27e64ac60c1b8d9c3c1f55
2018-06-11LAVA-1305 - catch errors in vexpress mccNeil Williams
Change-Id: Ie447b60a2bb6d338167a62eb95c868077c2e158a
2018-06-04Fix: Duplicated Wait for USBDean Birch
Change-Id: I30128dda8a58f495c3882b5eaf4c6764fbc154dd
2018-05-23Create lava_common for Timeout and ExceptionsNeil Williams
Make a clear separation between lava_server and lava_dispatcher binary packages so that a master does not need all the dependencies of lava-dispatcher installed (and does not necessarily have a local worker). Update documentation on how lava-common can be used. Change-Id: I040a44c7ce6d853524ccc33e08df593b0d14c54f
2018-05-18Use InfrastructureError for uefi menu timeoutNeil Williams
uefi-menu-interrupt is the first action to wait for a response after power on for uefi-menu devices like the mustang. If this action timesout, it is likely that the device is simply not booting correctly or not receiving power or the serial connection information is wrong. Change-Id: I2618c89e3b83cb0aff1a7e1ac45e2cf1b6e2e6a0
2018-05-15Complete fastboot sequence cannot be governed in device dictionary.Senthil Kumaran S
auto-login, shell-session, export-env are some actions that are added to the pipeline based on availability of prompts, tests, etc. which depends on the job definition. Hence, adding a fixed fastboot sequence to the device dictionary is not the right thing to do. Change-Id: I44276a73c00b910af967d5056d956ec6ae9637f7
2018-05-14Generate device configuration from templatesNeil Williams
LAVA-1319 - Remove static YAML files and replace with device configuration generated from current Jinja2 templates. Change-Id: I2a078a6aa00d8385780515167630aa3d526f7fa8
2018-05-14LAVA-1324 QEMU usage of KVM acceleratorNeil Williams
Report a result in the 'lava' test suite containing metadata on the version and architecture of the QEMU package providing the binary being executed. Improve the current logging to include the host architecture. Add comments to the device-type to clarify the logic. Change-Id: I258cbcd728283deb213d773094465e55471059f1
2018-05-14Implementation of recovery mode deploy and bootNeil Williams
Using the hikey 6220 as an example, provide support for entering and exiting recovery mode and running a LAVA test shell whilst recovery mode is active. Change-Id: I4795b158337e8151be21d52173b09e13108aa6b6
2018-05-09Test decompression during download streamsMatt Hart
- Test decompressed filesize, shasum and md5sum, for bz2, gz and xz - Test we don't rename files we aren't decompressing (zip) - Fix zip files being renamed when not decompressed Change-Id: I66577d4943029c40eefc285d380892c0d844ab00
2018-05-09LAVA-1309 - pre-* commands should be called with minus-lxcSenthil Kumaran S
Change-Id: I8b5660034f3ac7e191225469c5b5cf3cc1a9e278
2018-05-08Add an helper to list all keys of an action namespaceRémi Duraffort
Change-Id: I7ad41ca0142a2ed0bcb54e310f725362aca22798