From 48b10e5aa70faf620f15e7636f2560fe9400af77 Mon Sep 17 00:00:00 2001 From: Sean Klein Date: Wed, 15 Mar 2017 15:41:23 -0700 Subject: [PATCH] [docs] Clarify environment variable behavior in testing.md Change-Id: Ibf8d62a347364de32d95509b3e8c7fbe3f444021 --- docs/testing.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/docs/testing.md b/docs/testing.md index 302935800..a321ae927 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -24,9 +24,15 @@ These classes are the following: Since runtests doesn't really know what "class" is executing when it launches a test, it encodes this information in the environment variable -`RUNTESTS_TEST_CLASS`, which is detailed in -"system/ulib/unittest/include/unittest/unittest.h", and lets the executable -itself decide what to run / not run. +`RUNTESTS_TEST_CLASS`, which is detailed in [the unittest +header][unittest-header] , and lets the executable itself decide what to run / +not run. This environment variable is a bitmask indicating which tests to run. + +For example, if a a test executable is run with "small" and "medium" tests, +it will be executed ONCE with `RUNTESTS_TEST_CLASS` set to 00000003 (the +hex bitwise OR of "TEST_SMALL" and "TEST_MEDIUM" -- though this information +should be parsed using the [unittest header][unittest-header], as it may be +updated in the future). ## Magenta Tests (ulib/test, and/or using ulib/unittest) @@ -44,9 +50,9 @@ The legacy `RUN_TEST(widget_test)` is aliased to mean the same thing as ## Fuchsia Tests (not using ulib/unittest) The environment variable `RUNTESTS_TEST_CLASS` will still be available to all -executables launched by runtests. The "unittest/unittest.h" header can be used -to parse different categories of tests which the runtests harness attempted to -run. +executables launched by runtests. The [unittest header][unittest-header] can be +used to parse different categories of tests which the runtests harness attempted +to run. ## Runtests CLI @@ -54,3 +60,5 @@ By default, runtests will run both small and medium tests. To determine how to run a custom set of test categories, run `runtests -h`, which includes usage information. + +[unittest-header]: ../system/ulib/unittest/include/unittest/unittest.h "Unittest Header"