From 865fb8ff0da962ee7c1a77ee72a12fab2adf5fcb Mon Sep 17 00:00:00 2001 From: Fred Shih Date: Thu, 3 Feb 2022 03:54:19 +0000 Subject: [PATCH] Clarify running unit tests documentation Clarify that the test target must be built before attempting to run the unit tests themsleves. The previous instruction only followed the chrome build instructions. It was not immediately obvious that build chrome would not also generate the unit_tests binary. Change-Id: I2894d40926d6546a929ccfcdff4b08bc8f87f9f4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3428904 Reviewed-by: Roman Arora Commit-Queue: Fred Shih Cr-Commit-Position: refs/heads/main@{#966576} --- docs/linux/build_instructions.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/linux/build_instructions.md b/docs/linux/build_instructions.md index 98d3a1affe8ec4..62467ec2cdda98 100644 --- a/docs/linux/build_instructions.md +++ b/docs/linux/build_instructions.md @@ -268,8 +268,14 @@ $ out/Default/chrome ## Running test targets -You can run the tests in the same way. You can also limit which tests are -run using the `--gtest_filter` arg, e.g.: +First build the unit_tests binary by running the command: + +```shell +$ autoninja -C out/Default unit_tests +``` + +You can run the tests by running the unit_tests binary. You can also limit which +tests are run using the `--gtest_filter` arg, e.g.: ```shell $ out/Default/unit_tests --gtest_filter="PushClientTest.*"