| # -*- mode: python; coding: utf-8 -*- |
| # |
| # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # DOCUMENTATION: |
| # |
| # Define below an ordered list if tests for execution on factory |
| # assembly lines. This list can be customized for specific factory |
| # needs, within the limits set by the below comments -- specifically, |
| # ODMs should not remove any Google required tests. |
| # |
| # This file is loaded via a call to execfile() in the primary factory |
| # autotest control file. |
| |
| # -- CUSTOMIZATION VARIABLES --------------------------------------- |
| # You can tune these settings to fit your factory process. |
| |
| # Change this to the number of reboots you want during run-in. |
| _REBOOT_SEQ_ITERATIONS = 2 |
| |
| # Change this to the duration of SAT during run-in (suggested 10+ mins). |
| _SAT_DURATION_SECS = 60 |
| |
| # Change this to True if you want secure wipe (very slow). |
| _ENABLE_FACTORY_SECURE_WIPE = False |
| |
| # Change this to True for enabling firmware write protection. |
| # *** THIS IS REQUIRED TO BE TRUE FOR MASS PRODUCTION / SHIPPING DEVICES. *** |
| _ENABLE_WRITE_PROTECTION = False # WARNING: False is ONLY ALLOWED FOR PRE-MP. |
| |
| # Change this to enable checking external power (AC) before starting test. |
| _ENABLE_CHECK_EXTERNAL_POWER = False |
| |
| # Change this to enable using shop floor system. |
| _ENABLE_SHOP_FLOOR = False |
| |
| # Change this to http://SERVER_ADDR:PORT/ if your shop floor server is not |
| # running on same host of mini-omaha server. |
| _SHOP_FLOOR_SERVER_URL = '' |
| |
| # Change this to match your local report upload site. |
| # Default is to use shopfloor if available, otherwise None to discard reports. |
| # WARNING: None is ONLY ALLOWED FOR DEBUGGING. |
| _REPORT_UPLOAD_METHOD = 'shopfloor' if _ENABLE_SHOP_FLOOR else None |
| # |
| # * For LAN environments, setup a FTP server and build FTP URL. |
| # Example: ftp://user:pass@host:port/directory/ |
| # |
| #_REPORT_UPLOAD_METHOD = 'ftp://LOCAL_FTP_HOST/' |
| # |
| # * If you have access to public internet, use Google CPFE URL. |
| # Example: ("cpfe:https://www.google.com/chromeos/partner/fe/report_upload?" |
| # "device_name=mario&report_type=rma") |
| # |
| #_REPORT_UPLOAD_METHOD = ( |
| # "cpfe:https://www.google.com/chromeos/partner/fe/report_upload?" |
| # "device_name=PLATFORM_NAME&report_type=REPORT_TYPE") |
| # |
| # REPORT UPLOADING IS REQUIRED TO BE SET AT BUILD TIME. |
| # REPORTS MUST BE PROVIDED TO GOOGLE, MACHINES WITHOUT LOGS CANNOT BE SUPPORTED. |
| |
| # Audio sample file for testing. |
| _DEFAULT_AUDIO_SAMPLE = 'site_tests/suite_Factory/fhorn.wav' |
| |
| # -- END OF CUSTOMIZATION VARIABLES -------------------------------- |
| |
| |
| # TEST ORDERING: Tests in TEST_LIST will be run in the order |
| # below, unless the operator interrupts the flow via keyboard |
| # shortcut. To cause immediate execution of the run-in tests, for |
| # example, reorder runin to occur as the first test in the test_list. |
| |
| # FactoryTest: Standard test without UI, only pass and fail. |
| # OperatorTest: Test with its own UI. |
| # AutomatedSequence: A sequence of automated tests. Each item in subtests will |
| # be always executed again when re-running AutomatedSequence. |
| # AutomatedSubTest: Individual test inside AutomatedSequence. |
| # AutomatedRebootSubTest: Reboot test inside AutomatedSequence. |
| # TestGroup: A group of tests. Similiar to AutomatedSequence, but you can |
| # trigger individual sub items without re-testing every steps. |
| |
| # The test list name, for the test list selector in the UI. This is |
| # read by literally parsing this file, not evaluating it, so this must |
| # be a literal string. |
| TEST_LIST_NAME = 'Generic test list' |
| |
| TEST_LIST = [ |
| |
| OperatorTest( |
| autotest_name='factory_Start', |
| label_zh='开始', |
| never_fails=True, |
| # 'press_to_continue' can be disabled by default when the configuration |
| # includes other explicit prompts, like _ENABLE_SHOP_FLOOR (operator |
| # must input one string), so the value is "not _ENABLE_SHOP_FLOOR". |
| dargs={'press_to_continue': not _ENABLE_SHOP_FLOOR, |
| 'require_external_power': _ENABLE_CHECK_EXTERNAL_POWER, |
| 'require_shop_floor': _ENABLE_SHOP_FLOOR, |
| 'shop_floor_server_url': _SHOP_FLOOR_SERVER_URL}), |
| |
| # Suggested functional tests (optional): ---------------------------------- |
| |
| OperatorTest( |
| autotest_name='factory_StressTest', |
| label_zh='压力测试', |
| dargs={'seconds': _SAT_DURATION_SECS}), |
| |
| FactoryTest( |
| id="Graphics", |
| label_zh='图型', |
| autotest_name='graphics_GLBench'), |
| |
| AutomatedSequence( |
| id='PowerCtrl', |
| label_zh='电源管理', |
| subtests=[ |
| |
| AutomatedSubTest( |
| label_en='sleep / wake', |
| label_zh='睡眠 / 唤醒', |
| autotest_name='power_Resume'), |
| |
| AutomatedRebootSubTest( |
| label_en='reboot (%s times)' % _REBOOT_SEQ_ITERATIONS, |
| label_zh='重新开机 (%s 次)' % _REBOOT_SEQ_ITERATIONS, |
| iterations=_REBOOT_SEQ_ITERATIONS), |
| ]), |
| |
| # Suggested component tests (optional): ----------------------------------- |
| |
| # Remove this group if your device does not have ChromeOS-compatible EC. |
| TestGroup( |
| id='EC', |
| subtests=[ |
| |
| FactoryTest( |
| id='Basic', |
| label_zh='基本测试', |
| autotest_name='hardware_EC'), |
| |
| FactoryTest( |
| id='Fan', |
| label_zh='风扇', |
| autotest_name='hardware_EC', |
| dargs={'test_fan': True}), |
| |
| FactoryTest( |
| id='TempSensor', |
| label_zh='温度传感', |
| autotest_name='hardware_EC', |
| dargs={'num_temp_sensor': 10}), |
| |
| FactoryTest( |
| id='Battery', |
| label_zh='电池', |
| autotest_name='hardware_EC', |
| dargs={'test_battery': True}), |
| ]), |
| |
| OperatorTest( |
| autotest_name='factory_Display', |
| label_zh='显示'), |
| |
| # Remove this test if your device does not have external display. |
| OperatorTest( |
| autotest_name='factory_ExtDisplay', |
| label_zh='外接显示', |
| dargs={'has_audio':True, |
| 'audio_sample_path':_DEFAULT_AUDIO_SAMPLE}), |
| |
| OperatorTest( |
| autotest_name='factory_LidSwitch', |
| label_zh='上盖开关'), |
| |
| OperatorTest( |
| autotest_name='factory_Audio', |
| label_zh='音源装置', |
| dargs={'audio_sample_path':_DEFAULT_AUDIO_SAMPLE}), |
| |
| OperatorTest( |
| autotest_name='factory_Camera', |
| label_zh='相机'), |
| |
| OperatorTest( |
| autotest_name='factory_LightSensor', |
| label_zh='光感应器'), |
| |
| OperatorTest( |
| id="KbBacklight", |
| autotest_name='factory_KeyboardBacklight', |
| label_zh='键盘背光'), |
| |
| OperatorTest( |
| autotest_name='factory_Keyboard', |
| label_zh='键盘', |
| kbd_shortcut='k'), |
| |
| OperatorTest( |
| autotest_name='factory_Touchpad', |
| label_zh='触控板'), |
| |
| OperatorTest( |
| autotest_name='factory_USB', |
| # Change num_usb_ports to real USB ports on device. |
| dargs={'num_usb_ports': 1}), |
| |
| OperatorTest( |
| id='CardReader', |
| label_zh='SD 读卡机', |
| pytest_name='removable_storage', |
| dargs={'media': 'SD', |
| 'block_size': 512 * 1024, # 512KB block size |
| 'random_block_count': 3, # Randomly r/w 3 blocks |
| 'perform_sequential_test': True, |
| 'sequential_block_count': 8, # Sequentially r/w 8 blocks |
| 'perform_locktest': True}), |
| |
| # Required tests (mandatory): ---------------------------------------------- |
| |
| # THIS IS A GOOGLE REQUIRED TEST. |
| # YOU MUST TEST THIS COMPONENT, EITHER WITH THIS TEST, OR ANOTHER EQUIVALENT |
| # TEST THAT YOU HAVE HAD REVIEWED BY GOOGLE. |
| OperatorTest( |
| autotest_name='factory_VPD', |
| label_zh='产品资讯', |
| kbd_shortcut='v'), |
| |
| # THIS IS A GOOGLE REQUIRED TEST. |
| # YOU MUST TEST THIS COMPONENT, EITHER WITH THIS TEST, OR ANOTHER EQUIVALENT |
| # TEST THAT YOU HAVE HAD REVIEWED BY GOOGLE. |
| OperatorTest( |
| autotest_name='factory_HWID', |
| label_zh='硬体代号', |
| kbd_shortcut='h'), |
| |
| # THIS IS A GOOGLE REQUIRED TEST. |
| # PLEASE DO NOT REMOVE THIS TEST IN PRODUCTION RELEASES. |
| OperatorTest( |
| autotest_name='factory_Finalize', |
| label_zh='最终程序', |
| kbd_shortcut='f', |
| dargs={ |
| 'write_protection': _ENABLE_WRITE_PROTECTION, |
| 'upload_method': _REPORT_UPLOAD_METHOD, |
| 'secure_wipe': _ENABLE_FACTORY_SECURE_WIPE, |
| }), |
| ] |