mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-28 08:51:44 +00:00
Merge pt-ms-pt-stalk-standard-mysql-options.
This commit is contained in:
30
t/lib/bash/mysql_options.sh
Normal file
30
t/lib/bash/mysql_options.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
plan 3
|
||||
|
||||
TMPFILE="$TEST_PT_TMPDIR/parse-opts-output"
|
||||
TOOL="pt-mysql-summary"
|
||||
PT_TMPDIR="$TEST_PT_TMPDIR"
|
||||
|
||||
source "$LIB_DIR/log_warn_die.sh"
|
||||
source "$LIB_DIR/parse_options.sh"
|
||||
source "$LIB_DIR/mysql_options.sh"
|
||||
|
||||
cnf="/tmp/12345/my.sandbox.cnf"
|
||||
|
||||
parse_options "$PERCONA_TOOLKIT_BRANCH/bin/pt-mysql-summary" --defaults-file $cnf
|
||||
is "$OPT_DEFAULTS_FILE" "$cnf" "--defaults-file works"
|
||||
|
||||
# ############################################################################
|
||||
# Short forms work
|
||||
# ############################################################################
|
||||
|
||||
parse_options "$PERCONA_TOOLKIT_BRANCH/bin/pt-mysql-summary" -F $cnf
|
||||
is "$OPT_DEFAULTS_FILE" "$cnf" "-F works"
|
||||
|
||||
parse_options "$PERCONA_TOOLKIT_BRANCH/bin/pt-mysql-summary" -u msandbox
|
||||
is "$OPT_USER" "msandbox" "-u works"
|
||||
|
||||
# ############################################################################
|
||||
# Done
|
||||
# ############################################################################
|
1
t/lib/bash/mysql_options.t
Symbolic link
1
t/lib/bash/mysql_options.t
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../util/test-bash-functions
|
@@ -144,7 +144,7 @@ like(
|
||||
|
||||
cleanup();
|
||||
|
||||
$retval = system("$trunk/bin/pt-stalk --daemonize --pid $pid_file --log $log_file --dest $dest --verbose 3 -- --defaults-file=$cnf");
|
||||
$retval = system("$trunk/bin/pt-stalk --daemonize --pid $pid_file --log $log_file --variable Threads_running --dest $dest --verbose 3 -- --defaults-file=$cnf");
|
||||
|
||||
PerconaTest::wait_for_files($pid_file, $log_file);
|
||||
PerconaTest::wait_for_sh("grep -q 'Check results' $log_file >/dev/null");
|
||||
@@ -155,7 +155,7 @@ like(
|
||||
$output,
|
||||
qr/Check results: Threads_running=\d+, matched=no, cycles_true=0/,
|
||||
"Matching results logged with --verbose 3"
|
||||
) or diag(`cat $log_file 2>/dev/null`, `cat $dest/*-output 2>/dev/null`);
|
||||
) or diag(`cat $dest/*-output 2>/dev/null`);
|
||||
|
||||
# #############################################################################
|
||||
# --verbose 1 (just errors and warnings)
|
||||
|
Reference in New Issue
Block a user