SLIDE 1 Automated Testing Laboratory for Embedded Linux Distributions
.
Paweł Wieczorek October 11, 2016
Samsung R&D Institute Poland
SLIDE 2 Agenda .
- 1. Introduction
- 2. Motivation
- 3. Automation opportunities with our solutions
- 4. Future plans
- 5. Conclusion
1/42
SLIDE 3
Introduction .
SLIDE 4 Automated Testing Laboratory .
2/42
SLIDE 5 Actual Automated Testing Laboratory .
3/42
SLIDE 6 Automated Testing Laboratory – MinnowBoard Turbot .
4/42
SLIDE 7 Automated Testing Laboratory – Odroid U3+ .
5/42
SLIDE 8 Automated Testing Laboratory – HiKey .
6/42
SLIDE 9 Automated Testing Laboratory – Supporting hardware .
7/42
SLIDE 10 Automated Testing Laboratory – SD MUX .
8/42
SLIDE 12
Motivation .
SLIDE 13 Change life cycle .
10/42
SLIDE 14 Change acceptance .
11/42
SLIDE 15 Release engineering .
12/42
SLIDE 16 Primary tools .
Open Build Service Jenkins
13/42
SLIDE 17 Release Engineer role .
- 1. Release engineer investigates build failures (if any)
- 2. Release engineer checks whether new images introduce any regressions
- 3. Release engineer approves inclusion of verified changes to the main
repository
14/42
SLIDE 18 Release Engineer headache .
- Complete image testing on multiple devices takes much time:
ttotal = tdownload + ntargets × (tflash + ttest)
- Monotonous – involves repeating the same set of actions
- Requires focus – processing similar results calls for an observant person
15/42
SLIDE 19 Release Engineer dilemma .
- 1. Can we test images less frequently?
- 2. Can we run fewer tests on new images?
- 3. Can we assume that successfully built packages work properly?
16/42
SLIDE 20 Release Engineer credo .
- 1. Resolve an issue as soon as it is discovered
- 2. Look for a solution, not just workaround
- 3. Don't release software that was never run on an actual device
17/42
SLIDE 21 Room for improvement .
- Complete image testing on multiple devices takes much time:
ttotal = tdownload + ntargets × (tflash + ttest)
- Monotonous – involves repeating the same set of actions
- Requires focus – processing similar results calls for an observant person
18/42
. . A U T O M A T E
SLIDE 22
Automation opportunities with our solutions .
SLIDE 23 Automation tasks categories .
- Software
- Infrastructure
- Internal
- External
- Hardware
19/42
SLIDE 24 Automation tasks examples .
- Software
- Infrastructure
- Internal
- External
- Hardware
- Polling OBS for new images
- Getting new images from OBS
- Controlling hosts and targets
- Publishing test results
- Flashing target devices with new images
20/42
SLIDE 25 Automation tasks examples .
- Software
- Infrastructure
- Internal
- External
- Hardware
- Polling OBS for new images
- Getting new images from OBS
- Controlling hosts and targets
- Publishing test results
- Flashing target devices with new images
20/42
SLIDE 26 Automation tasks examples .
- Software
- Infrastructure
- Internal
- External
- Hardware
- Polling OBS for new images
- Getting new images from OBS
- Controlling hosts and targets
- Publishing test results
- Flashing target devices with new images
20/42
SLIDE 27 Automation tasks examples .
- Software
- Infrastructure
- Internal
- External
- Hardware
- Polling OBS for new images
- Getting new images from OBS
- Controlling hosts and targets
- Publishing test results
- Flashing target devices with new images
20/42
SLIDE 28 Automation tasks examples .
- Software
- Infrastructure
- Internal
- External
- Hardware
- Polling OBS for new images
- Getting new images from OBS
- Controlling hosts and targets
- Publishing test results
- Flashing target devices with new images
20/42
SLIDE 29 Software – polling OBS and getting new images .
- OBS lacks event mechanism
- Human-readable naming conventions
require parsing
- New image discovery is run
- n multiple levels
- Scheduling tasks
- Queueing tasks
Jenkins
21/42
SLIDE 30 Internal infrastructure – reliable communication with devices .
OpenSSH
- Depends on other services
- Requires network connection
Serial console
- Lower rate of data transfer
- Less flexible than alternatives
Default choice
(Smart Development Bridge)
22/42
SLIDE 31 Internal infrastructure – configuration management .
- Testlab-handbook on its own is not enough
- All changes in configuration are tracked in Testlab-host
- Improved deployments
- No more snowflakes!
23/42
SLIDE 32 External infrastructure – results publishing .
- Easily available
- With possibility for future reuse
- Preferably using existing services
- Sharing test environment information
- Publishing test results
- Providing data for future reuse
MediaWiki edited by Pywikibot
24/42
SLIDE 33 Hardware – flashing target devices with new images .
- Current interface focused on user interaction
- Designed for single target device per host
- Architecture-specific procedure
25/42
SLIDE 34
Hardware – SD MUX .
SLIDE 35
Board control
Hardware – SD MUX .
SLIDE 36
Board control Memory card
Hardware – SD MUX .
SLIDE 37
Board control T arget SDB/card connection Memory card
Hardware – SD MUX .
SLIDE 38
Board control Host card connection T arget SDB/card connection Memory card
Hardware – SD MUX .
SLIDE 39
Board control Host SDB/card access Host card connection T arget SDB/card connection Memory card
Hardware – SD MUX .
SLIDE 40
Power switch Board control Host SDB/card access Host card connection T arget SDB/card connection Memory card
Hardware – SD MUX .
SLIDE 41 Controlling SD MUX .
$ sdmuxctrl --help Usage: sdmuxctrl command
- l, --list
- i, --info
- o, --show-serial
- r, --set-serial=STRING
- t, --init
- u, --status
(...)
33/42
SLIDE 42 Former work flow .
Requires release engineer's interaction
34/42
SLIDE 43 SD MUX work flow .
Fully automated process
35/42
SLIDE 44
SD MUX – schematics .
SLIDE 45 SD MUX – open-source .
https://git.tizen.org/cgit/tools/testlab/sd-mux
37/42
SLIDE 46
Future plans .
SLIDE 47 What is next? .
- Pre-test cases development
- More detailed monitoring of differences between tested images
- Improved fail management
- Improved resource management
- System distribution
38/42
SLIDE 48
Conclusion .
SLIDE 49 Summary .
- 1. No need for reinventing the wheel in modern automation
- 2. Custom hardware can simplify tasks
- 3. Automation pays off in the long term
39/42
SLIDE 50 Questions?
39/42
SLIDE 51
Thank you!
Paweł Wieczorek
p.wieczorek2@samsung.com Samsung R&D Institute Poland
SLIDE 52 Further read
- https://wiki.tizen.org/wiki/Laboratory
- https://wiki.tizen.org/wiki/SD_MUX
- https://git.tizen.org/cgit/tools/testlab
SLIDE 53 Pictures used
- https://wiki.tizen.org/w/images/9/95/Testlab.JPG
- http://openbuildservice.org/images/obs-logo.png
- https://wiki.jenkins-ci.org/download/attachments/2916393/logo.png
- https://wiki.tizen.org/w/images/5/57/Tizen_Build_Process.gif
- https://by-example.org/wp-content/uploads/2015/08/openssh-logo.png
- https://pixabay.com/en/terminal-console-shell-cmd-dos-153150/
- https://pixabay.com/en/gears-options-settings-silhouette-467261/
- https://commons.wikimedia.org/wiki/File:Notification-icon-MediaWiki-logo.svg