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