summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Remove board 'wolf' from master/ToT branch.stabilize-falco-4537.91.Bstabilize-4537.147.Bstabilize-4537.118.Brelease-R30-4537.BDave Parker2013-08-121-1/+0
| | | | | | | | | | | | | | Firmware development for this board is happening on the firmware-wolf-4389.24.B branch. BUG=chrome-os-partner:21815 BRANCH=None TEST=Run util/make_all.sh. Verify all is made. Change-Id: I4b58a982a87562231453f3f201024b809c6a24fb Signed-off-by: Dave Parker <dparker@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/65514 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Add abstract "cond_t" type to detect state transitions.Bill Richardson2013-08-091-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We often need to watch for transitions between one state and another, so that we can issue warnings or take action ONCE. This abstracts that "have I already reacted to this" stuff into a single set of functions. For example, this code reads a GPIO every time through the loop, but it only generates an event when the GPIO value changes from 0 to 1: cond_t c; cond_init_false(&c); while(1) { int val = read_some_gpio(); cond_set(&c, val); if (cond_went_true(&c)) host_event(SOMETHING_HAPPENED); sleep(1); } BUG=none BRANCH=falco,peppy TEST=manual make BOARD=falco runtests Change-Id: I42393fcf3c4eb71b9551118a0f442d55c0691315 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/65071
* Remove proxy config flags for unit testsVic Yang2013-08-042-11/+26
| | | | | | | | | | | | | | | This moves per-test config flags from test_config.mk to test_config.h, where one can define/undefine config flags for individual test. BUG=chrome-os-partner:19235 TEST=Pass all tests BRANCH=None Change-Id: I096aded2007881433d3b6414d37f8bfdc6a2c45c Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/64367 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Add turbo mode charger support, and tests for it.Bill Richardson2013-07-255-1/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some chargers can run in a "turbo" mode, which lets it draw from the battery to provide extra power to the AP in short bursts. In order for this to work properly, the EC has to watch the current closely to make sure specific limits are observed. It also has to recognize specific adapters, since those limits vary depending on the rated power that the adapter can provide. This adds the basic functionality, plus a test for it. BUG=chrome-os-partner:20739 BRANCH=falco,peppy TEST=manual make BOARD=${BOARD} runtests On Falco, you can also use the "adapter" EC command to see what's going on. Try replacing the adapters and running that command to be sure they're correctly identified, too: > adapter Adapter 65W (590mv), turbo 1, AP_throttled 0 > We currently support 45W, 65W, and 90W adapters. Unknown adapters are treated as 65W, but don't enable turbo mode. Change-Id: I7e5407db825ce7e596cb495fb8cb4d1dd1ff639c Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/63372 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Change macro names used for test configurationsBill Richardson2013-07-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | We can't change CONFIG_ options from the gcc commandline, because include/configs.h explicitly undefs them again. So for some tests, we add a -DFOO to the command line and then put this in the source: This change just uses TEST_FOO instead of FOO, so it's more obvious what's happening. BUG=chrome-os-partner:20739 BRANCH=falco,peppy TEST=manual No functional change, just renaming. Run make BOARD=${BOARD} runtests Everything should still pass. Change-Id: I17e10180f8d779dff0961cf411f5b61cfc70c316 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/63371 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Move TPSChrome charging temperature range to battery packRong Chang2013-07-244-0/+134
| | | | | | | | | | | | | | | | | This change moves vendor specific temperature ranges to battery pack files or board setup files. And added a host test case to verify that does not change x86 smart battery charging state machine behavior. BUG=chrome-os-partner:21181 BRANCH=None TEST=manual build test: util/ecmakeall.sh hosttests: make hosttests && make runtests Change-Id: I48e76826b5555f64b78e3c063ce5f02416c72aa2 Signed-off-by: Rong Chang <rongchang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/62978 Reviewed-by: Vic Yang <victoryang@chromium.org>
* bolt: add prelimnary supportAaron Durbin2013-07-241-0/+1
| | | | | | | | | | | | | | | | | | The preliminary bolt support allows the board to boot with all the necessary peripherals working except for the following things: - Not all board temp sensors are added. - WLAN is not powered on because of inrush issues. - USB power chargers are fixed to normal mode for now. BUG=chrome-os-partner:20372 BRANCH=None TEST=Built and booted Change-Id: Iea7a39e812bb396e5731f212630b7fe97c164bf2 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/62210 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Lessen timing constraints in hooks testVic Yang2013-07-231-3/+3
| | | | | | | | | | | | | | HOOK_TICK and HOOK_SECOND aren't firing with precise interval. Let's lessen the timing constraints. BUG=chromium:263288 TEST=Pass all tests BRANCH=None Change-Id: Ic093c2a27ed1b8621469a4097e567b80d1eeb50d Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/63144 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Test power button in kb_8042 testVic Yang2013-07-231-0/+48
| | | | | | | | | | | | | | This checks keycodes are sent correctly when power button is pressed. BUG=chrome-os-partner:19236 TEST=Pass the test BRANCH=None Change-Id: Ibaa4ffce749167be5b8376aada0786f9760e7707 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/62955 Reviewed-by: Yung-Chieh Lo <yjlou@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Test sysjump tag in kb_8042 testVic Yang2013-07-231-4/+38
| | | | | | | | | | | | | This checks that keyboard state is preserved across system jump. BUG=chrome-os-partner:19236 TEST=Pass the test BRANCH=None Change-Id: I53c5bb68246fd117b351d89c3907daf028bc4ef3 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/62908 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Add system_common unit testVic Yang2013-07-223-1/+127
| | | | | | | | | | | | | | This tests reboot-on-ap-shutdown. BUG=chrome-os-partner:19236 TEST=Pass the test BRANCH=None Change-Id: Ic1a07670f82646e85d014d52a2aba0835319c212 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/62855 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Remove unneeded direct includes of board.h and config.hRandall Spangler2013-07-163-3/+0
| | | | | | | | | | | | | | | | | | | | | Both of these are included via common.h, which is in turn included by most other header files. Directly including board.h or config.h is redundant and discouraged. No code changes, just removing #includes. This is in preparation for making a top-level config.h file, but that change will be easier to review if it doesn't touch as many files. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all platforms Change-Id: I204bcebe5607c6e6808821eb071cfc31d2a93a7c Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/62121 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Add console editing unit testVic Yang2013-07-113-1/+243
| | | | | | | | | | | | | This tests console editing and history functionality. BUG=chrome-os-partner:19236 TEST=Pass the test BRANCH=None Change-Id: Ia3edf2dd627d081fbcae7f775992d7570e5e1dd0 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/61555 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Add extpower-gpio unit testVic Yang2013-07-113-1/+91
| | | | | | | | | | | | | This tests host event and hook are triggered when AC status changes. BUG=chrome-os-partner:19236 TEST=Pass the test. BRANCH=None Change-Id: I9e4263f3f6e273bfb0b24671a4e5c56b20a04e1a Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/61554 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Add I8042 keyboard unit testVic Yang2013-07-114-1/+238
| | | | | | | | | | | | | This tests I8042 scancode and typematic. BUG=chrome-os-partner:19236 TEST=Pass all tests many times. BRANCH=None Change-Id: I8457b7b807b694b0bae32abf1647961f946dc5e1 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/61553 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Add thermal host and console command testVic Yang2013-07-111-1/+192
| | | | | | | | | | | | | | This checks the functionality of thermal engine related host and console commands. BUG=chrome-os-partner:19236 TEST=Pass all tests. BRANCH=None Change-Id: I604ed3bfed3549b2573fac65da83450acd3f2797 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/60964 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Add flash host read command testVic Yang2013-07-111-0/+32
| | | | | | | | | | | | | This checks the correctness of data returned by flash read host command. BUG=chrome-os-partner:19236 TEST=Pass all tests. BRANCH=None Change-Id: I3b97addb9b14922e9f33a71b865000ae9a8d40a8 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/60963 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Initial board commit for Wolf based on Slippy.Dave Parker2013-07-092-1/+2
| | | | | | | | | | | | | Additional fix-ups will come in subsequent CLs. BUG=chrome-os-partner:20760 BRANCH=wolf TEST=Verify "make BOARD=wolf" complete succesfully. Change-Id: I24a37f3bebb1feb37c83c2c1b4f8f8db7bbcb2d8 Signed-off-by: Dave Parker <dparker@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/61318 Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
* Allow bigger flash write commandsRandall Spangler2013-07-011-6/+8
| | | | | | | | | | | | | | | | Version 1 of EC_CMD_FLASH_WRITE will use as big a write as possible given the available command parameter space. Falls back to 64 byte writes on old platforms. BUG=chrome-os-partner:20571 BRANCH=none TEST=Copy burn_my_ec onto a link and run it. Write size should be 64 bytes for the first half of the update (since the old EC doesn't support ver.1 of the write command) and 240 bytes for the second half of the update. Change-Id: I5900de3a5700d7c82a2e0c3cf9921b7ced1c0343 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/60511
* More keyboard scan testVic Yang2013-06-181-7/+115
| | | | | | | | | | | BUG=chrome-os-partner:19236 TEST=Pass the test BRANCH=None Change-Id: Ie0b0657c0bca2ec459cc8b04d9e06199b70414d9 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/58795 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* More flash unit testVic Yang2013-06-171-14/+95
| | | | | | | | | | BUG=chrome-os-partner:19236 TEST=Pass the test BRANCH=None Change-Id: Idfbbdd40948ea4f8468cf9de95eee17e0d0773ed Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/58794
* A method to mock host commandVic Yang2013-06-171-35/+10
| | | | | | | | | | | | This will be used often, so let's move it to test_util.c. BUG=chrome-os-partner:19235 TEST=Pass flash test. BRANCH=None Change-Id: I2f685f657f8742c2b29e3b9c88ba01daacf982f8 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/58793
* Make target for test coverage report generationVic Yang2013-06-162-3/+5
| | | | | | | | | | | | | By 'make coverage', lcov is used to generate test coverage report in HTML format stored in coverage_rpt folder. BUG=chrome-os-partner:19235 TEST=Generate a report. BRANCH=None Change-Id: I44142eaaeb897cf09179764781120370920144cd Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/58203
* More queue unit testVic Yang2013-06-131-0/+1
| | | | | | | | | | | | | Check queue_remove_unit returns 0 on queue empty. BUG=chrome-os-partner:19236 TEST=Pass the test. BRANCH=None Change-Id: I3162ba5e57e9111e1896954d815c26882fa372eb Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/58331 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* More hooks unit testVic Yang2013-06-131-0/+10
| | | | | | | | | | | | | Checks we cannot call non-registered deferred functions. BUG=chrome-os-partner:19236 TEST=Pass the test. BRANCH=None Change-Id: I6cf67f85c7749632627819cc05e6809c040fb697 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/58330 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* More utils unit testVic Yang2013-06-131-3/+114
| | | | | | | | | | | BUG=chrome-os-partner:19236 TEST=Pass the test. BRANCH=None Change-Id: I4075f3fb0ef23a54b4ca249a21fe28e698e595cb Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/58329 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Unit test for queue implementationVic Yang2013-06-103-1/+185
| | | | | | | | | | | BUG=chrome-os-partner:19236 TEST=Pass the test. BRANCH=None Change-Id: I575e4a9abfd9431e3b74c36da8c3d69285e5c0fb Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/58032 Reviewed-by: Yung-Chieh Lo <yjlou@chromium.org>
* Enable flash unit test on emulatorVic Yang2013-06-032-17/+37
| | | | | | | | | | | BUG=chrome-os-partner:19236 TEST=Pass all tests BRANCH=None Change-Id: I09276292499b94b2d4810830de51e4c63a9b7342 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/56704 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Clean up flash section defines and increase lm4 image sizeRandall Spangler2013-06-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | The firmware defines had two almost-identical sets. Coalesce into one consistent set. Link had 256 KB flash, but only allowed 2 80KB images. Future LM4-based platforms (slippy/peppy/falco/etc) will now use the entire flash, with RO=124KB, pstate=4KB, RW=128KB. This matches what the STM32 platforms do, where pstate is contiguous with the RO firmware. No functional change to STM32-based platforms. BUG=chrome-os-partner:19176 BRANCH=none TEST=build all platforms and dump_fmap ec.bin. - stm32-based platforms should report RO=61440@0, RW=65536@0x10000 - link should report RO=81920@0, RW=81920@0x14000 - slippy should report RO=129024@0, RW=131072@0x20000 Change-Id: I20b1d95c16250d9a5d228ead06eef03d96548823 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/56655
* Create board configuration for peppy bringupDave Parker2013-05-232-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This change copies the slippy board configuration as a starting point for peppy. This change is essentially the same as https://gerrit.chromium.org/gerrit/55820 BUG=chrome-os-partner:19640 BRANCH=none TEST=manual Tested on slippy as there are no peppy-specific changes yet. cros_workon --board peppy start chromeos-ec emerge-peppy chromeos-ec ~/trunk/src/platform/ec/util/flash_ec --board peppy Signed-off-by: Dave Parker <dparker@chromium.org> Change-Id: I4c5f7a77fa55a6364effe838f7a656d56bfad9fb Reviewed-on: https://gerrit.chromium.org/gerrit/56332 Reviewed-by: Olof Johansson <olofj@chromium.org> Commit-Queue: Dave Parker <dparker@chromium.org> Tested-by: Dave Parker <dparker@chromium.org>
* Move write protect GPIO handling to flash moduleRandall Spangler2013-05-231-4/+2
| | | | | | | | | | | | | | | | | Write protect signal naming is now consistent across boards. New CONFIG_WP_ACTIVE_HIGH is present on systems where the write protect signal is active-high (e.g. Link). This will be used in the next CL, which moves flash_get_protect() to flash_common.c BUG=chrome-os-partner:15613 BRANCH=none TEST=flashinfo properly reports WP signal status Change-Id: I502ab033c3eb36661cc3ee97320874b3fbf6fc0d Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/56087 Reviewed-by: Vic Yang <victoryang@chromium.org>
* Create board configuration for falco bringupBill Richardson2013-05-202-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | This change just copies slippy and tweaks a few things that were slippy-specific instead of not-link-specific (there are still bugs open for those things). BUG=chrome-os-partner:18788 BRANCH=none TEST=manual Since there are no Falco-specific changes yet (just slippy with another name), I can try it on Slippy: cros_workon --board falco start chromeos-ec emerge-falco chromeos-ec ~/trunk/src/platform/ec/util/flash_ec --board falco I also built and tested Link EC, to make sure nothing broke there either. Change-Id: I9b3682032bd51adab4450520dfe52e3036750ef9 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/55820 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Adjust hooks test timingVic Yang2013-05-171-11/+16
| | | | | | | | | | | | | | | | We unit test to be as less time sensitive as possible. This change adjusts the timing in the test to ensure we have enough time for context switching. Otherwise we get false negative sometimes. BUG=chrome-os-partner:19236 TEST=Repeatedly run the test and see it passes. BRANCH=None Change-Id: I90c1200641cb02f95bd7631bd2870ad21b21bffc Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/51562 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Revert "Revert "Add thermal engine test""Vic Yang2013-05-173-2/+242
| | | | | | | | | | | | | | | This reverts commit 89e688a3325e91d3c59ac639f04f2c91019c9b10. Time-scaling is added back. We can run this test now. BUG=chrome-os-partner:19236 TEST=Pass the test. BRANCH=None Change-Id: Id3dcec6fc12489f5f0602de91c6560a8dfbef9af Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/51551 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Revert "Add thermal engine test"Vic Yang2013-05-163-242/+2
| | | | | | | | | | | | | | | | Time-scale functionality is temporarily reverted and this test is now taking too long. Revert this test now. Will add it back when we solve the time-scale issue. This reverts commit d9cf88b35ad211d873f48b41fd985e22ff049b83 Change-Id: Id9ce1071eb2114dd6968d3df9f0bce395edaeef6 Reviewed-on: https://gerrit.chromium.org/gerrit/51482 Commit-Queue: Vic Yang <victoryang@chromium.org> Tested-by: Vic Yang <victoryang@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org> Tested-by: Stéphane Marchesin <marcheu@chromium.org>
* Relax timing constraints in hooks testVic Yang2013-05-151-2/+2
| | | | | | | | | | | | | | Current timing constraints are too tight that the test sometimes fails when it shouldn't. BUG=chrome-os-partner:19236 TEST=Pass the test BRANCH=None Change-Id: Ib94ff44691ba36f14dbf02319d0371770b5ece5d Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/51250 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Add thermal engine testVic Yang2013-05-153-2/+242
| | | | | | | | | | | BUG=chrome-os-partner:19236 TEST=Pass the test. BRANCH=None Change-Id: I1c96437e1fb3492faa5352383f852dc1d2718ace Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/51248 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Add hook testVic Yang2013-05-143-1/+146
| | | | | | | | | | | | | Test of hook functionality. BUG=chrome-os-partner:19236 TEST=Pass the test BRANCH=None Change-Id: I4700f3061edd0707932e935a719fc73c3976892e Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/50957 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Add power button testVic Yang2013-05-083-168/+107
| | | | | | | | | | | | | This tests power button notification and debouncing. BUG=chrome-os-partner:19236 TEST=Pass all tests BRANCH=None Change-Id: Ief8bc24a8725e01734d84e76ab4b6ae0506b811f Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/50524 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Put test utility macros in headerVic Yang2013-05-0810-220/+38
| | | | | | | | | | | | | | Several test utility macros have been duplicated across tests. Let's put them in a single place. BUG=chrome-os-partner:19236 TEST='make runtests', 'BOARD=spring make tests' BRANCH=None Change-Id: Ib0c9f829715425cc23e33b8ef456b17dfadab13c Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/50513 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Speed up mutex and kb_scan testVic Yang2013-05-082-3/+3
| | | | | | | | | | | | | The current delay is unnecessarily long. This CL shortens the delay. BUG=chrome-os-partner:19236 TEST='make runtests' BRANCH=None Change-Id: Ica07458e7ae15cf28c3482b6df96df66c0d45182 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/50487 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Add lid switch test and enable kb_mkbp testVic Yang2013-05-085-5/+154
| | | | | | | | | | | BUG=chrome-os-partner:19236 TEST=Pass both tests BRANCH=None CQ-DEPEND=CL:50467 Change-Id: I59cc407c2d1bf7f549ff9c46226cf7fa60fe7157 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/50466
* Add persistent storage for emulatorVic Yang2013-05-071-0/+10
| | | | | | | | | | | | | | This is needed for non-volatile register emulation. Also, this can be used to implement system jump or reset flags. BUG=chrome-os-partner:19235 TEST=Run utils test. Check persistent storage file exists. BRANCH=None Change-Id: I699f95718ef6f5de6c3bbb4e37619ee015fb6c4a Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/50313 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Pthread-based emulator for unit testingstabilize-4100.38.BVic Yang2013-05-076-16/+40
| | | | | | | | | | | | | | This is the first version of pthread-based RTOS emulator. With this, we will be able to test high-level modules entirely on the host machine. BUG=chrome-os-partner:19325 TEST='make runtests' and see tests passing. BRANCH=None Change-Id: I1f5fcd76aa84bdb46c7d35c5e60ae5d92fd3a319 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/49954 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Add test for keyboard MKBP protocolVic Yang2013-05-063-0/+265
| | | | | | | | | | | | | A test that check keyboard MKBP module using keyboard scanning module and host commands. BUG=chrome-os-partner:19236 TEST=Pass the test BRANCH=None Change-Id: Ic22a2c8f3069d8e72c1222882073d428b733bca3 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/50132
* Fix ADC test for LM4Vic Yang2013-04-301-0/+14
| | | | | | | | | | | | | | | LM4 doesn't have implementation of adc_read_all_channels(). Let's use adc_read_channel() in this case. BUG=chrome-os-partner:18598 TEST=Build stress test for link. See no error about adc_read_all_channels() undefined. BRANCH=None Change-Id: I5b13384468667cbd17b83faab9f9d3fdc48de91d Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/49589 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Make test-list a per-board parameterVic Yang2013-04-291-3/+16
| | | | | | | | | | | | | | Some tests are not applicable to all boards. This change makes test-list a per-board parameter so a test can be enabled/disabled for individual boards. Also disable all the tests that don't compile now. BUG=chrome-os-partner:18598 TEST=make tests for all boards BRANCH=None Change-Id: Id2d18e23856f5c64dbdc7c6ca5949f8ad61b5cc0 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/49452
* Remove mock filesVic Yang2013-04-291-26/+0
| | | | | | | | | | | | | We are moving to a per-function mock mechanism, which is less likely to break when someone adds a function to a file with a mock. BUG=chrome-os-partner:18598 TEST=None BRANCH=None Change-Id: Ie625064730d2224accbaf1febbdc4750e793d047 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/49451
* Fix kb_scan test when CONFIG_LID_SWITCH is not definedVic Yang2013-04-291-0/+6
| | | | | | | | | | | | If we don't have lid switch, don't test it. BUG=chrome-os-partner:18598 TEST=Build on mccroskey and see errors about GPIO_LID_OPEN go away. BRANCH=None Change-Id: I1084e1bfc2e6bd611dc393c1b2d501e786d2a0e3 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/49450
* Fill in I2C test parametersVic Yang2013-04-291-2/+18
| | | | | | | | | | | | | This fills in test parameters for link, pit, snow, and daisy. Also fixes compilation error due to CONFIG_ADC not defined. BUG=chrome-os-partner:18598 TEST=Build test-stress. (Link failed due to unrelated issue.) BRANCH=None Change-Id: I8a5cfcf4acdae607c23dbe5cf3378945f91c7807 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/49449