Port and refactor IQ test (Image Quality) to pytest
1. Add test_type = IQ in camera_fixture test
2. Add sample test parameters camera.params.sample
3. Add analyze script analyze_camera_fixture_data.py
BUG=chrome-os-partner:21593 chrome-os-partner:19272
TEST=Manually,
0. make test
1. Test with shopfloor
OperatorTest(
id='ImageQuality',
pytest_name='camera_fixture',
dargs={'mock_mode': True,
'test_type': 'IQ',
'fixture_type': 'FullChamber',
'test_chart_version': 'A',
'capture_resolution': (1280, 720),
'IQ_data_method': 'Shopfloor',
'IQ_param_pathname': 'camera/camera.params.sample',
'IQ_local_ip': None})
Copy camera.params.sample to shopfloor_data/parameters/camera. It
should fail Lens Shading test. Lower 'max_shading_ratio' to make
it pass. The test data (.txt, .bmp, .jpg) should be saved in
shopfloor_data/aux_logs/.
During test is running, 'Start Test' button should be disabled.
LED of external keyboard should be blinking.
2. Test with FAT32-formatted USB drive with camera.params.sample on it.
Change 'IQ_data_method' to 'USB'.
The test data should be saved in sub-folders sorted by date on USB
drive. After removing USB drive, it should show red 'Unloaded'
label and disable 'Start Test' button. Re-plug USB drive and it
should enable 'Start Test' button again.
3. Use 'IQ_data_method' = 'Simple' and pass the content of
camera.params.sample to 'IQ_param_dict'.
4. Set 'sn_auto_read' to False, it should show serial number input
box. Input box shows green if it matches 'sn_format', shows red
otherwise.
Set 'sn_auto_read' to True, it should hide serial number input box,
and automatically read serial number from 'sn_sysfs_path'.
5. Set 'fw_check' to True to auto check firmware version.
6. Test Enter (w/ and w/o 'ignore_enter_key'), Space, Esc keys.
7. Run py/test/fixture/camera/analysis/analyze_camera_fixture_data.py
inside saved data folder. It should output summary and save
analyzed results to .csv file.
Change-Id: Id56854b7b55d1715e7960c26ebf0cb25ae9e2bd6
Reviewed-on: https://chromium-review.googlesource.com/174483
Reviewed-by: Heng-ruey Hsu <henryhsu@chromium.org>
Tested-by: Justin Chuang <jchuang@chromium.org>
Commit-Queue: Justin Chuang <jchuang@chromium.org>
7 files changed