summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
Commit message (Collapse)AuthorAgeFilesLines
* gitlab: Remove cache and checkout bydateJeremy Bettis2022-09-141-54/+40
| | | | | | | | | | | | | | | | | | | | | | | Remove the cache, since it only works with shared runners, but keep the needs tags or else Gitlab will run all the build stage jobs before starting any of the test stage jobs, and that is slower. Get the timestamp of the latest commit, and use that timestamp to checkout the corresponding cls in the zephyr and ancillary repos. Retry git clone calls because they actually fail pretty often. BRANCH=None BUG=b:244590155 TEST=Pushed to gitlab coverage branch https://gitlab.com/zephyr-ec/ec/-/pipelines/640483665 Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ie66d5c97349ef17eba302387c3cd525dfbaa82ba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3894402 Reviewed-by: Tristan Honscheid <honscheid@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
* Update license boilerplate text in source code filesMike Frysinger2022-09-121-1/+1
| | | | | | | | | | | | | | | Normally we don't do this, but enough changes have accumulated that we're doing a tree-wide one-off update of the name & style. BRANCH=none BUG=chromium:1098010 TEST=`repo upload` works Change-Id: Icd3a1723c20595356af83d190b2c6a9078b3013b Signed-off-by: Mike Frysinger <vapier@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891203 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* gitlab: Allow the ram/rom reports to failJeremy Bettis2022-09-091-5/+11
| | | | | | | | | | | | | | | | | | | pyelftools isn't working with the new GCC in SDK 0.15, so just allow it to fail, since it is informational only and we still have reports working in the CQ. BRANCH=None BUG=None TEST=None Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I37e1e893d007e705b0d8dfda85c09d1978cd5dc9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3886889 Commit-Queue: Tristan Honscheid <honscheid@google.com> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Tristan Honscheid <honscheid@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* gitlab: Update pyelftoolsJeremy Bettis2022-09-091-1/+1
| | | | | | | | | | | | | | | | | We had pyelftools 0.26 installed, and need 0.28. Probably this should be in the DockerFile, but this is faster. BRANCH=None BUG=None TEST=Ran pip in docker Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Iaa9ddd4dcddf696eb4d59b8a6cffb4e33e1c1ba2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3885228 Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Tomasz Michalec <tmichalec@google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* gitlab: Switch to new container with sdk 0.15Jeremy Bettis2022-09-081-1/+1
| | | | | | | | | | | | | | | | | Zephyr requires the sdk 0.15 or newer now. BRANCH=None BUG=None TEST=Pushed to gitlab https://gitlab.com/zephyr-ec/ec/-/pipelines/633794126 Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Id802efcdeb9f391cd02f93aec923fd6c5764e854 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3880533 Commit-Queue: Aaron Massey <aaronmassey@google.com> Reviewed-by: Aaron Massey <aaronmassey@google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
* gitlab: Only run CI in main and coverage branchesJeremy Bettis2022-09-021-0/+5
| | | | | | | | | | | | | | | | | | | | This workflow rule will prevent this CI config from running unless the branch name is "main" or "coverage". It will have to be cherry-picked into all the other branches to make them stop running sadly. BRANCH=None BUG=b:244766499 TEST=Used yaml validator at https://gitlab.com/zephyr-ec/ec/-/ci/editor?branch_name=main&tab=2 Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I536de3e3fdbca1c48505e61de5737f865bd0e233 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3872545 Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* twister: Use vpythonJeremy Bettis2022-09-021-2/+2
| | | | | | | | | | | | | | | | Switch twister wrapper to use vpython to force it to use python 3.8 with the right modules. BRANCH=None BUG=b:244333401 TEST=./twister Change-Id: I4d020f4082b7c6e987bc4aa3aee6335760a27efa Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3867800 Reviewed-by: Tristan Honscheid <honscheid@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
* gitlab: Fix some path problems in gitlab ciJeremy Bettis2022-09-021-7/+6
| | | | | | | | | | | | | | | | | | Moving the EC dir wasn't moving the dot files, also deleting the files from the cache defeats the purpose of the cache. Corrected both problems. BRANCH=None BUG=None TEST=Pushed to coverage branch in gitlab. Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I2920ec27eafdc76248e9253724b29a198262865a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3869307 Reviewed-by: Tristan Honscheid <honscheid@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
* gitlab: Support running Twister in Gitlab CITristan Honscheid2022-08-261-41/+78
| | | | | | | | | | | | | | | | | | | | | | | This CL aims to get Twister working in the Gitlab CI using a GCC toolchain. It also includes some cleanup of the directory structure and paths in the CI build. The previous approach of checking out zephyr and all zephyr modules as subdirectories under the EC checkout breaks the way Twister searches for tests, as all upstream Zephyr tests get included when we search the EC dir. A detailed layout of the new directory structure is included as a comment in the YAML file. Also bumps up the timeout on several driver tests as they were timing out in CI. BRANCH=None BUG=None TEST=gitlab-runner exec ... {ec_coverage, zephyr_coverage, zephyr_boards_coverage} Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: I80697bd02be363d8462f48abc4b6f0a2394a8926 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3846994 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: Run the upstream shell tests alsoJeremy Bettis2022-08-161-1/+1
| | | | | | | | | | | | | | | | | | | When running twister, run both the EC tests and the zephyr shell tests by default. This should provide for more consistent coverage of the shell code. BRANCH=None BUG=b:242108457 TEST=./twister Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I25078ee0a375de18afaab6a3bfc1ffc8b47b6b3a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3829060 Reviewed-by: Tristan Honscheid <honscheid@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Tristan Honscheid <honscheid@google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
* gitlab: Adjust twister argsJeremy Bettis2022-08-121-3/+3
| | | | | | | | | | | | | | | | | | | | Add -p unit_testing to coverage run of twister in case we get some unit tests. Remove --coverage and platforms from testall stage. Add -v -i to both twister calls so that we get better logs. BRANCH=None BUG=b:242067297 TEST=Ran cmds in docker Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I2013105222b13cbfae75af355ee6d69d353d85b8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3823905 Reviewed-by: Tristan Honscheid <honscheid@google.com> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* gitlab: Add plyJeremy Bettis2022-08-111-1/+1
| | | | | | | | | | | | | | | | Install ply python module. BRANCH=None BUG=b:242067381 TEST=Ran twister in docker Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I71571cef7679852f28b5ca5a598b96d6f11de2e7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3823904 Reviewed-by: Tristan Honscheid <honscheid@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
* ec: Set HOSTGCOV correctly for each compilerJeremy Bettis2022-08-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Set the host gcov correctly, if we are using gcc, then use gcov, otherwise use llvm-cov for clang. Remove the workaround in .gitlab-ci.yml BRANCH=None BUG=None TEST=make clobber && make TEST_FLAG=TEST_COVERAGE=y \ build/coverage/usb_pe_drp_noextended.info V=1 CC=clang TEST=make clobber && make TEST_FLAG=TEST_COVERAGE=y \ build/coverage/usb_pe_drp_noextended.info V=1 TEST=(in docker) make -j8 CRYPTOC_DIR="${MODULES_DIR}/cryptoc" \ CROSS_COMPILE_arm=/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi- \ TEST_FLAG=TEST_COVERAGE=y build/coverage/usb_pe_drp_noextended.info V=1 Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ic97d425e35e25bea07e29c4736730fd21dd72f5b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3818125 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Aaron Massey <aaronmassey@google.com> Tested-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: tests: remove BUILD.py for Zephyr EC unit testsTristan Honscheid2022-08-051-7/+6
| | | | | | | | | | | | | | | | | | | | | | | We have completed transitioning tests to Twister and verified parity in coverage reports between this and the previous version. This CL removes the BUILD.py files from our tests that declare the zmake projects and removes the call to `zmake -D test -a --no-rebuild` from `zephyr/firmware-builder.py` The `EC_ZEPHYR_MERGED` metric is now derived from Twister's coverage data instead. Made corresponding changes to `.gitlab-ci.yml` This CL was tested by comparing the total coverage and list of covered files before and after the change. BUG=b:240093007 BRANCH=None TEST=zephyr/firmware-builder.py --code-coverage {build|test|bundle} Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: I865a22a44f56760790444499c7588f7aec299374 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3811956 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Yuval Peress <peress@google.com>
* gitlab: Remove native_posix buildJeremy Bettis2022-06-301-6/+0
| | | | | | | | | | | | | | | | | | The posix-ec project was renamed, and it was really only a sample, so just remove it from here. The target zephyr_boards_coverage will still build it, so we're not really losing anything by removing it. BUG=b:237431976 BRANCH=none TEST=None Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: If7d006885b38fec97bd234bcb4b250bf74e4c6c4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3736985 Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
* zmake: Add flags to build boards and delete tmpsJeremy Bettis2022-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | The gitlab builder is running out of disk space. Add flags to build fewer things, and to delete the intermediate files and only leave the output files. Before this change zmake build of all boards took 2.1G, and 81M afterwards. BRANCH=None BUG=None TEST=make clobber TEST=zmake build --boards-only -c --delete-intermediates TEST=du -s -h build Change-Id: I507abff512ca1348681a1fd7431d5267efaf5d65 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3726959 Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* gitlab: Remove zmake -j8 argJeremy Bettis2022-05-181-4/+4
| | | | | | | | | | | | | | | | Now that zmake defaults to the physical number of cpus, don't use -j8. BRANCH=None BUG=None TEST=git cherrypick to gitlab Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: If4049ed7a015680b35127b92c2fd49070c648d31 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3652378 Reviewed-by: Yuval Peress <peress@google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Yuval Peress <peress@google.com>
* gitlab: Add all boards report to merged_coverageJeremy Bettis2022-05-181-3/+39
| | | | | | | | | | | | | | | | | | | Add a new coverage report to the merged_coverage job, which is all zephyr boards merged with EC and Zephyr tests (but not twister). This will be a more useful report for tracking coverage increases or regressions as it will include all boards not just herobrine. BRANCH=None BUG=None TEST=Pushed to gitlab coverage branch Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Id9c879ade22f7a53973bcea90b604250db92ddd4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3652377 Reviewed-by: Yuval Peress <peress@google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Yuval Peress <peress@google.com>
* gitlab: Use the same filter in coverage_templateJeremy Bettis2022-05-061-5/+21
| | | | | | | | | | | | | | | | | | | | We were filtering out some directories that are impossible to test with coverage right now from the tests, but not from the boards. Change filters to match in all 3 places. BRANCH=None BUG=None TEST=None Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I17ff82e277069ecddb7c61b61e9ba089a3c54cc9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3632182 Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Yuval Peress <peress@google.com> Commit-Queue: Yuval Peress <peress@google.com> Tested-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: remove Volteer boardDawid Niedzwiecki2022-03-211-5/+0
| | | | | | | | | | | | | | | | Volteer was the first reference board with EC based on Zephyr. At this stage of migrating to Zephyr, the support for Volteer can be dropped, so remove volteer project. BUG=b:218888909 TEST=zmake testall BRANCH=main Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: Ie78cc69e478267f45446b9d11fc2f433136ebfe0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3521781 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
* zmake: Don't exclude anything from coverageJeremy Bettis2022-02-281-2/+7
| | | | | | | | | | | | | | | | | | | | In zmake, don't remove any directories from the coverage reports. In gitlab, add the exclusions back in so that we get the same finished html report that we got before. BRANCH=None BUG=b:156895937 TEST=Ran firmware_builder.py, verified zephyr/test & zephyr/emul Ran .gitlab-ci.yml commands for herobrine and verified that build/herobrine/output/filtered_no_zephyr.info is unchanged. Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ie8fd1e787d8bb6e745f89d773113cccb6c335009 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3491416 Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Aaron Massey <aaronmassey@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* gitlab: Move to the latest docker imageSimon Glass2022-02-251-1/+1
| | | | | | | | | | | | | | This enables support for testing U-Boot vboot. BUG=b:209799513 BRANCH=none TEST=passes on gitlab: https://gitlab.com/zephyr-ec/ec/-/pipelines/479753623 Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I4a94ec7f08236a85b544f7eb73ce277993670af8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3491075 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* gitlab: Fix zmake unit test coverage regexJeremy Bettis2022-02-251-1/+1
| | | | | | | | | | | | | | | | | | The regex wasn't matching the TOTAL line from the coverage report. Change to the recommended regex from https://docs.gitlab.com/ee/ci/pipelines/settings.html#test-coverage-examples BRANCH=None BUG=b:219062927 TEST=None Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ia867148e95f0aa5de3a7e182a13cce952f4b114f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3489261 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
* gitlab: Use zmake -j, don't build boards in testJeremy Bettis2022-02-241-5/+5
| | | | | | | | | | | | | | | | Change all zmake invocations to use -j8, since it defaults to -j1, and change the testall step to only build and run the tests. BRANCH=None BUG=b:217788621 TEST=None Change-Id: Id8892ea5e37796da048573509cc17553dd8d0921 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3488788 Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* gitlab: Build zmake tests with coverageJeremy Bettis2022-02-241-1/+15
| | | | | | | | | | | | | | | | Add new commands to run zmake unit tests with coverage enabled. BRANCH=None BUG=b:219062927 TEST=Ran commands in docker Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ie7e8c0a33df8e92ff946e87bb787dd4a0aced2fa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3472820 Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* zmake: Implement zmake test v2Jeremy Bettis2022-02-231-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As described in go/zmake-cli-v2 Change zmake test to call zmake configure --test, unless the --no-rebuild flag is used, in which case just run tests on existing binaries. It is an error to use --no-rebuild, if you never did a zmake build. BRANCH=None BUG=b:217788621 TEST=make clobber zmake -j8 build herobrine test-drivers zmake -j8 test --no-rebuild herobrine zmake -j8 test --no-rebuild herobrine test-drivers zmake -j8 test --no-rebuild herobrine test-drivers test-tasks zmake -j8 build test-tasks zmake -j8 test --no-rebuild herobrine test-drivers test-tasks make clobber zmake -j8 build --coverage herobrine test-drivers zmake -j8 test --coverage --no-rebuild herobrine zmake -j8 test --coverage --no-rebuild herobrine test-drivers zmake -j8 test --coverage --no-rebuild herobrine test-drivers test-tasks zmake -j8 build --coverage test-tasks zmake -j8 test --coverage --no-rebuild herobrine test-drivers test-tasks zmake -j8 test --coverage herobrine brya zmake -j8 test --coverage --no-rebuild herobrine brya zmake -j8 testall zmake -j8 test --all zmake -j8 test --all --no-rebuild zmake -j8 test --host-tests-only zmake -j8 test --host-tests-only --no-rebuild zmake -j8 test --host-tests-only --coverage zmake -j8 test --host-tests-only --coverage Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I90f23cd0061d97e42359e1d49f2331b71554e3a1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3472683 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* zmake: Implement zmake build v2Jeremy Bettis2022-02-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As described in go/zmake-cli-v2 Change zmake build to call zmake configure --build. Updated docs to stop telling people to run both configure and build as well as some other small documentation mistakes. BRANCH=None BUG=b:217788621 TEST=zmake -j8 build herobrine_npcx9 zmake -j8 build test-drivers zmake -j8 build herobrine_npcx9 test-drivers zmake -j8 build --all zmake -j8 build --coverage herobrine_npcx9 zmake -j8 build --coverage test-drivers zmake -j8 build --coverage herobrine_npcx9 test-drivers zmake -j8 build --all --coverage zmake test build/zephyr/test-drivers/ zmake test --coverage build/zephyr/test-drivers/ zmake -j8 configure --build herobrine_npcx9 zmake -j8 configure --build test-drivers zmake -j8 configure --build herobrine_npcx9 test-drivers zmake -j8 configure --build --all zmake -j8 configure --build --coverage herobrine_npcx9 zmake -j8 configure --build --coverage test-drivers zmake -j8 configure --build --coverage herobrine_npcx9 test-drivers zmake -j8 configure --build --all --coverage zmake -j8 configure --test herobrine_npcx9 zmake -j8 configure --test test-drivers zmake -j8 configure --test herobrine_npcx9 test-drivers zmake -j8 configure --test --all zmake -j8 configure --test --coverage herobrine_npcx9 zmake -j8 configure --test --coverage test-drivers zmake -j8 configure --test --coverage herobrine_npcx9 test-drivers zmake -j8 configure --test --all --coverage Cq-Depend: chromium:3470081 Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Iee939b92e39f0787e50234040a8b6b248ba6c831 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3462631 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* zmake: Implement zmake configure for multi-project.Jeremy Bettis2022-02-191-2/+2
| | | | | | | | | | | | | | | | | Change zmake configure to work as described in go/zmake-cli-v2. BRANCH=None BUG=b:217788621 TEST=Various zmake configure cmds. Cq-Include-Trybots: luci.chromeos.cq:cq-orchestrator Cq-Depend: chromium:3462900 Change-Id: I58fa4d8427efff64c5764eac6ba4752a71785127 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3445105 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
* herobrine: Rename project to 'herobrine' (was 'herobrine_npcx9')Matthias Kaehlcke2022-02-161-4/+4
| | | | | | | | | | | | | | | | The NPCX9 is the only EC chip that will be used by herobrine, rename the project from 'herobrine_npcx9' to 'herobrine'. BRANCH=None BUG=b:215771396 TEST=zmake configure -b herobrine Cq-Depend: chrome-internal:4546687 Change-Id: I206a65f253ce38d1b263a13df6ace90c90a0e450 Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3459518 Reviewed-by: Bob Moragues <moragues@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* gitlab: Extract twister coverage numberJeremy Bettis2022-02-081-0/+1
| | | | | | | | | | | | | | | | | Extract the coverage % from the lcov summary, so it shows up in the UI at https://gitlab.com/zephyr-ec/ec/-/jobs. BRANCH=None BUG=None TEST=None Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Id420e07b74ecbe646e79dbae4d53f01d2293e91e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3443646 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* zmake: Move project coverage to output dirJeremy Bettis2022-02-081-20/+20
| | | | | | | | | | | | | | | | | | | When you zmake configure --test you get coverage output in $build_dir/output/zephyr.info, but zmake configure --build didn't. Change the latter to match. Change CQ and gitlab builders to match this change. BRANCH=None BUG=b:156895937 TEST=Ran firmware_builder.py commands Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I38c71a6f711f05c89882084ac93fafdc1f8d0e9f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3436694 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
* gitlab: Remove hayato & delbin projectsJeremy Bettis2022-02-071-15/+0
| | | | | | | | | | | | | | | | | Clean up old unsupported Zephyr projects (asurada/hayato and volteer/delbin) BUG=b:217456313,b:217455790 TEST=zmake testall BRANCH=none Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: If08bb34ea48a246ea3f494b4cc4c0e237de3e11b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3442485 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
* gitlab: Generate html reports with branch coverageJeremy Bettis2022-01-191-2/+4
| | | | | | | | | | | | | | | | | Lcov was already being run with branch coverage, but include that in the html reports also. BRANCH=None BUG=None TEST=Ran commands locally Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ia64d120ec13ef7e741ba78bc6d05621f1b045215 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3399900 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Yuval Peress <peress@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* gitlab: Add npcx7/9_evb to build testWealian Liao2022-01-181-0/+10
| | | | | | | | | | | | | This adds npcx7/9_evb to the GitLab CI build test. BUG=none BRANCH=none TEST=run on gitlab server Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: I479293d7c77816a84cf2ef6d3e8dd36f41f010d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3392110 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
* zephyr: Add branch coverage to all lcov cmdsJeremy Bettis2022-01-141-10/+10
| | | | | | | | | | | | | | | | | | | If you don't include --rc lcov_branch_coverage=1 on every lcov command, lcov will drop the branch information at that stage of processing. Add --rc lcov_branch_coverage=1 to all lcov commands. BRANCH=None BUG=None TEST=None Change-Id: I3fd2a036f9f2fcfaeec60bdc55cfcba28e6c8228 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3381536 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Aaron Massey <aaronmassey@google.com> Commit-Queue: Aaron Massey <aaronmassey@google.com>
* gitlab: Add builds and coverage buildsJeremy Bettis2022-01-051-0/+30
| | | | | | | | | | | | | | | | | | | Add builds and coverage builds for kingler, krabby, and skyrim. BRANCH=None BUG=None TEST=for i in krabby kingler skyrim ; do \ zmake configure -b $i || echo FAIL; \ zmake configure -b --coverage $i || echo FAIL; done Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Iab404a9d7b5d63f5382bbc60608821ee5262e93f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3363948 Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* gitlab: Generate twister coverage report for boardJeremy Bettis2022-01-051-1/+11
| | | | | | | | | | | | | | | | | | Add commands to the coverage_template to merge and filter the twister coverage report with each board. BRANCH=None BUG=None TEST=Pushed to gitlab coverage branch Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: If58ffe10433c3f33618cdffd1b514ca0a514aa99 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3367176 Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* gitlab: Download twister coverage from codecov.ioJeremy Bettis2022-01-051-0/+25
| | | | | | | | | | | | | | | | | | | | | | Loop over the merged commits from the upstream zephyr repo until we find one that has a coverage report uploaded, and download that. The coverage won't totally match up with the code we have checked out, but it should be close, and this will save us many hours to re-run all the tests. BRANCH=None BUG=None TEST=Pushed manually to gitlab coverage branch Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I2d2c4462e94136ae5e521b1b212e914e7c302550 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3367175 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* zephyr: gitlab: Filter project specific codeYuval Peress2021-12-231-0/+1
| | | | | | | | | | | | | Project specific code can never be executed by our tests so filter it. BRANCH=none BUG=none TEST=Check the filter pattern added by manually running the command Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I31f54b8bd1aa2d5e95529e790ee5d781228ae40d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3352189 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: gitlab: Fix single quotesYuval Peress2021-12-231-2/+2
| | | | | | | | | | | | | | In gitlab, single quotes are strong and do not resolve the EC_DIR variable. BRANCH=none BUG=none TEST=none, verified by reading the gitlab docs Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I4d30b146e909a5d03267f49ddc9feb60cc88cefb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3352188 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* gitlab: Specify absolute paths to lcovJeremy Bettis2021-12-111-4/+4
| | | | | | | | | | | | | | | | | | lcov needs absolute paths, or */dir patterns. Change remove paths to be absolute. BRANCH=None BUG=None TEST=Ran commands by hand Change-Id: I4878fc429ff4dcd75684d51aa88971ed592c198f Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3330724 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Yuval Peress <peress@google.com> Commit-Queue: Yuval Peress <peress@google.com>
* zephyr: Cut over to the main branchJack Rosenthal2021-12-021-2/+2
| | | | | | | | | | | | | | | | | | | | Tell zmake to search for the checkout path of the main branch (see the dependencies) instead of the v2.7 checkout path. Update the GitLab configuration to download main instead of chromeos-v2.7. BUG=b:205884929 BRANCH=none TEST=zmake testall TEST=https://gitlab.com/zephyr-ec/ec/-/pipelines/420535963 Cq-Depend: chrome-internal:4299651 Change-Id: Ie7a2b7784606d0fc2455dab3c21ec3b49f073b06 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3310534 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: Change order of coverage mergesJeremy Bettis2021-12-011-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change `zmake configure --coverage --build` to only build the all.libraries target (instead of failing as it does now), and generate an lcov file. Change `zmake coverage` to skip non-test projects. It hasn't actually been useful to have a coverage report that includes all projects. Change .gitlab-ci.yml commands from build tests & boards coverage, merge, remove zephyr dirs, remove non-board files, generate report to build tests, merge, remove zephyr dirs, build board coverage, remove zephyr dirs, merge with tests, remove non-board files, generate report. This should increase coverage numbers, because we won't include #ifdefs that both the board and tests don't use, but other boards do use. This does not fix the problem of a test having an #ifdef that the board doesn't have, but those should be smaller, and easier to fix. Before: https://gitlab.com/zephyr-ec/ec/-/pipelines/420506965/builds After: https://gitlab.com/zephyr-ec/ec/-/pipelines/420547936/builds BRANCH=None BUG=b:207689703 TEST=Pushed to gitlab coverage branch Change-Id: Ifad0d098e5db9ef0ee55b760aaa7a8da9d006387 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3310533 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Tristan Honscheid <honscheid@google.com> Reviewed-by: Tristan Honscheid <honscheid@google.com>
* zephyr: gitlab: Filter chip/core specific code from coverageYuval Peress2021-11-301-0/+1
| | | | | | | | | | | | | | Since we're not running these in a QEMU we'll never be able to touch these files. BRANCH=none BUG=none TEST=Run zmake with coverage and manually run lcov with the filters Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I7815dfedafaaacad160408fec7618c89e457d280 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3291128 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: gitlab: Use glob pattery to filter zephyr/driversYuval Peress2021-11-301-1/+4
| | | | | | | | | | | | | | | | Looks like * in lcov isn't recusive. Use ** instead which does the job correctly. Also, include the matching include/ directory which I missed on the first pass. BRANCH=none BUG=none TEST=Run tests with coverage, then manually run lcov and verify that the directory was removed. Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I7eb58b0eff01ecd5ba9c4f5da18e947d3e41c489 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3291127 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: zmake: Drop support for per-project zephyr versioningJack Rosenthal2021-11-221-13/+10
| | | | | | | | | | | | | | | | | | | | | | | This drops all support for projects to specify which zephyr version they use. Zmake no longer cares what Zephyr version you give it: it will simply use whatever's passed for --zephyr-base and be happy with it. This intentionally hard-codes the checkout path to the v2.7 branch as the Zephyr version used to de-couple from the cutover to the main branch. The follow up CL actually switches to the main branch. (This is, more or less, just self-contained preparatory work in zmake for the transition to main.) BUG=b:205884929 BRANCH=none TEST=unit tests pass TEST=https://gitlab.com/zephyr-ec/ec/-/pipelines/412252730 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I9f8e28cec6466c666862c8f46f1608625a3ec53f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3296530 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* gitlab: Generate coverage report for hayatoJeremy Bettis2021-11-191-0/+5
| | | | | | | | | | | | | | | | Generate a coverage report for hayato also. BRANCH=None BUG=None TEST=None Change-Id: Ic789460166282f3ad631aa0091e81eddc84a08db Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3289292 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: gitlab: filter zephyr/drivers/** directoriesYuval Peress2021-11-181-1/+1
| | | | | | | | | | | | | | | | | Remove the drivers written under zephyr/drivers/ from the code coverage. These drivers are in the process of being migrated upstream and the tests will be done upstream as well. Additionally, adding emulators to support this in a host test will be too difficult since many dependencies in the Zephyr build are SOC and SOC_FAMILY dependent. BRANCH=none BUG=none TEST=none Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I27bcc31e5ee474aff2be050b8ef8289a1512b6cc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3288905 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: gitlab-ci: Build by project name, not directoryJack Rosenthal2021-11-171-14/+5
| | | | | | | | | | | | | | | Switch the GitLab CI runner to use project name, instead of manually specifying the directory. This is so that projects can specify more than one project per directory. BUG=b:193815337 BRANCH=none TEST=https://gitlab.com/zephyr-ec/ec/-/pipelines/410231302 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I7a32f3be069b388741ef65af2374a5dfae22e86b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3286371 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: Drop support for kohakuJack Rosenthal2021-11-101-5/+0
| | | | | | | | | | | | | | | | | | | | | | For context: this build was created so that we had a device that could be publicly purchased to play with Zephyr on in January 2021. With a little passage of time, we now have lazor, limozeen, and delbin as well. This build supports nothing other than power sequence to S0 (no keyboard, battery, charging, etc.) so sadly it's hardly usable for anything at the moment. Delete it so it does not create confusing directory structure for how we want variants to be created. BUG=b:193814903 BRANCH=none TEST=zmake testall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Ic0fa3099c19a484513b23c7826376604cf8d2f22 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3271872 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>