mtr mysql-test-run.pl — Run MySQL Test Suite

The mysql-test-run.pl Perl script is the main application used to run the MySQL test suite.
pl Perl腳本是用來運(yùn)行MySQL測(cè)試套件的主要應(yīng)用程序。

It invokes mysqltest to run individual test cases.
它調(diào)用mysqltest來運(yùn)行單獨(dú)的測(cè)試用例年鸳。

Invoke mysql-test-run.pl in the mysql-test directory like this:
像這樣在mysql-test目錄下調(diào)用mysql-test-run.pl:

shell> mysql-test-run.pl [options] [test_name] ...

Each test_name argument names a test case. The test case file that corresponds to the test name is t/test_name.test.
每個(gè)test_name參數(shù)命名一個(gè)測(cè)試用例趴久。對(duì)應(yīng)測(cè)試名的測(cè)試用例文件是t/test_name.test。

For each test_name argument, mysql-test-run.pl runs the named test case. With no test_name arguments, mysql-test-run.pl runs all .test files in the t subdirectory.
對(duì)于每個(gè)test_name參數(shù)搔确,mysql-test-run.pl運(yùn)行指定的測(cè)試用例彼棍。如果沒有test_name參數(shù),mysql-test-run.pl將運(yùn)行t子目錄下的所有.test文件膳算。

If no suffix is given for the test name, a suffix of .test is assumed. Any leading path name is ignored. These commands are equivalent:
如果沒有為測(cè)試名指定后綴座硕,則假定后綴為.test。任何前導(dǎo)路徑名都會(huì)被忽略涕蜂。這些命令是等價(jià)的:

shell> mysql-test-run.pl mytest
shell> mysql-test-run.pl mytest.test
shell> mysql-test-run.pl t/mytest.test

A suite name can be given as part of the test name. That is, the syntax for naming a test is:
套件名可以作為測(cè)試名的一部分給出坎吻。也就是說,命名測(cè)試的語法是:

[suite_name.]test_name[.suffix]

If a suite name is given, mysql-test-run.pl looks in that suite for the test. The test file corresponding to a test named suite_name.test_name is found in suite/suite_name/t/test_name.test. There is also an implicit suite name main for the tests in the top t directory. With no suite name, mysql-test-run.pl looks in the default list of suites for a match and runs the test in any suites where it finds the test. Suppose that the default suite list is main, binlog, rpl, and that a test mytest.test exists in the main and rpl suites. With an argument of mytest or mytest.test, mysql-test-run.pl will run mytest.test from the main and rpl suites.
如果給出了套件名宇葱,mysql-test-run.pl將在該套件中查找測(cè)試。測(cè)試文件對(duì)應(yīng)于一個(gè)名為suite_name的測(cè)試刊头。Test_name在suite/suite_name/t/ Test_name .test中黍瞧。在top t目錄中還有一個(gè)用于測(cè)試的隱式套件名稱main。如果沒有套件名原杂,mysql-test-run.pl將在默認(rèn)套件列表中查找匹配印颤,并在找到測(cè)試的任何套件中運(yùn)行測(cè)試。假設(shè)默認(rèn)套件列表是main穿肄、binlog年局、rpl,測(cè)試是mytest咸产。測(cè)試存在于主套件和RPL套件中矢否。用mytest或mytest來辯論。測(cè)試脑溢,mysql-test-run.pl將運(yùn)行mytest僵朗。從主套件和RPL套件進(jìn)行測(cè)試。

To run a family of test cases for which the names share a common prefix, use the --do-test=prefix option. For example, --do-test=rpl runs the replication tests (test cases that have names beginning with rpl). --skip-test has the opposite effect of skipping test cases for which the names share a common prefix.
要運(yùn)行名稱共享一個(gè)公共前綴的一系列測(cè)試用例屑彻,請(qǐng)使用——do-test=prefix選項(xiàng)验庙。例如,——do-test=rpl運(yùn)行復(fù)制測(cè)試(名稱以rpl開頭的測(cè)試用例)社牲》嘌Γ——skip-test的效果與跳過名稱共享公共前綴的測(cè)試用例相反。

The argument for the --do-test and --skip-test options also allows more flexible specification of which tests to perform or skip. If the argument contains a pattern metacharacter other than a lone period, it is interpreted as a Perl regular expression and applies to test names that match the pattern. If the argument contains a lone period or does not contain any pattern metacharacters, it is interpreted the same way as previously and matches test names that begin with the argument value. For example, --do-test=testa matches tests that begin with testa, --do-test=main.testa matches tests in the main test suite that begin with testa, and --do-test=main.testa matches test names that contain main followed by testa with anything in between. In the latter case, the pattern match is not anchored to the beginning of the test name, so it also matches names such as xmainytesta.
——do-test和——skip-test選項(xiàng)的參數(shù)還允許更靈活地說明要執(zhí)行或跳過哪些測(cè)試搏恤。如果參數(shù)包含模式元字符而不是單個(gè)句點(diǎn)违寿,則將其解釋為Perl正則表達(dá)式湃交,并應(yīng)用于匹配該模式的測(cè)試名稱。如果參數(shù)包含一個(gè)單獨(dú)的句點(diǎn)或不包含任何模式元字符陨界,則它的解釋方式與前面相同巡揍,并匹配以參數(shù)值開頭的測(cè)試名稱。例如菌瘪,——do-test=testa匹配以testa開頭的測(cè)試腮敌,——do-test=main。Testa匹配主測(cè)試套件中以Testa開頭的測(cè)試俏扩,并且——do-test=main糜工。
testa匹配包含main后跟testa以及中間任何內(nèi)容的測(cè)試名。在后一種情況下录淡,模式匹配沒有固定在測(cè)試名的開頭捌木,因此它也匹配諸如xmainytesta之類的名稱。

It is also possible to put a list of test names in a file and have mysql-test-run.pl run those tests, using the option --do-test-list=file. The tests should be listed one per line in the file. A line beginning with # indicates a comment and is ignored. Similary an empty line in the file is also ignored.
也可以在文件中放入一個(gè)測(cè)試名稱列表嫉戚,并使用選項(xiàng)——do-test-list=file讓mysql-test-run.pl運(yùn)行這些測(cè)試刨裆。應(yīng)該在文件中每行列出一個(gè)測(cè)試。以#開頭的行表示注釋彬檀,將被忽略帆啃。類似地,文件中的空行也會(huì)被忽略窍帝。

mysql-test-run.pl also supports a --do-suite option, which is similar to --do-test but permits specifying entire suites of tests to run.
pl還支持——do-suite選項(xiàng)努潘,它類似于——do-test,但允許指定要運(yùn)行的測(cè)試的整個(gè)套件坤学。

To perform setup prior to running tests, mysql-test-run.pl needs to invoke mysqld with the --initialize and --skip-grant-tables options. If MySQL was built with the compiler flag -DDISABLE_GRANT_OPTIONS, then --initialize, --skip-grant-tables, and --init-file will be disabled. To handle this, set the MYSQLD_BOOTSTRAP environment variable to the full path name of a server that has all options enabled. mysql-test-run.pl will use that server to perform setup; it is not used to run the tests.
為了在運(yùn)行測(cè)試之前執(zhí)行設(shè)置疯坤,mysql-test-run.pl需要使用——initialize和——skip-grant-tables選項(xiàng)調(diào)用mysqld。如果MySQL是用編譯器標(biāo)志-DDISABLE_GRANT_OPTIONS構(gòu)建的深浮,那么——initialize压怠,——skip-grant-tables和——init-file將被禁用。要處理這個(gè)問題略号,可以將MYSQLD_BOOTSTRAP環(huán)境變量設(shè)置為啟用了所有選項(xiàng)的服務(wù)器的完整路徑名刑峡。Mysql-test-run.pl將使用該服務(wù)器執(zhí)行設(shè)置;它不用于運(yùn)行測(cè)試。

The init_file test will fail if --init-file is disabled. This is an expected failure in this case.
如果禁用——init-file, init_file測(cè)試將失敗玄柠。在這種情況下突梦,這是一個(gè)預(yù)期的失敗。

To run mysql-test-run.pl on Windows, you'll need either Cygwin or ActiveState Perl to run it. You may also need to install the modules required by the script. To run the test script, change location into the mysql-test directory, set the MTR_VS_CONFIG environment variable to the configuration you selected earlier (or use the --vs-config option), and invoke mysql-test-run.pl. For example (using Cygwin and the bash shell):
要在Windows上運(yùn)行mysql-test-run.pl羽利,您需要Cygwin或ActiveState Perl來運(yùn)行它宫患。您可能還需要安裝腳本所需的模塊。要運(yùn)行測(cè)試腳本这弧,將位置更改為mysql-test目錄娃闲,將MTR_VS_CONFIG環(huán)境變量設(shè)置為您之前選擇的配置(或者使用——vs-config選項(xiàng))虚汛,并調(diào)用mysql-test-run.pl模捂。例如(使用Cygwin和bash shell):

shell> cd mysql-test
shell> export MTR_VS_CONFIG=debug
shell> ./mysqltest-run.pl --force --timer
shell> ./mysqltest-run.pl --force --timer --ps-protocol

mysql-test-run.pl uses several environment variables. Some of them are listed in the following table. Some of these are set from the outside and used by mysql-test-run.pl, others are set by mysql-test-run.pl instead, and may be referred to in tests.
pl使用了幾個(gè)環(huán)境變量舅逸。下表列出了其中一些。其中一些是在外部設(shè)置的桶错,由mysql-test-run.pl使用属拾,其他則由mysql-test-run.pl設(shè)置将谊,可以在測(cè)試中引用。

Variable Description
EXE_MYSQL Path to the mysql client executable
MTR_BUILD_THREAD If set, defines which port number range is used for the server
MTR_MAX_PARALLEL If set, defines maximum number of parallel threads if --parallel=auto is given
MTR_MEM If set to anything, will run tests with files in "memory" using tmpfs or ramdisk. Not available on Windows. Same as --mem option
MTR_NAME_TIMEOUT Setting of a timeout in minutes or seconds, corresponding to command line option --name-timeout. Avaliable timeout names are TESTCASE, SUITE (both in minutes) and START, SHUTDOWN, CTEST (all in seconds). MTR_CTEST_TIMEOUT is for ctest unit tests.
MTR_PARALLEL If set, defines number of parallel threads executing tests. Same as --parallel option
MTR_PORT_BASE If set, defines which port number range is used for the server
MTR_RECORD Set to 1 if a MTR run is started with --record option, 0 otherwise.
MTR_UNIQUE_IDS_DIR The method in which the free ports are allocated is by maintaining a list under the unique ids directory. In case there are multiple chroot environments on the same host, then the same set of ports may get allocated for all environments, because there will be multiple unique ids directories in different physical locations, but MTR assumes it is the same directory. This will lead to a conflict while reserving ports for the different MTR runs. To avoid this problem, when using chroot environments, MTR_UNIQUE_IDS_DIR environment variable can be set to a common location, so that all the MTR processes will use the same unique ids directory. Users have to make sure this variable is set to the same path on all environments, and that this common path is mounted on all the environments.
MYSQL Full path to mysql client executable ,along with options passed to server.
MYSQL_BIN_PATH Path to the directory having mysql binaries.
MYSQL_CLIENT_BIN_PATH Path to the directory having client binaries.
MYSQL_CONFIG_EDITOR Path name to mysql_config_editor binary.
MYSQL_OPTIONS Options passed to server when connecting from mysql client.
MYSQL_TEST Path name to mysqltest binary
MYSQL_TEST_DIR Full path to the mysql-test directory where tests are being run from
MYSQL_TEST_LOGIN_FILE Path name to login file used by mysql_config_editor. If not set, the default is $HOME/.mylogin.cnf, or %APPDATA%\MySQL.mylogin.cnf on Windows.
MYSQL_TMP_DIR Path to temp directory used for temporary files during tests
MYSQLD Full path to server executable used in tests.
MYSQLD_BOOTSTRAP Full path name to mysqld that has all options enabled
MYSQLD_BOOTSTRAP_CMD Full command line used for initial database setup for this test batch
MYSQLD_CMD Command line for starting server as used in tests, with the minimum set of required arguments.
MYSQLTEST_VARDIR Path name to the var directory that is used for logs, temporary files, and so forth
NUMBER_OF_CPUS Defines number of processors.
TSAN_OPTIONS Path name to a file containing ThreadSanitizer suppressions.

The variable MTR_PORT_BASE is a more logical replacement for the original variable MTR_BUILD_THREAD. It gives the actual port number directly (will be rounded down to a multiple of 10). If you use MTR_BUILD_THREAD, the port number is found by multiplying this by 10 and adding 10000.
變量MTR_PORT_BASE是原始變量MTR_BUILD_THREAD的更合乎邏輯的替代渐白。它直接給出實(shí)際的端口號(hào)(將四舍五入到10的倍數(shù))尊浓。如果使用MTR_BUILD_THREAD,則通過將其乘以10并加上10000來找到端口號(hào)纯衍。

The variable MYSQL_OPTIONS contains only the options used while connecting to server from mysql client . whereas variableMYSQL contains path to mysql client executable along with options .
變量MYSQL_OPTIONS只包含從mysql客戶端連接到服務(wù)器時(shí)使用的選項(xiàng)栋齿。而變量MYSQL包含路徑MYSQL客戶端可執(zhí)行連同選項(xiàng)。

Tests sometimes rely on certain environment variables being defined. For example, certain tests assume that MYSQL_TEST is defined so that mysqltest can invoke itself with exec MYSQL_TEST. 測(cè)試有時(shí)依賴于定義的某些環(huán)境變量襟诸。例如瓦堵,某些測(cè)試假設(shè)MYSQL_TEST被定義,因此mysqltest可以通過execMYSQL_TEST調(diào)用自身歌亲。

Other tests may refer to the last three variables listed in the preceding table, to locate files to read or write. For example, tests that need to create files will typically put them in MYSQL_TMP_DIR/file_name. 其他測(cè)試可能引用上表中列出的最后三個(gè)變量谷丸,以定位要讀或?qū)懙奈募@缬幔枰獎(jiǎng)?chuàng)建文件的測(cè)試通常會(huì)將它們放在MYSQL_TMP_DIR/file_name中。

The variable MYSQLD_CMD will include any server options added with the --mysqld option to mysql-test-run.pl, but will not include server options added specifically for the currently running test. 變量MYSQLD_CMD將包括所有添加了——mysqld選項(xiàng)到mysql-test-run.pl的服務(wù)器選項(xiàng)泉唁,但不包括為當(dāng)前運(yùn)行的測(cè)試添加的服務(wù)器選項(xiàng)鹅龄。

mysql-test-run.pl supports the options in the following list. An argument of – tells mysql-test-run.pl not to process any following arguments as options.
mysql-test-run.pl 支持以下列表中的選項(xiàng)。參數(shù)-告訴mysql-test-run.pl不要將以下任何參數(shù)作為選項(xiàng)處理亭畜。

  • --help, -h

    Display a help message and exit.
    顯示幫助信息并退出扮休。

  • --big-test

    Allow tests marked as "big" to run. Tests can be thus marked by including the line --source include/big_test.inc, and they will only be run if this option is given, or if the environment variable BIG_TEST is set to 1.
    允許運(yùn)行標(biāo)記為“大”的測(cè)試。因此拴鸵,可以通過包含一行——source include/big_test來標(biāo)記測(cè)試玷坠。只有當(dāng)給出了這個(gè)選項(xiàng),或者環(huán)境變量BIG_TEST被設(shè)置為1時(shí)劲藐,它們才會(huì)運(yùn)行八堡。

    This is typically done for tests that take very long to run, or that use very much resources, so that they are not suitable for running as part of a normal test suite run.
    這通常用于運(yùn)行時(shí)間很長(zhǎng)或使用大量資源的測(cè)試,因此它們不適合作為普通測(cè)試套件運(yùn)行的一部分運(yùn)行聘芜。

    If both --big-test and --only-big-tests are given, --only-big-tests is ignored.
    如果兩者都有——大的考試和——只有大的考試兄渺,——只有大的考試被忽略。

    Note

    • This option is enabled by default when test cases are specified on command line.
      當(dāng)測(cè)試用例在命令行上指定時(shí)汰现,這個(gè)選項(xiàng)默認(rèn)啟用挂谍。
  • --boot-dbx

    Run the mysqld server used for bootstrapping the database through the dbx debugger.
    運(yùn)行mysqld服務(wù)器叔壤,通過dbx調(diào)試器引導(dǎo)數(shù)據(jù)庫。

  • --boot-ddd

    Run the mysqld server used for bootstrapping the database through the ddd debugger.
    運(yùn)行mysqld服務(wù)器口叙,通過ddd調(diào)試器引導(dǎo)數(shù)據(jù)庫炼绘。

  • --boot-gdb

    Run the mysqld server used for bootstrapping the database through the gdb debugger.
    運(yùn)行mysqld服務(wù)器,通過gdb調(diào)試器引導(dǎo)數(shù)據(jù)庫妄田。

    See also the --manual-boot-gdb option.
    另請(qǐng)參閱——manual-boot-gdb選項(xiàng)俺亮。

  • --build-thread=number

    Specify a number to calculate port numbers from. The formula is 10 * build_thread + 10000. Instead of a number, it can be set to auto, which is also the default value, in which case mysql-test-run.pl will allocate a number unique to this host.
    指定一個(gè)數(shù)字來計(jì)算端口號(hào)。公式是10 * build_thread + 10000形庭。它可以被設(shè)置為auto铅辞,而不是一個(gè)數(shù)字,這也是默認(rèn)值萨醒,在這種情況下斟珊,mysql-test-run.pl將為這個(gè)主機(jī)分配一個(gè)唯一的數(shù)字。

    The value (number or auto) can also be set with the MTR_BUILD_THREAD environment variable.
    這個(gè)值(number或auto)也可以用MTR_BUILD_THREAD環(huán)境變量來設(shè)置富纸。

    This option is kept for backward compatibility. The more logical --port-base is recommended instead.
    保留這個(gè)選項(xiàng)是為了向后兼容囤踩。相反,建議使用更符合邏輯的——port-base晓褪。

  • --callgrind

    Instructs valgrind to use callgrind.
    指導(dǎo)valgrind使用callgrind堵漱。

  • --charset-for-testdb=charset_name

    Specify the default character set for the test database. The default value is latin1.
    為測(cè)試數(shù)據(jù)庫指定默認(rèn)字符集。默認(rèn)值為latin1涣仿。

  • --check-testcases

    Check test cases for side effects. This is done by checking the system state before and after each test case. If there is any difference, the test case is marked as failed because of it.
    檢查測(cè)試用例的副作用勤庐。這是通過在每個(gè)測(cè)試用例前后檢查系統(tǒng)狀態(tài)來完成的。如果存在任何差異好港,測(cè)試用例就會(huì)因此被標(biāo)記為失敗愉镰。

    Similarly, when --check-testcases option is enabled, MTR does additional check for missing .result file and a test case not having its corresponding .result file is marked as failed.
    類似地,當(dāng)啟用——check-testcases選項(xiàng)時(shí)钧汹,MTR會(huì)對(duì)缺少的.result文件進(jìn)行額外的檢查丈探,并且沒有相應(yīng)的.result文件的測(cè)試用例會(huì)被標(biāo)記為失敗。

    This check is enabled by default. To disable it, use the --nocheck-testcases option.
    這個(gè)檢查是默認(rèn)啟用的拔莱。要禁用它碗降,可以使用——nocheck-testcases選項(xiàng)。

  • --clean-vardir

    Clean up the var directory with logs and test results etc. after the test run, but only if there were no test failures. This option only has effect if also running with option --mem. The intent is to alleviate the problem of using up memory for test results, in cases where many different test runs are being done on the same host.
    在測(cè)試運(yùn)行后清理var目錄塘秦,包括日志和測(cè)試結(jié)果等讼渊,但只有在沒有測(cè)試失敗的情況下。此選項(xiàng)僅在與選項(xiàng)——mem一起運(yùn)行時(shí)有效尊剔。這樣做的目的是在同一臺(tái)主機(jī)上運(yùn)行多個(gè)不同的測(cè)試時(shí)精偿,緩解測(cè)試結(jié)果內(nèi)存耗盡的問題。

  • --client-bindir=path

    The path to the directory where client binaries are located.
    客戶端二進(jìn)制文件所在目錄的路徑。

  • --client-dbx

    Start mysqltest in the dbx debugger.
    在dbx調(diào)試器中啟動(dòng)mysqltest笔咽。

  • --client-ddd

    Start mysqltest in the ddd debugger.
    在ddd調(diào)試器中啟動(dòng)mysqltest搔预。

  • --client-debugger=debugger

    Start mysqltest in the named debugger.
    在命名調(diào)試器中啟動(dòng)mysqltest。

  • --client-gdb

    Start mysqltest in the gdb debugger.
    在gdb調(diào)試器中啟動(dòng)mysqltest叶组。

  • --client-libdir=path

    The path to the directory where client libraries are located.
    客戶端庫所在目錄的路徑拯田。

  • --colored-diff

    Colorize the diff part of the output.
    對(duì)輸出的差值部分著色。

    When this option is enabled, mysql-test-run.pl passes --colored-diff option to mysqltest. If colored diff is enabled, mysqltest uses diff command with --color='always' option to print the colored diff.
    當(dāng)這個(gè)選項(xiàng)被啟用時(shí)甩十,mysql-test-run.pl將——colored-diff選項(xiàng)傳遞給mysqltest船庇。如果有色的差異被啟用,mysqltest使用diff命令和——color='always'選項(xiàng)來打印有色的差異侣监。

    Note

    • --color option for diff command is available from GNU diffutils version 3.4.
      diff命令的——color選項(xiàng)在GNU diffutils 3.4版本中可用鸭轮。
  • --combination=value

    Extra option to pass to mysqld. The value should consist of a single mysqld option including dashes. This option is similar to --mysqld but has a different effect. mysql-test-run.pl executes multiple test runs, using the options for each instance of --combination in successive runs. If --combination is given only once, it has no effect and behaves similar to --mysqld option.
    傳遞給mysqld的額外選項(xiàng)。該值應(yīng)該包含一個(gè)mysqld選項(xiàng)橄霉,包括破折號(hào)窃爷。這個(gè)選項(xiàng)類似于——mysqld,但是有不同的效果姓蜂。Mysql-test-run.pl執(zhí)行多個(gè)測(cè)試運(yùn)行按厘,在連續(xù)運(yùn)行中使用每個(gè)——combination實(shí)例的選項(xiàng)。如果——combination只給出一次钱慢,它沒有效果逮京,行為類似于——mysqld選項(xiàng)。

    If a test being run, passes the same --mysqld option from an opt file which is also passed from --combination, then that --combination run is skipped because opt file always takes higher precedence over command line options. The test will just run once using the options provided in the opt file.
    如果正在運(yùn)行一個(gè)測(cè)試束莫,從一個(gè)opt文件中傳遞同樣的——mysqld選項(xiàng)懒棉,這個(gè)選項(xiàng)也從——combination中傳遞,那么——combination運(yùn)行將被跳過览绿,因?yàn)閛pt文件總是比命令行選項(xiàng)具有更高的優(yōu)先級(jí)漓藕。使用opt文件中提供的選項(xiàng),測(cè)試只運(yùn)行一次挟裂。

    For test runs specific to a given test suite, an alternative to the use of --combination is to create a combinations file in the suite directory. The file should contain a section of options for each test run. See Passing Options from mysql-test-run.pl to mysqld or mysqltest.
    對(duì)于特定于給定測(cè)試套件的測(cè)試運(yùn)行,使用——combination的另一種方法是在套件目錄中創(chuàng)建一個(gè)組合文件揍诽。該文件應(yīng)該包含每個(gè)測(cè)試運(yùn)行的選項(xiàng)部分诀蓉。請(qǐng)參閱將選項(xiàng)從mysql-test-run.pl傳遞給mysqld或mysqltest。

    For test specific combinations, onc can use test_name.combinations file in the test directory.
    對(duì)于特定于測(cè)試的組合暑脆,onc可以使用test目錄下的test_name.combination文件渠啤。

  • --comment=str

    Write str to the output within lines filled with #, as a form of banner.
    在填充#的行中將str寫入輸出,作為橫幅的一種形式添吗。

  • --compress

    Compress all information sent between the client and the server if both support compression.
    壓縮客戶端和服務(wù)器之間發(fā)送的所有信息沥曹,如果兩者都支持壓縮。

  • --cursor-protocol

    Pass the --cursor-protocol option to mysqltest (implies --ps-protocol).
    將——cursor-protocol選項(xiàng)傳遞給mysqltest(暗示——ps-protocol)。

  • --dbx

    Start mysqld in the dbx debugger.
    在dbx調(diào)試器中啟動(dòng)mysqld妓美。

  • --ddd

    Start mysqld in the ddd debugger.
    在ddd調(diào)試器中啟動(dòng)mysqld僵腺。

  • --debug

    Dump trace output for all clients and servers.
    轉(zhuǎn)儲(chǔ)所有客戶機(jī)和服務(wù)器的跟蹤輸出。

  • --debugger=debugger

    Start mysqld using the named debugger.
    使用命名調(diào)試器啟動(dòng)mysqld壶栋。

  • --debug-common

    This option works similar to --debug but turns on debug only for the debug macro keywords query, info, error, enter, exit which are considered the most commonly used.
    該選項(xiàng)的工作方式類似于——debug辰如,但只對(duì)調(diào)試宏關(guān)鍵字query, info, error, enter, exit打開調(diào)試,這些關(guān)鍵字被認(rèn)為是最常用的贵试。

  • --debug-server

    Runs mysqld.debug (if available) instead of mysqld as server. If it does find mysqld.debug, it will search for plugin libraries in a subdirectory debug under the directory where it's normally located. This option does not turn on trace output and is independent of the debug option.
    運(yùn)行mysqld.debug(如果可用)而不是mysqld作為服務(wù)器琉兜。如果它找到了mysqld.debug,它將在它通常所在目錄下的子目錄debug中搜索插件庫毙玻。此選項(xiàng)不會(huì)打開跟蹤輸出豌蟋,并且獨(dú)立于調(diào)試選項(xiàng)。

  • --debug-sync-timeout=seconds

    Controls whether the Debug Sync facility for testing and debugging is enabled. The option value is a timeout in seconds. The default value is 300. A value of 0 disables Debug Sync. The value of this option also becomes the default timeout for individual synchronization points.
    控制是否啟用用于測(cè)試和調(diào)試的“調(diào)試同步”功能桑滩。選項(xiàng)值為超時(shí)時(shí)間梧疲,單位為秒。缺省值是300施符。值0禁用調(diào)試同步往声。這個(gè)選項(xiàng)的值也會(huì)成為各個(gè)同步點(diǎn)的默認(rèn)超時(shí)。

    mysql-test-run.pl passes --loose-debug-sync-timeout=seconds to mysqld. The --loose prefix is used so that mysqld does not fail if Debug Sync is not compiled in.
    Mysql-test-run.pl傳遞——loose-debug-sync-timeout=seconds給mysqld戳吝。使用——loose前綴浩销,這樣mysqld在沒有編譯調(diào)試同步時(shí)也不會(huì)失敗。

    For information about using the Debug Sync facility for testing, see Thread Synchronization in Test Cases.
    有關(guān)使用調(diào)試同步工具進(jìn)行測(cè)試的信息听哭,請(qǐng)參見測(cè)試用例中的線程同步慢洋。

  • ---default-myisam

    Use MyISAM as the default storage engine for all except InnoDB-specific tests. This option is off by default.
    除了innodb特定的測(cè)試,所有測(cè)試都使用MyISAM作為默認(rèn)存儲(chǔ)引擎陆盘。這個(gè)選項(xiàng)默認(rèn)是關(guān)閉的普筹。

  • --defaults-file=file_name

    Use the named file as fixed config file template for all tests.
    使用命名文件作為所有測(cè)試的固定配置文件模板。

  • --defaults_extra_file=file_name

    Add setting from the named file to all generated configs.
    將命名文件中的設(shè)置添加到所有生成的配置隘马。

  • --do-suite=prefix or regex

    Run all test cases from suites having a name that begins with the given prefix value or matches the regular expression. If the argument matches no existing suite, mysql-test-run.pl aborts.
    運(yùn)行名稱以給定前綴值開頭或匹配正則表達(dá)式的套件中的所有測(cè)試用例太防。如果參數(shù)不匹配現(xiàn)有套件,mysql-test-run.pl將終止酸员。

    The argument for the --do-suite option allows more flexible specification of which tests to perform. See the description of the --do-test option for details.
    do-suite選項(xiàng)允許更靈活地說明要執(zhí)行哪些測(cè)試蜒车。詳細(xì)信息請(qǐng)參見——do-test選項(xiàng)的描述。

    In case a suite or a list of suites is specified using the --suite option along with a pattern or regular expression given through --do-suite, only suite(s) from the list which match the prefix or regular expression are picked up.
    如果使用——suite選項(xiàng)指定套件或套件列表幔嗦,以及通過——do-suite給出的模式或正則表達(dá)式酿愧,則只從列表中選取匹配前綴或正則表達(dá)式的套件。

    When the --do-suite option is specified more than once on the command line, only the last occurrence is considered.
    當(dāng)在命令行上不止一次地指定——do-suite選項(xiàng)時(shí)邀泉,只考慮最后一次出現(xiàn)嬉挡。

  • --do-test=prefix or regex

    Run all test cases having a name that begins with the given prefix value or matches the regular expression. This option provides a convenient way to run a family of similarly named tests.
    運(yùn)行名稱以給定的前綴值開頭或匹配正則表達(dá)式的所有測(cè)試用例钝鸽。此選項(xiàng)提供了一種方便的方式來運(yùn)行一系列命名類似的測(cè)試。

    The argument for the --do-test option allows more flexible specification of which tests to perform. If the argument contains a pattern metacharacter other than a lone period, it is interpreted as a Perl regular expression and applies to test names that match the pattern. If the argument contains a lone period or does not contain any pattern metacharacters, it is interpreted the same way as previously and matches test names that begin with the argument value. For example, --do-test=testa matches tests that begin with testa, --do-test=main.testa matches tests in the main test suite that begin with testa, and --do-test=main.testa matches test names that contain main followed by testa with anything in between. In the latter case, the pattern match is not anchored to the beginning of the test name, so it also matches names such as xmainytestz.
    do-test選項(xiàng)允許更靈活地說明要執(zhí)行哪些測(cè)試庞钢。如果參數(shù)包含模式元字符而不是單個(gè)句點(diǎn)拔恰,則將其解釋為Perl正則表達(dá)式,并應(yīng)用于匹配該模式的測(cè)試名稱焊夸。如果參數(shù)包含一個(gè)單獨(dú)的句點(diǎn)或不包含任何模式元字符仁连,則它的解釋方式與前面相同,并匹配以參數(shù)值開頭的測(cè)試名稱阱穗。例如饭冬,——do-test=testa匹配以testa開頭的測(cè)試,——do-test=main揪阶。Testa匹配主測(cè)試套件中以Testa開頭的測(cè)試昌抠,并且——do-test=main。
    testa匹配包含main后跟testa以及中間任何內(nèi)容的測(cè)試名鲁僚。在后一種情況下炊苫,模式匹配沒有固定在測(cè)試名稱的開頭,因此它也匹配諸如xmainytestz之類的名稱冰沙。

  • --do-test-list=file

    Run all tests listed in the file file. In this file, tests should be listed one per line in any of the following forms.
    運(yùn)行文件文件中列出的所有測(cè)試侨艾。在這個(gè)文件中,測(cè)試應(yīng)該以下列任何一種形式每行列出一個(gè)拓挥。

    <test_name>
    <test_name>.test
    <suite_name>.<test_name>
    <suite_name>.<test_name>.test
    path_to_the_test_file
    

    Path to the test file should either be an absolute path or a relative path from base directory.
    測(cè)試文件的路徑應(yīng)該是一個(gè)絕對(duì)路徑或一個(gè)相對(duì)路徑從基本目錄唠梨。

    To run a test present in a non-default test suite, either the test name qualified with the suite name i.e suite_name.test_name[.test] or a path to the test file should be mentioned.
    要運(yùn)行一個(gè)存在于非默認(rèn)測(cè)試套件中的測(cè)試,可以使用套件名限定測(cè)試名侥啤,例如suite_name.test_name[当叭。Test]或測(cè)試文件的路徑應(yīng)該被提及。

    A line beginning with # will be ignored and is considered as a comment. Similarly an empty line in the file is also ignored.
    以#開頭的行將被忽略盖灸,并被視為注釋蚁鳖。類似地,文件中的空行也會(huì)被忽略赁炎。

    For example, consider a test list file test_list containing following tests.
    例如醉箕,考慮一個(gè)包含以下測(cè)試的測(cè)試列表文件test_list。

    # Main suite test '1st.test'
    1st
    1st.test
    main.1st
    main.1st.test
    mysql-test/t/1st.test
    
    # GIS suite test 'geohash_functions.test'
    gis.geohash_functions
    mysql-test/suite/gis/t/geohash_functions.test
    
    # Non-default suite 'test_services'
    test_services.test_services
    mysql-test/suite/test_services/t/test_services.test
    
    # Internal suite test 'i_main.user_var'
    i_main.user_var
    internal/mysql-test/suite/i_main/t/user_var.test
    

    Following command runs the list of tests mentioned in the file.
    下面的命令運(yùn)行文件中提到的測(cè)試列表徙垫。

    ./mysql-test-run.pl --do-test-list=test_list
    

    If both --suite and --do-test-list are given, and if suite name is not part of the test names listed in the file, then those tests are searched only in the suites mentioned in --suite option.
    如果同時(shí)給出了——suite和——do-test-list讥裤,并且套件名稱不是文件中列出的測(cè)試名稱的一部分,則只在——suite選項(xiàng)中提到的套件中搜索這些測(cè)試松邪。

  • --enable-disabled

    Ignore any disabled.def file, and run also tests marked as disbaled. Success or failure of those tests will be reported the same way as other tests.
    忽略任何disabled.def文件,并運(yùn)行標(biāo)記為disabled的測(cè)試哨查。這些測(cè)試的成功或失敗將以與其他測(cè)試相同的方式報(bào)告逗抑。

    Note

    • This option is enabled by default when test cases are specified on command line.
      當(dāng)測(cè)試用例在命令行上指定時(shí),這個(gè)選項(xiàng)默認(rèn)啟用。
  • --explain-protocol

    Run EXPLAIN EXTENDED on all SELECT, INSERT, REPLACE, UPDATE and DELETE queries.
    在所有的SELECT邮府、INSERT荧关、REPLACE、UPDATE和DELETE查詢上運(yùn)行EXPLAIN extension褂傀。

  • --extern option=value

    Use an already running server. The option/value pair is what is needed by the mysql client to connect to the server. Each --extern can only take one option/value pair as argument, so it you need more you need to repeat --extern for each of them.
    使用已經(jīng)在運(yùn)行的服務(wù)器忍啤。選項(xiàng)/值對(duì)是mysql客戶端連接到服務(wù)器所需要的。每個(gè)——extern只能接受一個(gè)選項(xiàng)/值對(duì)作為參數(shù)仙辟,所以你需要對(duì)每個(gè)變量重復(fù)——extern同波。

    ./mysql-test-run.pl --extern socket=var/tmp/mysqld.1.sock main.1st
    

    During server initialization, mysql-test-run.pl creates a default database test which is used while establishing an initial connection with the server. When running a test case with –extern option, if test database doesn't exist on an already running server, then the test case will fail with following error.
    在服務(wù)器初始化期間,mysql-test-run.pl創(chuàng)建一個(gè)默認(rèn)數(shù)據(jù)庫test叠国,在與服務(wù)器建立初始連接時(shí)使用該數(shù)據(jù)庫未檩。當(dāng)使用-extern選項(xiàng)運(yùn)行測(cè)試用例時(shí),如果已經(jīng)運(yùn)行的服務(wù)器上不存在測(cè)試數(shù)據(jù)庫粟焊,則測(cè)試用例將失敗冤狡,并出現(xiàn)以下錯(cuò)誤。

    mysqltest: Could not open connection 'default': 1049 Unknown database 'test'
    

    So if you're running a test case on an already running server using –extern option, it is necessary to create test database on the server before running the test case if it doesn't exist.
    因此项棠,如果您使用-extern選項(xiàng)在已經(jīng)運(yùn)行的服務(wù)器上運(yùn)行測(cè)試用例悲雳,如果測(cè)試用例不存在,則有必要在運(yùn)行測(cè)試用例之前在服務(wù)器上創(chuàng)建測(cè)試數(shù)據(jù)庫香追。

    Similarly, mysql-test-run.pl creates mtr database during server initialization which contains tables and procedures used to suppress global or test specific warnings. If a test case refers to this database and the database doesn't exist on running server, then the test case will fail.
    類似地合瓢,mysql-test-run.pl在服務(wù)器初始化期間創(chuàng)建mtr數(shù)據(jù)庫,其中包含用于抑制全局或測(cè)試特定警告的表和過程翅阵。如果測(cè)試用例引用了這個(gè)數(shù)據(jù)庫歪玲,并且運(yùn)行的服務(wù)器上不存在這個(gè)數(shù)據(jù)庫,那么測(cè)試用例將失敗掷匠。

    Note

    • If a test case has an .opt file that requires the server to be restarted with specific options, the file will not be used. The test case likely will fail as a result.
      如果測(cè)試用例有一個(gè).opt文件滥崩,要求服務(wù)器使用特定選項(xiàng)重新啟動(dòng),則不會(huì)使用該文件讹语。因此钙皮,測(cè)試用例可能會(huì)失敗。
  • --fast

    Do not perform controlled shutdown when servers need to be restarted or at the end of the test run. This is equivalent to using --shutdown-timeout=0.
    當(dāng)服務(wù)器需要重新啟動(dòng)或在測(cè)試運(yùn)行結(jié)束時(shí)顽决,不要執(zhí)行受控關(guān)機(jī)短条。這相當(dāng)于使用——shutdown-timeout=0。

  • --force

    Normally, mysql-test-run.pl exits if a test case fails. --force causes execution to continue regardless of test case failure.
    通常才菠,如果測(cè)試用例失敗茸时,mysql-test-run.pl將退出「撤茫——force導(dǎo)致執(zhí)行繼續(xù)可都,不管測(cè)試用例失敗缓待。

  • --force-restart

    Always restart the server(s) between each tast case, whether it's needed or not. Will also restart between repeated runs of the same test case. This may be useful e.g. when looking for the source of a memory leak, as there will only have been one test run before the server exits.
    無論是否需要,總是在每個(gè)測(cè)試案例之間重新啟動(dòng)服務(wù)器渠牲。也將在相同測(cè)試用例的重復(fù)運(yùn)行之間重新啟動(dòng)旋炒。這可能很有用,例如签杈,當(dāng)尋找內(nèi)存泄漏的來源時(shí)瘫镇,因?yàn)樵诜?wù)器退出前只會(huì)運(yùn)行一次測(cè)試。

    Enabling this option will cause mysql-test-run.pl to restart the server(s) on a newly intialized data directory.
    啟用這個(gè)選項(xiàng)將導(dǎo)致mysql-test-run.pl在一個(gè)新初始化的數(shù)據(jù)目錄上重新啟動(dòng)服務(wù)器答姥。

    This option can also be mentioned in test-name-master.opt file for a test case to restart the server(s) before it runs.
    這個(gè)選項(xiàng)也可以在test-name-master中提到铣除。為測(cè)試用例選擇文件,以便在運(yùn)行之前重新啟動(dòng)服務(wù)器踢涌。

  • --gcov

    Run tests with the gcov test coverage tool.
    使用gcov測(cè)試覆蓋率工具運(yùn)行測(cè)試通孽。

  • --gdb

    Start mysqld in the gdb debugger.
    在gdb調(diào)試器中啟動(dòng)mysqld。

  • --gprof

    Run tests with the gprof profiling tool.
    使用gprof分析工具運(yùn)行測(cè)試睁壁。

  • --include-ndbcluster, --include-ndb

    Run also tests that need Cluster.
    還運(yùn)行需要Cluster的測(cè)試背苦。

  • --initialize=value

    Extra bootstrap options that need be to be passed during the server initialization process can be passed as a value to --initialize. The server is then started with the specified value. Only one option may be specified in value; to specify more than one, use additional --initialize options.
    在服務(wù)器初始化過程中需要傳遞的額外引導(dǎo)選項(xiàng)可以作為一個(gè)值傳遞給——initialize。然后使用指定的值啟動(dòng)服務(wù)器潘明。只能在value中指定一個(gè)選項(xiàng);要指定多個(gè)行剂,請(qǐng)使用附加的——initialize選項(xiàng)。

    Options passed as a value to --mysqld will have precedence over the options passed to --initialize, regardless of the order in which they passed on the command line.
    作為值傳遞給——mysqld的選項(xiàng)將優(yōu)先于傳遞給——initialize的選項(xiàng)钳降,不管它們?cè)诿钚猩蟼鬟f的順序如何厚宰。

  • --json-explain-protocol

    Run EXPLAIN FORMAT=JSON on all SELECT, INSERT, REPLACE, UPDATE and DELETE queries.
    對(duì)所有SELECT、INSERT遂填、REPLACE铲觉、UPDATE和DELETE查詢執(zhí)行EXPLAIN FORMAT=JSON。

  • --manual-boot-gdb

    This option is similar to --boot-gdb but attaches the debugger to the server during the bootstrapping process, permitting the use of a remote debugger.
    該選項(xiàng)類似于——boot-gdb吓坚,但在引導(dǎo)過程中將調(diào)試器附加到服務(wù)器撵幽,允許使用遠(yuǎn)程調(diào)試器。

  • --manual-dbx

    Use a server that has already been started by the user in the dbx debugger.
    使用一個(gè)用戶已經(jīng)在dbx調(diào)試器中啟動(dòng)的服務(wù)器礁击。

  • --manual-ddd

    Use a server that has already been started by the user in the ddd debugger.
    在ddd調(diào)試器中使用用戶已經(jīng)啟動(dòng)的服務(wù)器盐杂。

  • --manual-debug

    Use a server that has already been started by the user in a debugger.
    在調(diào)試器中使用用戶已經(jīng)啟動(dòng)的服務(wù)器。

  • --manual-gdb

    Use a server that has already been started by the user in the gdb debugger.
    使用用戶已經(jīng)在gdb調(diào)試器中啟動(dòng)的服務(wù)器哆窿。

  • --mark-progress

    Marks progress with timing (in milliseconds) and line number in var/log/testname.progress.
    在var/log/testname.progress中使用計(jì)時(shí)(毫秒)和行號(hào)標(biāo)記進(jìn)度链烈。

  • --max-connections=num

    The maximum number of simultaneous server connections that may be used per test. If not set, the maximum is 128. Minimum allowed limit is 8, maximum is 5120. Corresponds to the same option for mysqltest.
    每次測(cè)試可同時(shí)使用的最大服務(wù)器連接數(shù)。如果未設(shè)置挚躯,則最大為128强衡。最小允許的數(shù)量是8,最大是5120码荔。對(duì)應(yīng)于mysqltest的相同選項(xiàng)漩勤。

  • --max-save-core=N

    Limit the number of core files saved, to avoid filling up disks in case of a frequently crashing server. Defaults to 5, set to 0 for no limit. May also be set with the environment variable MTR_MAX_SAVE_CORE.
    限制保存的核心文件的數(shù)量号涯,避免在服務(wù)器頻繁崩潰的情況下填滿磁盤。默認(rèn)為5锯七,設(shè)置為0表示無限制。也可以使用環(huán)境變量MTR_MAX_SAVE_CORE進(jìn)行設(shè)置誉己。

  • --max-save-datadir=N

    Limit the number of data directories saved after failed tests, to avoid filling up disks in case of frequent failures. Defaults to 20, set to 0 for no limit. May also be set with the environment variable MTR_MAX_SAVE_DATADIR.
    限制測(cè)試失敗后保存的數(shù)據(jù)目錄數(shù)量眉尸,避免頻繁失敗時(shí)磁盤被填滿。默認(rèn)值為20巨双,設(shè)置為0表示無限制噪猾。也可以使用環(huán)境變量MTR_MAX_SAVE_DATADIR進(jìn)行設(shè)置。

  • --max-test-fail=N

    Stop execution after the specified number of tests have failed, to avoid using up resources (and time) in case of massive failures. retries are noe counted. Defaults to 10, set to 0 for no limit. May also be set with the environment variable MTR_MAX_TEST_FAIL.
    在指定數(shù)量的測(cè)試失敗后停止執(zhí)行筑累,以避免在出現(xiàn)大量失敗時(shí)耗盡資源(和時(shí)間)袱蜡。重試不計(jì)算在內(nèi)。默認(rèn)為10慢宗,設(shè)置為0表示無限制坪蚁。也可以使用環(huán)境變量MTR_MAX_TEST_FAIL進(jìn)行設(shè)置。

  • --mem

    This option is not supported on Windows and on MacOS.
    Windows和MacOS不支持此選項(xiàng)镜沽。

    Run the test suite in memory, using tmpfs or ramdisk. This can decrease test times significantly, in particular if you would otherwise be running over a remote file system. mysql-test-run.pl attempts to find a suitable location using a built-in list of standard locations for tmpfs and puts the var directory there. This option also affects placement of temporary files, which are created in var/tmp.
    使用tmpfs或ramdisk在內(nèi)存中運(yùn)行測(cè)試套件敏晤。這可以顯著減少測(cè)試時(shí)間,特別是在您將在遠(yuǎn)程文件系統(tǒng)上運(yùn)行時(shí)缅茉。pl嘗試使用TMPFS的標(biāo)準(zhǔn)位置的內(nèi)置列表找到合適的位置嘴脾,并將var目錄放在那里。此選項(xiàng)還影響在var/tmp中創(chuàng)建的臨時(shí)文件的放置蔬墩。

    The default list includes /dev/shm, /run/shm and /tmp. You can also enable this option by setting the environment variable MTR_MEM[=dir_name]. If dir_name is given, it is added to the beginning of the list of locations to search, so it takes precedence over any built-in locations.
    默認(rèn)列表包括“/dev/shm”译打、“/run/shm”和“/tmp”。也可以通過設(shè)置環(huán)境變量MTR_MEM[=dir_name]來啟用該選項(xiàng)拇颅。如果給出了dir_name奏司,它將被添加到要搜索的位置列表的開頭,因此它優(yōu)先于任何內(nèi)置位置蔬蕊。

    Once you have run tests with --mem within a mysql-test directory, a soflink var will have been set up to the temporary directory, and this will be re-used the next time, until the soflink is deleted. Thus, you do not have to repeat the --mem option next time.
    一旦你在mysql-test目錄中使用——mem運(yùn)行測(cè)試结澄,soflink的var就會(huì)被設(shè)置到臨時(shí)目錄中,這個(gè)var會(huì)在下一次被重用岸夯,直到soflink被刪除麻献。因此,下次不必重復(fù)——mem選項(xiàng)猜扮。

  • --mysqld=value

    Extra option to pass to mysqld. Only one option may be specified in value; to specify more than one, use additional –mysqld options. See Passing Options from mysql-test-run.pl to mysqld or mysqltest.
    傳遞給mysqld的額外選項(xiàng)勉吻。只能在value中指定一個(gè)選項(xiàng);要指定多個(gè)選項(xiàng),可以使用附加的-mysqld選項(xiàng)旅赢。請(qǐng)參閱將選項(xiàng)從mysql-test-run.pl傳遞給mysqld或mysqltest齿桃。

  • --mysqld-env=variable=value

    Sets (or changes) an environment variable before starting mysqld. Varibles set in the environment from which you run mysql-test-run.pl will normally also be propagated to mysqld, but there may be cases where you want a setting just for a single run, or you may not want the setting to affect other programs. You may use additional --mysqld-env options to set more than one variable.
    在啟動(dòng)mysqld之前設(shè)置(或更改)一個(gè)環(huán)境變量惑惶。在運(yùn)行mysql-test-run.pl的環(huán)境中設(shè)置的變量通常也會(huì)傳播到mysqld,但在某些情況下短纵,您可能只希望設(shè)置一次運(yùn)行带污,或者不希望該設(shè)置影響其他程序。你可以使用額外的——mysqld-env選項(xiàng)來設(shè)置多個(gè)變量香到。

  • --mysqltest=options

    Extra options to pass to mysqltest.
    傳遞給mysqltest的額外選項(xiàng)鱼冀。

  • --ndb-connectstring=str

    Pass --ndb-connectstring=str to the master MySQL server. This option also prevents mysql-test-run.pl from starting a cluster. It is assumed that there is already a cluster running to which the server can connect with the given connectstring.
    將——ndb-connectstring=str傳遞給MySQL主服務(wù)器寺擂。這個(gè)選項(xiàng)還可以防止mysql-test-run.pl啟動(dòng)集群卦方。假設(shè)已經(jīng)有一個(gè)集群在運(yùn)行伊诵,服務(wù)器可以使用給定的connectstring連接到該集群哀墓。

  • --no-skip

    This option forces all tests to run, ignoring any --skip commands used in the test. This ensures that all tests are run. An excluded list (excludenoskip.list) is maintained to track which tests should continue to be skipped. The --no-skip option continues to skip the tests that are named in the excluded list. In case the test or file invoking the --skip command is not present in the excluded list, the outcome of the test will be identified as [ noskip-pass ] or [ noskip-fail ] .The default value of –no-skip introduced variable is OFF, which implies users are not forced to run all tests unless the –no-skip is explicitly used.
    此選項(xiàng)強(qiáng)制運(yùn)行所有測(cè)試嘱能,忽略測(cè)試中使用的任何——skip命令激况。這將確保運(yùn)行所有測(cè)試投储。維護(hù)排除列表(excludenoskip.list)以跟蹤應(yīng)該繼續(xù)跳過哪些測(cè)試拱她≌耄——no-skip選項(xiàng)繼續(xù)跳過排除列表中指定的測(cè)試瑞妇。如果測(cè)試調(diào)用——跳過命令或文件不存在在排除列表中,測(cè)試的結(jié)果將被認(rèn)定為[noskip-pass]或[noskip-fail],沒有跳過引入變量的默認(rèn)值,這意味著用戶不強(qiáng)制運(yùn)行所有的測(cè)試,除非顯式地使用沒有跳過。

    shell> mysql-test-run.pl --suite=innodb --no-skip
    
  • --nocheck-testcases

    Disable the check for test case side effects. For additional information, see the description of the --check-testcases option.
    禁用測(cè)試用例副作用的檢查梭冠。有關(guān)其他信息踪宠,請(qǐng)參見——check-testcases選項(xiàng)的描述。

  • --noreorder

    Do not reorder tests to reduce number of restarts, but run them in exactly the order given. If a whole suite is to be run, the tests are run in alphabetic order, though similiar combinations will be grouped together. If more than one suite is listed, the tests are run one suite at a time, in the order listed.
    不要重新排序測(cè)試以減少重新啟動(dòng)的次數(shù)妈嘹,而是按照給定的順序運(yùn)行它們柳琢。如果要運(yùn)行整個(gè)套件,那么測(cè)試將按照字母順序運(yùn)行润脸,盡管相似的組合將被組合在一起柬脸。如果列出了多個(gè)套件,則測(cè)試按列出的順序一次只運(yùn)行一個(gè)套件毙驯。

  • --notimer

    Cause mysqltest not to generate a timing file. The effect of this is that the report from each test case does not include the timing in milliseconds as it normally does.
    導(dǎo)致mysqltest不生成計(jì)時(shí)文件倒堕。這樣做的結(jié)果是,來自每個(gè)測(cè)試用例的報(bào)告不像通常那樣包括以毫秒為單位的時(shí)間爆价。

  • --nounit-tests

    Do not run unit tests, overriding default behavior or setting of the MTR_UNIT_TESTS variable.
    不要運(yùn)行單元測(cè)試垦巴,覆蓋MTR_UNIT_TESTS變量的默認(rèn)行為或設(shè)置。

  • --nowarnings

    Do not look for and report errors and warning in the server logs.
    不要在服務(wù)器日志中查找并報(bào)告錯(cuò)誤和警告铭段。

    Note

    • In addition to being passed as a command-line option, --nowarnings can also be passed in the .opt file of a test case.
      除了作為命令行選項(xiàng)傳遞外骤宣,——nowarnings也可以在測(cè)試用例的.opt文件中傳遞。
  • --only-big-tests

    This option causes only big tests to run. Normal (non-big) tests are skipped. If both --big-test and --only-big-tests are given, --only-big-tests is ignored.
    這個(gè)選項(xiàng)只會(huì)導(dǎo)致運(yùn)行大型測(cè)試序愚。跳過普通(非大型)測(cè)試憔披。如果兩者都有——大的考試和——只有大的考試,——只有大的考試被忽略。

  • --opt-trace-protocol

    Prints the optimizer trace of SQL statements in a test. Running any MTR test with this option executes the following SQL statement after every DML statement that it encounters:
    打印測(cè)試中SQL語句的優(yōu)化器跟蹤芬膝。使用該選項(xiàng)運(yùn)行MTR測(cè)試時(shí)望门,在遇到的每個(gè)DML語句之后執(zhí)行以下SQL語句:

    SELECT trace FROM information_schema.optimizer_trace /* injected by --opt-trace-protocol */;
    
  • --parallel={N|auto}

    Run tests using N parallel threads. By default, 1 thread is used. Use --parallel=auto to set N automatically.
    使用N個(gè)并行線程運(yùn)行測(cè)試。默認(rèn)情況下锰霜,使用1個(gè)線程筹误。使用——parallel=auto自動(dòng)設(shè)置N。

    Setting the MTR_PARALLEL environment variable to N has the same effect as specifying --parallel=N.
    將MTR_PARALLEL環(huán)境變量設(shè)置為N與指定——parallel=N具有相同的效果癣缅。

    The MTR_MAX_PARALLEL environment variable, if set, specifies the maximum number of parallel workers that can be spawned when the --parallel=auto option is specified. If --parallel=auto is not specified, MTR_MAX_PARALLEL variable has no effect.
    MTR_MAX_PARALLEL環(huán)境變量纫事,如果設(shè)置,將指定——parallel=auto選項(xiàng)時(shí)可以生成的最大并行工作者數(shù)量所灸。如果沒有指定——parallel=auto, MTR_MAX_PARALLEL變量不起作用。

  • --port-base=P

    Specify base of port numbers to be used; a block of 10 will be allocated. P should be divisible by 10; if it is not, it will be rounded down. If running with more than one parallel test thread, thread 2 will use the next block of 10 and so on.
    指定要使用的端口號(hào)基數(shù);將分配一個(gè)10的塊炫七。P應(yīng)該能被10整除;如果不是爬立,則將其四舍五入。如果運(yùn)行多個(gè)并行測(cè)試線程万哪,線程2將使用下一個(gè)10的塊侠驯,以此類推。

    If the port number is given as auto, which is also the default, mysql-test-run.pl will allocate a number unique to this host. The value may also be given with the environment variable MTR_PORT_BASE.
    如果將端口號(hào)指定為auto(這也是默認(rèn)值)奕巍,那么mysql-test-run.pl將為該主機(jī)分配一個(gè)唯一的編號(hào)吟策。該值也可以通過環(huán)境變量MTR_PORT_BASE給出。

    --port-base was added as a more logical alternative to --build-thread. If both are used, --port-base takes precedence.
    添加——port-base作為——build-thread的一個(gè)更合乎邏輯的替代的止。如果兩者都使用檩坚,則——port-base優(yōu)先。

  • --print-testcases

    Do not run any tests, but print details about all tests, in the order they would have been run.
    不要運(yùn)行任何測(cè)試诅福,但按運(yùn)行測(cè)試的順序打印有關(guān)所有測(cè)試的詳細(xì)信息匾委。

  • --ps-protocol

    Pass the --ps-protocol option to mysqltest.
    將——ps-protocol選項(xiàng)傳遞給mysqltest。

  • --quiet

    Reuse the output buffer and maintain a single line for reporting successful tests, skipped tests and disabled tests. Failed tests and the necessary information about the failure will be printed on a separate line.
    重用輸出緩沖區(qū)氓润,并維護(hù)一行用于報(bào)告成功測(cè)試赂乐、跳過測(cè)試和禁用測(cè)試。失敗的測(cè)試和有關(guān)失敗的必要信息將在單獨(dú)一行中打印咖气。

    When --quiet option is enabled, MTR prints only the test name and result of the test run.
    當(dāng)啟用——quiet選項(xiàng)時(shí)挨措,MTR只打印測(cè)試名稱和測(cè)試運(yùn)行的結(jié)果。

  • --record

    Pass the --record option to mysqltest. This option requires a specific test case to be named on the command line.
    將——record選項(xiàng)傳遞給mysqltest崩溪。這個(gè)選項(xiàng)需要在命令行上命名一個(gè)特定的測(cè)試用例浅役。

  • --reorder

    Reorder tests to minimize the number of server restarts needed. This is the default behavior. There is no guarantee that a particular set of tests will always end up in the same order.
    重新排序測(cè)試,以盡量減少需要重新啟動(dòng)的服務(wù)器數(shù)量伶唯。這是默認(rèn)行為担租。不能保證一組特定的測(cè)試將總是以相同的順序結(jié)束。

  • --repeat=N

    Run each test N number of times, in parallel if --parallel option value is greater than 1.
    每個(gè)測(cè)試運(yùn)行N次抵怎,如果——parallel選項(xiàng)值大于1奋救,則并行運(yùn)行岭参。

  • --report-features

    Display the output of SHOW ENGINES and SHOW VARIABLES. This can be used to verify that binaries are built with all required features.
    顯示“顯示引擎”和“顯示變量”的輸出。這可以用來驗(yàn)證二進(jìn)制文件是否包含了所有需要的特性尝艘。

  • --report-times

    At the end of the test run, write a summary of how much time was spent in various phases of execution. If you run with --parallel, the total will exceed the wall clock time passed, since it will be summed over all threads.
    在測(cè)試運(yùn)行的最后演侯,寫一個(gè)關(guān)于在執(zhí)行的各個(gè)階段花費(fèi)了多少時(shí)間的摘要。如果使用——parallel運(yùn)行背亥,則總時(shí)間將超過所經(jīng)過的掛鐘時(shí)間秒际,因?yàn)樗鼘?duì)所有線程求和。

    The times reported should only be treated as approximations, and the exact points where the time is taken may also change between releases. If the test run is aborted, including if a test fails and --force is not in use, the time report will not be produced.
    所報(bào)告的時(shí)間應(yīng)該只作為近似值狡汉,而且在不同版本之間所花費(fèi)的時(shí)間也可能會(huì)發(fā)生變化娄徊。如果測(cè)試運(yùn)行被終止,包括測(cè)試失敗和——force未使用盾戴,則不會(huì)生成時(shí)間報(bào)告寄锐。

  • --report-unstable-tests

    The option can be used to distinguish unstable tests which pass on at least one retry attempt from hard failing ones. Unstable tests are reported separately in the end summary in the format: test_name(num_of_failures/num_of_attempts).
    該選項(xiàng)可用于區(qū)分至少通過一次重試嘗試的不穩(wěn)定測(cè)試和嚴(yán)重失敗的測(cè)試。不穩(wěn)定測(cè)試在最后的摘要中分別報(bào)告尖啡,格式為test_name(num_of_failures/num_of_attempts)橄仆。

    In case all failures encountered are due to unstable tests, MTR will print the below warning and exit with a zero status code.
    如果遇到的所有故障都是由于不穩(wěn)定的測(cè)試造成的,MTR將打印以下警告并以零狀態(tài)代碼退出衅斩。

    mysql-test-run: WARNING: There are failures due to unstable test cases.
    However, the tests are not hard-failing.
    

    This option has no effect unless --force is used and both --retry and --retry-failure are set to values greater than 1.
    除非使用——force并且——retry和——retry-failure的值都設(shè)置為大于1盆顾,否則此選項(xiàng)無效。

  • --retry=N

    If a test fails, it is retried up to a maximum of N runs, but will terminate after 2 failures. Default is 3, set to 1 or 0 for no retries. This option has no effect unless --force is also used; without it, test execution will terminate after the first failure.
    如果測(cè)試失敗畏梆,將重試最多N次您宪,但在2次失敗后將終止。默認(rèn)為3奠涌,當(dāng)不重試時(shí)設(shè)置為1或0蚕涤。這個(gè)選項(xiàng)沒有效果,除非——force也被使用;如果沒有它铣猩,測(cè)試執(zhí)行將在第一次失敗后終止揖铜。

    The --retry and --retry-failure options do not affect how many times a test repeated with --repeat may fail in total, as each repetition is considered a new test case, which may in turn be retried if it fails.
    ——retry和——retry-failure選項(xiàng)不影響使用——repeat可能總共失敗的測(cè)試重復(fù)的次數(shù),因?yàn)槊看沃貜?fù)都被認(rèn)為是一個(gè)新的測(cè)試用例达皿,如果它失敗了天吓,則可以依次重新嘗試。

  • --retry-failure=N

    Allow a failed and retried test to fail more than the default 2 times before giving it up. Setting it to 0 or 1 effectively turns off retries
    允許一個(gè)失敗并重試的測(cè)試失敗超過默認(rèn)的2次峦椰,然后放棄它龄寞。將其設(shè)置為0或1可以有效地關(guān)閉重試

  • --sanitize

    Scan the server log files for warnings from various sanitizers. Use of this option assumes that MySQL was configured with -DWITH_ASAN or -DWITH_UBSAN.
    掃描服務(wù)器日志文件以獲取來自各種殺毒程序的警告。使用這個(gè)選項(xiàng)假設(shè)MySQL配置了-DWITH_ASAN或-DWITH_UBSAN汤功。

    The TSAN_OPTIONS environment variable can be set to specify the path name of a file containing ThreadSanitizer suppressions.
    可以設(shè)置TSAN_OPTIONS環(huán)境變量來指定包含ThreadSanitizer抑制的文件的路徑名物邑。

  • --shutdown-timeout=seconds

    Max number of seconds to wait for servers to do controlled shutdown before killing them. Default is 10.
    在服務(wù)器被殺死之前,等待服務(wù)器進(jìn)行受控關(guān)閉的最大秒數(shù)。默認(rèn)是10色解。

  • --skip-combinations

    Do not apply combinations; ignore combinations file or option.
    不要應(yīng)用組合;忽略組合文件或選項(xiàng)茂嗓。

  • --skip-ndbcluster, --skip-ndb

    Do not start NDB Cluster; skip Cluster test cases. This option only has effect if you do have NDB, if not it will have no effect as it cannot run those tests anyway.
    不啟動(dòng)NDB集群;跳過集群測(cè)試用例。這個(gè)選項(xiàng)只有在你有NDB的情況下才有效果科阎,如果沒有述吸,它將沒有效果,因?yàn)樗鼰o論如何都不能運(yùn)行那些測(cè)試锣笨。

  • --skip-ndbcluster-slave, --skip-ndb-slave

    Do not start an NDB Cluster slave.
    不要啟動(dòng)NDB集群slave蝌矛。

  • --skip-rpl

    Skip replication test cases.
    跳過復(fù)制測(cè)試用例。

  • --skip-test=regex

    Specify a regular expression to be applied to test case names. Cases with names that match the expression are skipped. tests to skip.
    指定要應(yīng)用于測(cè)試用例名稱的正則表達(dá)式错英。名稱匹配表達(dá)式的情況將被跳過入撒。測(cè)試跳過。

    The argument for the --skip-test option allows more flexible specification of which tests to skip. If the argument contains a pattern metacharacter other than a lone period, it is interpreted as a Perl regular expression and applies to test names that match the pattern. See the description of the --do-test option for details.
    ——skip-test選項(xiàng)的參數(shù)允許更靈活地說明要跳過哪些測(cè)試椭岩。如果參數(shù)包含模式元字符而不是單個(gè)句點(diǎn)茅逮,則將其解釋為Perl正則表達(dá)式,并應(yīng)用于匹配該模式的測(cè)試名稱簿煌。詳細(xì)信息請(qǐng)參見——do-test選項(xiàng)的描述。

  • --skip-test-list=file

    Specify a file listing tests that should be skipped (disabled).
    指定一個(gè)文件鉴吹,列出應(yīng)該跳過(禁用)的測(cè)試姨伟。

    The file has the same format as the disabled.def file listing disabled tests. With this option, disabling can be done on a case by case basis.
    該文件具有與列出已禁用測(cè)試的disabled.def文件相同的格式。有了這個(gè)選項(xiàng)豆励,可以根據(jù)具體情況禁用夺荒。

  • --skip-*

    --skip-* options not otherwise recognized by mysql-test-run.pl are passed to the master server.
    mysql-test-run.pl無法識(shí)別的選項(xiàng)被傳遞給主服務(wù)器。

  • --sp-protocol

    Pass the --sp-protocol option to mysqltest.
    將——sp-protocol選項(xiàng)傳遞給mysqltest良蒸。

  • --start

    Initialize and start servers with the startup settings for the specified test case. You can use this option to start a server to which you can connect later. For example, after building a source distribution you can start a server and connect to it with the mysql client like this:
    使用指定測(cè)試用例的啟動(dòng)設(shè)置初始化并啟動(dòng)服務(wù)器技扼。您可以使用此選項(xiàng)啟動(dòng)稍后可以連接到的服務(wù)器。例如嫩痰,在構(gòu)建了一個(gè)源發(fā)布之后剿吻,你可以啟動(dòng)一個(gè)服務(wù)器,并像這樣用mysql客戶端連接到它:

    shell> cd mysql-test
    shell> ./mysql-test-run.pl --start alias &
    shell> ../mysql -S ./var/tmp/master.sock -h localhost -u root
    

    If no tests are named on the command line, the server(s) will be started with settings for the first test that would have been run without the --start option.
    如果命令行上沒有命名任何測(cè)試串纺,則服務(wù)器將使用第一個(gè)測(cè)試的設(shè)置啟動(dòng)丽旅,該設(shè)置將在沒有——start選項(xiàng)的情況下運(yùn)行。

    mysql-test-run.pl will stop once the server has been started, but will terminate if the server dies. If killed, it will also shut down the server.
    Mysql-test-run.pl將在服務(wù)器啟動(dòng)后停止纺棺,但在服務(wù)器死亡時(shí)也將終止榄笙。如果被殺死,它也會(huì)關(guān)閉服務(wù)器祷蝌。

  • --start-and-exit

    This is similar to --start, but mysql-test-run.pl terminates once the server has been started, leaving just the server process running.
    這類似于——start茅撞,但是mysql-test-run.pl在服務(wù)器啟動(dòng)后終止,只留下服務(wù)器進(jìn)程在運(yùn)行。

  • --start-dirty

    This is similar to --start, but will skip the database initialization phase and assume that database files are already available. Usually this means you must have run another test first.
    這類似于——start米丘,但將跳過數(shù)據(jù)庫初始化階段剑令,并假設(shè)數(shù)據(jù)庫文件已經(jīng)可用。通常這意味著您必須先運(yùn)行另一個(gè)測(cè)試蠕蚜。

  • --start-from=test_name

    mysql-test-run.pl sorts the list of names of the test cases to be run, and then begins with test_name.
    mysql-test-run.pl對(duì)要運(yùn)行的測(cè)試用例的名稱列表進(jìn)行排序尚洽,然后以test_name開頭。

  • --strace-client

    Create strace output for mysqltest. Will produce default strace output as mysqltest.strace. Note that this will be overwritten for each new test case, so it's most useful for running only one test.
    創(chuàng)建mysqltest的strace輸出靶累。將生成默認(rèn)的strace輸出為mysqltest.strace腺毫。請(qǐng)注意,對(duì)于每個(gè)新的測(cè)試用例挣柬,這將被覆蓋潮酒,所以只運(yùn)行一個(gè)測(cè)試是最有用的。

    The strace-client option is only supported on Linux.
    strace-client選項(xiàng)僅在Linux上支持邪蛔。

  • --strace-server

    Create strace output for the server. Will produce default strace output as mysqld.1.strace. Note that this will be overwritten each time the server is restarted, so it's most useful for running a single test, or if you want trace from the first test that fails.
    為服務(wù)器創(chuàng)建strace輸出急黎。將生成默認(rèn)的strace輸出為mysqld.1.strace。請(qǐng)注意侧到,每次服務(wù)器重新啟動(dòng)時(shí)勃教,這將被覆蓋,因此對(duì)于運(yùn)行單個(gè)測(cè)試匠抗,或者希望跟蹤第一個(gè)失敗的測(cè)試故源,這是最有用的。

    The strace-server option is available on Linux only.
    strace-server選項(xiàng)僅在Linux上可用汞贸。

  • --stress=stress options

    Start a server, but instead of running a test, run mysql-stress-test.pl with the supplied arguments. Arguments needed to communicate with the server will be automatically provided, the rest should be given as arguments to this option. Command line options for mysql-stress-test.pl should be separeted by a comma.
    啟動(dòng)服務(wù)器绳军,但不是運(yùn)行測(cè)試,而是使用提供的參數(shù)運(yùn)行mysql-stress .pl矢腻。與服務(wù)器通信所需的參數(shù)將自動(dòng)提供门驾,其余應(yīng)作為該選項(xiàng)的參數(shù)。mysql-stress-test.pl的命令行選項(xiàng)應(yīng)該用逗號(hào)分隔多柑。

  • --suite(s)={suite_name|suite_list|suite_set}

    Run a suite or a comma separated list of suites or those suites which fall under the specified suite set. If the option is not specified explicitly, MTR assumes that it needs to use the default suite set for the test run.
    運(yùn)行一個(gè)套件或以逗號(hào)分隔的套件列表奶是,或?qū)儆谥付ㄌ准哪切┨准H绻麤]有顯式指定該選項(xiàng)竣灌,MTR將假設(shè)它需要為測(cè)試運(yùn)行使用默認(rèn)套件集诫隅。

    The suite set's MTR can use are case insensitive and take the below values:
    套件集的MTR可以使用不區(qū)分大小寫,并取以下值:

    default     - To run the default list of suites.
    all         - To scan the mysql directory and run all available suites.
    non-default - To scan the mysql directory for available suites and
                  collect only the non-default suites.
    

    The suite set 'all' is used implicitly if neither a suite nor a suite list is specified and
    如果既沒有指定套件也沒有指定套件列表帐偎,則隱式使用套件集“all”
    (i) There are tests given on the MTR command line or
    對(duì)MTR命令行或進(jìn)行了測(cè)試
    (ii) Any of the following options are used: –do-suite, –do-test, –do-test-list.
    可以使用以下選項(xiàng):-do-suite逐纬、-do-test、-do-test -list削樊。

    Note that suite sets 'all' and 'non-default' do not include ndb test suites in case ndb cluster is not enabled.
    注意套件集'all'和'non-default'在ndb集群未啟用的情況下不包含ndb測(cè)試套件豁生。

    If a suite set is specified in the suite list, MTR does not treat it as a suite set and considers it as the name of a suite to be run.
    如果在套件列表中指定了套件集兔毒,MTR不會(huì)將其視為套件集,而是將其視為要運(yùn)行的套件的名稱甸箱。

  • --suite-timeout=minutes

    Specify the maximum test suite runtime in minutes.
    指定以分鐘為單位的最大測(cè)試套件運(yùn)行時(shí)育叁。

  • --summary-report=file_name

    Generate a plain text version of the test summary only and write it to the file named as the option argument. The file is suitable for sending by email.
    只生成測(cè)試摘要的純文本版本,并將其寫入名為option參數(shù)的文件中芍殖。這個(gè)文件適合通過電子郵件發(fā)送豪嗽。

  • --test-progress[={0|1}]

    Print the percentage of tests completed. This option is enabled by default. The argument to --test-progress is optional. To disable it, set the value to 0.
    打印已完成測(cè)試的百分比。這個(gè)選項(xiàng)默認(rèn)是啟用的豌骏」昝危——test-progress的參數(shù)是可選的。若要禁用窃躲,請(qǐng)將該值設(shè)置為0计贰。

    For example, consider a test suite sample_test_suite containing 3 tests.
    例如,考慮一個(gè)包含3個(gè)測(cè)試的測(cè)試套件sample_test_suite蒂窒。

    ./mysql-test-run.pl --suite=sample_test_suite [--test-progress]
    

    Running the suite with --test-progress option enabled will print the percentage of tests completed.
    運(yùn)行啟用了——test-progress選項(xiàng)的套件將打印測(cè)試完成的百分比躁倒。

    [ 33%] sample_test_suite.1st                           [ pass ]      1
    [ 66%] sample_test_suite.2nd                           [ pass ]      1
    [100%] sample_test_suite.3rd                           [ pass ]      1
    
  • --testcase-timeout=minutes

    Specify the maximum test case runtime in minutes.
    指定以分鐘為單位的最大測(cè)試用例運(yùn)行時(shí)。

    Note

    • When a test case is run with valgrind option enabled, the test case timeout value becomes 10 times the specified value. For example, running a test case with timeout value 1 minute and valgrind enabled will increase the timeout value to 10 minutes.
      當(dāng)啟用valgrind選項(xiàng)運(yùn)行測(cè)試用例時(shí)洒琢,測(cè)試用例超時(shí)值變?yōu)橹付ㄖ档?0倍秧秉。例如,運(yùn)行一個(gè)超時(shí)值為1分鐘且啟用valgrind的測(cè)試用例衰抑,將使超時(shí)值增加到10分鐘象迎。
  • --timediff

    Adds to each test report for a test case, the total time in seconds and milliseconds passed since the preceding test ended. This option can only be used together with --timestamp, and has no effect without it.
    為一個(gè)測(cè)試用例添加到每個(gè)測(cè)試報(bào)告中,自前一個(gè)測(cè)試結(jié)束后以秒和毫秒為單位的總時(shí)間停士。這個(gè)選項(xiàng)只能與——timestamp一起使用挖帘,沒有它就沒有效果完丽。

  • --timer

    Cause mysqltest to generate a timing file. The default file is named ./var/log/timer.
    導(dǎo)致mysqltest生成一個(gè)計(jì)時(shí)文件恋技。默認(rèn)文件名為。/var/log/timer逻族。

  • --timestamp

    Prints a timestamp before the test case name in each test report line, showing when the test ended.
    在每個(gè)測(cè)試報(bào)告行中蜻底,在測(cè)試用例名稱之前打印一個(gè)時(shí)間戳,顯示測(cè)試何時(shí)結(jié)束聘鳞。

  • --tmpdir=path

    The directory where temporary file are stored. The default location is ./var/tmp. The environment variable MYSQL_TMP_DIR will be set to the path for this directory, whether it has the default value or has been set explicitly. This may be referred to in tests.
    存放臨時(shí)文件的目錄薄辅。默認(rèn)位置是./var/tmp。環(huán)境變量MYSQL_TMP_DIR將被設(shè)置為該目錄的路徑抠璃,無論它具有默認(rèn)值還是已顯式設(shè)置站楚。這可能會(huì)在測(cè)試中提到。

  • --unit-tests

    Force running of unit tests, overriding default behavior or setting of the MTR_UNIT_TESTS variable.
    強(qiáng)制運(yùn)行單元測(cè)試搏嗡,覆蓋MTR_UNIT_TESTS變量的默認(rèn)行為或設(shè)置窿春。

  • --unit-tests-report

    Extend the unit test run by also outputting the log from the test run, independently of whether it succeeded or not. This option implies --unit-tests so it is not necessary to specify both.
    通過輸出測(cè)試運(yùn)行的日志來擴(kuò)展單元測(cè)試運(yùn)行拉一,而不管測(cè)試是否成功。這個(gè)選項(xiàng)意味著——單元測(cè)試旧乞,所以沒有必要同時(shí)指定這兩個(gè)蔚润。

  • --user=user_name

    The MySQL user name to use when connecting to the server.
    連接到服務(wù)器時(shí)使用的MySQL用戶名。

  • --user-args

    Drops all non-essential command line arguments to the mysqld server, except those supplied with --mysqld arguemnts, if any. Only works in combination with --start, --start-and-exit or --start-dirty, and only if no test name is given.
    刪除所有非必要的命令行參數(shù)到mysqld服務(wù)器尺栖,除了那些附帶——mysqld參數(shù)的參數(shù)(如果有的話)嫡纠。僅在與——start、——start-and-exit或——start-dirty組合使用時(shí)有效延赌,且僅在沒有給出測(cè)試名的情況下有效除盏。

  • --valgrind

    Run mysqltest and mysqld with valgrind. This and the following --valgrind options require that the executables have been build with valgrind support.
    運(yùn)行mysqltest和mysqld與valgrind。這個(gè)和下面的valgrind選項(xiàng)要求使用valgrind支持構(gòu)建可執(zhí)行文件皮胡。

    When the server is run with valgrind, an extra pass over the server log file(s) will be performed after all tests are run, and any report with problems that have been reported at server shutdown will be extracted and printed. The most common warnings are memory leaks. With each report will also be listed all tests that were run since previous server restart; one of these is likely to have caused the problem.
    當(dāng)服務(wù)器使用valgrind運(yùn)行時(shí)痴颊,將在所有測(cè)試運(yùn)行后執(zhí)行一次額外的服務(wù)器日志文件傳遞,并且將提取并打印在服務(wù)器關(guān)閉時(shí)報(bào)告的任何問題報(bào)告屡贺。最常見的警告是內(nèi)存泄漏蠢棱。每個(gè)報(bào)告還將列出自上一次服務(wù)器重新啟動(dòng)以來運(yùn)行的所有測(cè)試;問題可能是由其中一個(gè)引起的。

    A final "pseudo" test named valgrind_report is added to the list of tests when the server is run in valgrind. This test is reported as failed if any such shutdown warnings were produced by valgrind. Pass or failure of this test is also added to the total test count reported.
    當(dāng)服務(wù)器在valgrind中運(yùn)行時(shí)甩栈,最后一個(gè)名為valgrind_report的“偽”測(cè)試被添加到測(cè)試列表中泻仙。如果valgrind產(chǎn)生任何此類關(guān)閉警告,則將此測(cè)試報(bào)告為失敗量没。此測(cè)試的通過或失敗也會(huì)添加到報(bào)告的總測(cè)試計(jì)數(shù)中玉转。

    Note

    • When a test case is run with valgrind option enabled, the test case timeout value becomes 10 times the specified value. For example, running a test case with timeout value 1 minute and valgrind enabled will increase the timeout value to 10 minutes.
      當(dāng)啟用valgrind選項(xiàng)運(yùn)行測(cè)試用例時(shí),測(cè)試用例超時(shí)值變?yōu)橹付ㄖ档?0倍殴蹄。例如究抓,運(yùn)行一個(gè)超時(shí)值為1分鐘且啟用valgrind的測(cè)試用例,將使超時(shí)值增加到10分鐘袭灯。
  • --valgrind-clients

    Run all clients started by .test files with valgrind. This option requires valgrind 3.9 or later.
    使用valgrind運(yùn)行所有由.test文件啟動(dòng)的客戶端刺下。該選項(xiàng)需要valgrind 3.9或更高版本。

  • --valgrind-mysqld

    Run the mysqld server with valgrind.
    使用valgrind運(yùn)行mysqld服務(wù)器稽荧。

  • --valgrind-mysqltest

    Run mysqltest with valgrind.
    使用valgrind運(yùn)行mysqltest橘茉。

  • --valgrind-option=str

    Extra options to pass to valgrind.
    額外選擇通過valgrind。

  • --valgrind-path=path

    Specify the path name to the valgrind executable.
    指定valgrind可執(zhí)行文件的路徑名姨丈。

  • --vardir=path

    Specify the path where files generated during the test run are stored. The default location is ./var. The environment variable MYSQLTEST_VARDIR will be set to the path for this directory, whether it has the default value or has been set explicitly. This may be referred to in tests.
    指定存儲(chǔ)測(cè)試運(yùn)行期間生成的文件的路徑畅卓。默認(rèn)位置是./var。環(huán)境變量MYSQLTEST_VARDIR將被設(shè)置為該目錄的路徑蟋恬,無論它具有默認(rèn)值還是已顯式設(shè)置翁潘。這可能會(huì)在測(cè)試中提到。

  • --verbose

    Give more verbose output regarding test execution. Note that the output generated within each test case is not affected.

  • --verbose-restart

    Write when and why servers are restarted between test cases.
    給出關(guān)于測(cè)試執(zhí)行的更詳細(xì)的輸出歼争。注意拜马,在每個(gè)測(cè)試用例中生成的輸出不會(huì)受到影響箱歧。

  • --view-protocol

    Pass the --view-protocol option to mysqltest.
    將——view-protocol選項(xiàng)傳遞給mysqltest。

  • --vs-config=config_val

    Specify the configuration used to build MySQL (for example, –vs-config=debug –vs-config=release). This option is for Windows only.
    指定用于構(gòu)建MySQL的配置(例如一膨,-vs-config =debug -vs-config =release)呀邢。此選項(xiàng)僅適用于Windows。

  • --wait-all

    If --start or --start-dirty is used, wait for all servers to exit before termination. Otherise, it will terminate if one (of several) servers is restarted.
    如果使用了——start或——start-dirty豹绪,則在終止前等待所有服務(wù)器退出价淌。否則,如果重啟一個(gè)(多個(gè))服務(wù)器瞒津,它將終止蝉衣。

  • --warnings

    Search the server log for errors or warning after each test and report any suspicious ones; if any are found, the test will be marked as failed. This is the default behavior, it may be turned off with --nowarnings.
    在每次測(cè)試后搜索服務(wù)器日志查找錯(cuò)誤或警告,并報(bào)告任何可疑的錯(cuò)誤;如果找到了巷蚪,測(cè)試將被標(biāo)記為失敗病毡。這是默認(rèn)行為,可以通過——nowarnings關(guān)閉屁柏。

  • --with-ndbcluster-only, --with-ndb-only

    Run only ndb tests. If no suites are explicitly given, this option also skip all non ndb suites without checking individual test names.
    只運(yùn)行ndb測(cè)試啦膜。如果沒有顯式給出套件,該選項(xiàng)也會(huì)跳過所有非ndb套件淌喻,而不檢查單個(gè)測(cè)試名稱僧家。

  • --xml-report=file_name

    Generate an xml file containing result of the test run and write it to the file named as the option argument. It includes suite-wise and overall statistics like the number of tests run, number of failures, number of disabled and skipped tests along with information about each individual test according to its outcome.
    生成一個(gè)包含測(cè)試運(yùn)行結(jié)果的xml文件,并將其寫入名為option參數(shù)的文件裸删。它包括適合的總體統(tǒng)計(jì)信息八拱,如運(yùn)行的測(cè)試數(shù)量、失敗數(shù)量涯塔、禁用和跳過的測(cè)試數(shù)量肌稻,以及根據(jù)結(jié)果有關(guān)每個(gè)測(cè)試的信息。

    The xml report's structure can be found below :
    xml報(bào)告的結(jié)構(gòu)如下:

    <testsuites ... >
      <testsuite ... >
         <testcase ... />
         <testcase ... >
             <failure ... > ... </failure>
         </testcase>
      </testsuite>
    </testsuites>
    

Note

  • The hostname resolves to 127.0.0.1 and not to the actual IP address.
    主機(jī)名解析為127.0.0.1匕荸,而不是實(shí)際的IP地址爹谭。
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市每聪,隨后出現(xiàn)的幾起案子旦棉,更是在濱河造成了極大的恐慌齿风,老刑警劉巖药薯,帶你破解...
    沈念sama閱讀 217,277評(píng)論 6 503
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場(chǎng)離奇詭異救斑,居然都是意外死亡童本,警方通過查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,689評(píng)論 3 393
  • 文/潘曉璐 我一進(jìn)店門脸候,熙熙樓的掌柜王于貴愁眉苦臉地迎上來穷娱,“玉大人绑蔫,你說我怎么就攤上這事”枚睿” “怎么了配深?”我有些...
    開封第一講書人閱讀 163,624評(píng)論 0 353
  • 文/不壞的土叔 我叫張陵,是天一觀的道長(zhǎng)嫁盲。 經(jīng)常有香客問我篓叶,道長(zhǎng),這世上最難降的妖魔是什么羞秤? 我笑而不...
    開封第一講書人閱讀 58,356評(píng)論 1 293
  • 正文 為了忘掉前任缸托,我火速辦了婚禮,結(jié)果婚禮上瘾蛋,老公的妹妹穿的比我還像新娘俐镐。我一直安慰自己,他們只是感情好哺哼,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,402評(píng)論 6 392
  • 文/花漫 我一把揭開白布佩抹。 她就那樣靜靜地躺著,像睡著了一般取董。 火紅的嫁衣襯著肌膚如雪匹摇。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,292評(píng)論 1 301
  • 那天甲葬,我揣著相機(jī)與錄音廊勃,去河邊找鬼。 笑死经窖,一個(gè)胖子當(dāng)著我的面吹牛坡垫,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播画侣,決...
    沈念sama閱讀 40,135評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼冰悠,長(zhǎng)吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼!你這毒婦竟也來了配乱?” 一聲冷哼從身側(cè)響起溉卓,我...
    開封第一講書人閱讀 38,992評(píng)論 0 275
  • 序言:老撾萬榮一對(duì)情侶失蹤,失蹤者是張志新(化名)和其女友劉穎搬泥,沒想到半個(gè)月后桑寨,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,429評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡忿檩,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,636評(píng)論 3 334
  • 正文 我和宋清朗相戀三年尉尾,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片燥透。...
    茶點(diǎn)故事閱讀 39,785評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡沙咏,死狀恐怖辨图,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情肢藐,我是刑警寧澤故河,帶...
    沈念sama閱讀 35,492評(píng)論 5 345
  • 正文 年R本政府宣布,位于F島的核電站吆豹,受9級(jí)特大地震影響忧勿,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜瞻讽,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,092評(píng)論 3 328
  • 文/蒙蒙 一鸳吸、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧速勇,春花似錦晌砾、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,723評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至都伪,卻和暖如春呕乎,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背陨晶。 一陣腳步聲響...
    開封第一講書人閱讀 32,858評(píng)論 1 269
  • 我被黑心中介騙來泰國打工猬仁, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人先誉。 一個(gè)月前我還...
    沈念sama閱讀 47,891評(píng)論 2 370
  • 正文 我出身青樓湿刽,卻偏偏與公主長(zhǎng)得像,于是被迫代替她去往敵國和親褐耳。 傳聞我的和親對(duì)象是個(gè)殘疾皇子诈闺,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,713評(píng)論 2 354

推薦閱讀更多精彩內(nèi)容