1*6777b538SAndroid Build Coastguard Worker // Copyright 2012 The Chromium Authors 2*6777b538SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be 3*6777b538SAndroid Build Coastguard Worker // found in the LICENSE file. 4*6777b538SAndroid Build Coastguard Worker 5*6777b538SAndroid Build Coastguard Worker #include "base/test/test_switches.h" 6*6777b538SAndroid Build Coastguard Worker 7*6777b538SAndroid Build Coastguard Worker #include "build/build_config.h" 8*6777b538SAndroid Build Coastguard Worker 9*6777b538SAndroid Build Coastguard Worker // Flag to show the help message. 10*6777b538SAndroid Build Coastguard Worker const char switches::kHelpFlag[] = "help"; 11*6777b538SAndroid Build Coastguard Worker 12*6777b538SAndroid Build Coastguard Worker const char switches::kIsolatedScriptTestLauncherRetryLimit[] = 13*6777b538SAndroid Build Coastguard Worker "isolated-script-test-launcher-retry-limit"; 14*6777b538SAndroid Build Coastguard Worker 15*6777b538SAndroid Build Coastguard Worker // Makes pixel tests overwrite their reference if the output and reference 16*6777b538SAndroid Build Coastguard Worker // don't match. 17*6777b538SAndroid Build Coastguard Worker const char switches::kRebaselinePixelTests[] = "rebaseline-pixel-tests"; 18*6777b538SAndroid Build Coastguard Worker 19*6777b538SAndroid Build Coastguard Worker // Flag to run all tests and the launcher in a single process. Useful for 20*6777b538SAndroid Build Coastguard Worker // debugging a specific test in a debugger. 21*6777b538SAndroid Build Coastguard Worker const char switches::kSingleProcessTests[] = "single-process-tests"; 22*6777b538SAndroid Build Coastguard Worker 23*6777b538SAndroid Build Coastguard Worker // Maximum number of tests to run in a single batch. 24*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherBatchLimit[] = "test-launcher-batch-limit"; 25*6777b538SAndroid Build Coastguard Worker 26*6777b538SAndroid Build Coastguard Worker // Sets defaults desirable for the continuous integration bots, e.g. parallel 27*6777b538SAndroid Build Coastguard Worker // test execution and test retries. 28*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherBotMode[] = 29*6777b538SAndroid Build Coastguard Worker "test-launcher-bot-mode"; 30*6777b538SAndroid Build Coastguard Worker 31*6777b538SAndroid Build Coastguard Worker // Makes it possible to debug the launcher itself. By default the launcher 32*6777b538SAndroid Build Coastguard Worker // automatically switches to single process mode when it detects presence 33*6777b538SAndroid Build Coastguard Worker // of debugger. 34*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherDebugLauncher[] = 35*6777b538SAndroid Build Coastguard Worker "test-launcher-debug-launcher"; 36*6777b538SAndroid Build Coastguard Worker 37*6777b538SAndroid Build Coastguard Worker // List of paths to files (separated by ';') containing test filters (one 38*6777b538SAndroid Build Coastguard Worker // pattern per line). 39*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherFilterFile[] = "test-launcher-filter-file"; 40*6777b538SAndroid Build Coastguard Worker 41*6777b538SAndroid Build Coastguard Worker // Force running the test cases listed in the positive filter file with full 42*6777b538SAndroid Build Coastguard Worker // name (not wildcard). If set, only exact positive filter from the filter 43*6777b538SAndroid Build Coastguard Worker // file is allowed. Passing --gtest_filter, positive wildcard filters, or 44*6777b538SAndroid Build Coastguard Worker // negative filters will fail the test launcher. 45*6777b538SAndroid Build Coastguard Worker // If any test case is disabled or deleted in source files, the test suite 46*6777b538SAndroid Build Coastguard Worker // fails. 47*6777b538SAndroid Build Coastguard Worker const char switches::kEnforceExactPositiveFilter[] = 48*6777b538SAndroid Build Coastguard Worker "enforce-exact-positive-filter"; 49*6777b538SAndroid Build Coastguard Worker 50*6777b538SAndroid Build Coastguard Worker // Force running all requested tests and retries even if too many test errors 51*6777b538SAndroid Build Coastguard Worker // occur. 52*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherForceRunBrokenTests[] = 53*6777b538SAndroid Build Coastguard Worker "test-launcher-force-run-broken-tests"; 54*6777b538SAndroid Build Coastguard Worker 55*6777b538SAndroid Build Coastguard Worker // Whether the test launcher should launch in "interactive mode", which disables 56*6777b538SAndroid Build Coastguard Worker // timeouts (and may have other effects for specific test types). 57*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherInteractive[] = "test-launcher-interactive"; 58*6777b538SAndroid Build Coastguard Worker 59*6777b538SAndroid Build Coastguard Worker // Number of parallel test launcher jobs. 60*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherJobs[] = "test-launcher-jobs"; 61*6777b538SAndroid Build Coastguard Worker 62*6777b538SAndroid Build Coastguard Worker // Path to list of compiled in tests. 63*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherListTests[] = "test-launcher-list-tests"; 64*6777b538SAndroid Build Coastguard Worker 65*6777b538SAndroid Build Coastguard Worker // Path to test results file in our custom test launcher format. 66*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherOutput[] = "test-launcher-output"; 67*6777b538SAndroid Build Coastguard Worker 68*6777b538SAndroid Build Coastguard Worker // Maximum output bytes allowed from a single test. Exceeding this limit 69*6777b538SAndroid Build Coastguard Worker // results in truncating the output and failing the test. 70*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherOutputBytesLimit[] = 71*6777b538SAndroid Build Coastguard Worker "test-launcher-output-bytes-limit"; 72*6777b538SAndroid Build Coastguard Worker 73*6777b538SAndroid Build Coastguard Worker // Causes the test launcher to print information about leaked files and/or 74*6777b538SAndroid Build Coastguard Worker // directories in child process's temporary directories. 75*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherPrintTempLeaks[] = 76*6777b538SAndroid Build Coastguard Worker "test-launcher-print-temp-leaks"; 77*6777b538SAndroid Build Coastguard Worker 78*6777b538SAndroid Build Coastguard Worker // Flag controlling when test stdio is displayed as part of the launcher's 79*6777b538SAndroid Build Coastguard Worker // standard output. 80*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherPrintTestStdio[] = 81*6777b538SAndroid Build Coastguard Worker "test-launcher-print-test-stdio"; 82*6777b538SAndroid Build Coastguard Worker 83*6777b538SAndroid Build Coastguard Worker // Print timestamps in test launcher. This is helpful for debugging test 84*6777b538SAndroid Build Coastguard Worker // slowness. Currently it prints out the following log: 85*6777b538SAndroid Build Coastguard Worker // * The time at the end of each test. 86*6777b538SAndroid Build Coastguard Worker // * The time while waiting for a test to run. 87*6777b538SAndroid Build Coastguard Worker // Using this flag helps you answer questions like "how long did it take 88*6777b538SAndroid Build Coastguard Worker // to run the first 10000 tests". 89*6777b538SAndroid Build Coastguard Worker // Please only keep this flag on builders temporarily because those logs 90*6777b538SAndroid Build Coastguard Worker // are a bit spammy. 91*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherPrintTimestamps[] = 92*6777b538SAndroid Build Coastguard Worker "test-launcher-print-timestamps"; 93*6777b538SAndroid Build Coastguard Worker 94*6777b538SAndroid Build Coastguard Worker // Print a writable path and exit (for internal use). 95*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherPrintWritablePath[] = 96*6777b538SAndroid Build Coastguard Worker "test-launcher-print-writable-path"; 97*6777b538SAndroid Build Coastguard Worker 98*6777b538SAndroid Build Coastguard Worker // Indicate how many retries are left. Tests in general should not pass in this 99*6777b538SAndroid Build Coastguard Worker // flag. This flag is used for launcher to pass retries-left information 100*6777b538SAndroid Build Coastguard Worker // to the runner process. 101*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherRetriesLeft[] = "test-launcher-retries-left"; 102*6777b538SAndroid Build Coastguard Worker 103*6777b538SAndroid Build Coastguard Worker // These two flags has the same effect, but don't use them at the same time. 104*6777b538SAndroid Build Coastguard Worker // And isolated-script-test-launcher-retry-limit is preferred in the future. 105*6777b538SAndroid Build Coastguard Worker // Maximum number of times to retry a test after failure. 106*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherRetryLimit[] = "test-launcher-retry-limit"; 107*6777b538SAndroid Build Coastguard Worker 108*6777b538SAndroid Build Coastguard Worker // Index of the test shard to run, starting from 0 (first shard) to total shards 109*6777b538SAndroid Build Coastguard Worker // minus one (last shard). 110*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherShardIndex[] = 111*6777b538SAndroid Build Coastguard Worker "test-launcher-shard-index"; 112*6777b538SAndroid Build Coastguard Worker 113*6777b538SAndroid Build Coastguard Worker // Path to test results file with all the info from the test launcher. 114*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherSummaryOutput[] = 115*6777b538SAndroid Build Coastguard Worker "test-launcher-summary-output"; 116*6777b538SAndroid Build Coastguard Worker 117*6777b538SAndroid Build Coastguard Worker // Limit of test part results in the output. Default limit is 10. 118*6777b538SAndroid Build Coastguard Worker // Negative value will completely disable limit. 119*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherTestPartResultsLimit[] = 120*6777b538SAndroid Build Coastguard Worker "test-launcher-test-part-results-limit"; 121*6777b538SAndroid Build Coastguard Worker 122*6777b538SAndroid Build Coastguard Worker // Total number of shards. Must be the same for all shards. 123*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherTotalShards[] = 124*6777b538SAndroid Build Coastguard Worker "test-launcher-total-shards"; 125*6777b538SAndroid Build Coastguard Worker 126*6777b538SAndroid Build Coastguard Worker // Time (in milliseconds) that the tests should wait before timing out. 127*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherTimeout[] = "test-launcher-timeout"; 128*6777b538SAndroid Build Coastguard Worker 129*6777b538SAndroid Build Coastguard Worker // Path where to save a trace of test launcher's execution. 130*6777b538SAndroid Build Coastguard Worker const char switches::kTestLauncherTrace[] = "test-launcher-trace"; 131*6777b538SAndroid Build Coastguard Worker 132*6777b538SAndroid Build Coastguard Worker // TODO(phajdan.jr): Clean up the switch names. 133*6777b538SAndroid Build Coastguard Worker const char switches::kTestTinyTimeout[] = "test-tiny-timeout"; 134*6777b538SAndroid Build Coastguard Worker const char switches::kUiTestActionMaxTimeout[] = "ui-test-action-max-timeout"; 135*6777b538SAndroid Build Coastguard Worker const char switches::kUiTestActionTimeout[] = "ui-test-action-timeout"; 136*6777b538SAndroid Build Coastguard Worker 137*6777b538SAndroid Build Coastguard Worker // Do not suppress stack traces in death tests. 138*6777b538SAndroid Build Coastguard Worker const char switches::kWithDeathTestStackTraces[] = 139*6777b538SAndroid Build Coastguard Worker "with-death-test-stack-traces"; 140*6777b538SAndroid Build Coastguard Worker 141*6777b538SAndroid Build Coastguard Worker #if BUILDFLAG(IS_IOS) 142*6777b538SAndroid Build Coastguard Worker // If enabled, runs unittests using the XCTest test runner. 143*6777b538SAndroid Build Coastguard Worker const char switches::kEnableRunIOSUnittestsWithXCTest[] = 144*6777b538SAndroid Build Coastguard Worker "enable-run-ios-unittests-with-xctest"; 145*6777b538SAndroid Build Coastguard Worker // Write a compiled test json file to a location where writable. 146*6777b538SAndroid Build Coastguard Worker const char switches::kWriteCompiledTestsJsonToWritablePath[] = 147*6777b538SAndroid Build Coastguard Worker "write-compiled-tests-json-to-writable-path"; 148*6777b538SAndroid Build Coastguard Worker #endif 149