mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-09 18:30:16 +00:00
Remove last references to Maakit. Update sandbox test env scripts.
This commit is contained in:
@@ -5,22 +5,21 @@ err() {
|
|||||||
for msg; do
|
for msg; do
|
||||||
echo $msg
|
echo $msg
|
||||||
done
|
done
|
||||||
echo "See http://code.google.com/p/maatkit/wiki/Testing for more information."
|
exit_status=1
|
||||||
echo
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
# Sanity check the cmd line options.
|
# Sanity check the cmd line options.
|
||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
if [ $# -lt 1 ]; then
|
if [ $# -lt 1 ]; then
|
||||||
err "Usage: load-sakila-db port"
|
err "Usage: load-sakila-db PORT"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PORT=$1
|
PORT=$1
|
||||||
|
|
||||||
if [ ! -d "/tmp/$PORT" ]; then
|
if [ ! -d "/tmp/$PORT" ]; then
|
||||||
err "Sandbox does not exist: /tmp/$PORT"
|
err "MySQL test server does not exist: /tmp/$PORT"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -33,15 +32,21 @@ if [ -z "$PERCONA_TOOLKIT_BRANCH" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "$PERCONA_TOOLKIT_BRANCH" ]; then
|
if [ ! -d "$PERCONA_TOOLKIT_BRANCH" ]; then
|
||||||
err "Invalid Maakit trunk directory: $PERCONA_TOOLKIT_BRANCH"
|
err "Invalid PERCONA_TOOLKIT_BRANCH directory: $PERCONA_TOOLKIT_BRANCH"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $PERCONA_TOOLKIT_BRANCH/sandbox
|
cd $PERCONA_TOOLKIT_BRANCH/sandbox
|
||||||
|
|
||||||
|
exit_status=0
|
||||||
|
|
||||||
/tmp/$PORT/use < sakila-db/sakila-schema.sql
|
/tmp/$PORT/use < sakila-db/sakila-schema.sql
|
||||||
|
exit_status=$((exit_status | $?))
|
||||||
|
|
||||||
/tmp/$PORT/use < sakila-db/sakila-data.sql
|
/tmp/$PORT/use < sakila-db/sakila-data.sql
|
||||||
|
exit_status=$((exit_status | $?))
|
||||||
|
|
||||||
$PERCONA_TOOLKIT_BRANCH/sandbox/test-env reset
|
$PERCONA_TOOLKIT_BRANCH/sandbox/test-env reset
|
||||||
|
exit_status=$((exit_status | $?))
|
||||||
|
|
||||||
exit 0
|
exit $exit_status
|
||||||
|
@@ -25,7 +25,7 @@ sandbox_is_alive() {
|
|||||||
if [ -f "$PIDFILE" ] || [ -S "$SOCKETFILE" ]; then
|
if [ -f "$PIDFILE" ] || [ -S "$SOCKETFILE" ]; then
|
||||||
sandbox_is_alive
|
sandbox_is_alive
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
echo "Maatkit sandbox PORT is running."
|
echo "MySQL test server on port PORT is running."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ cd $BASEDIR
|
|||||||
$BASEDIR/bin/mysqld_safe --defaults-file=/tmp/PORT/my.sandbox.cnf > /dev/null 2>&1 &
|
$BASEDIR/bin/mysqld_safe --defaults-file=/tmp/PORT/my.sandbox.cnf > /dev/null 2>&1 &
|
||||||
cd $PWD
|
cd $PWD
|
||||||
|
|
||||||
echo -n "Starting Maatkit sandbox PORT... "
|
echo -n "Starting MySQL test server on port PORT... "
|
||||||
for i in 1 2 3 4 5 6 7 8 9 10; do
|
for i in 1 2 3 4 5 6 7 8 9 10; do
|
||||||
sleep 1
|
sleep 1
|
||||||
if [ -f $PIDFILE ] && [ -S $SOCKETFILE ]; then
|
if [ -f $PIDFILE ] && [ -S $SOCKETFILE ]; then
|
||||||
@@ -50,9 +50,9 @@ done
|
|||||||
|
|
||||||
sandbox_is_alive
|
sandbox_is_alive
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
echo "success!"
|
echo "OK"
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "failed."
|
echo "FAILED"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@@ -23,7 +23,7 @@ sandbox_is_alive() {
|
|||||||
|
|
||||||
exit_status=0
|
exit_status=0
|
||||||
|
|
||||||
echo -n "Stopping Maatkit sandbox PORT... "
|
echo -n "Stopping MySQL test server on port PORT... "
|
||||||
|
|
||||||
sandbox_is_alive
|
sandbox_is_alive
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
@@ -32,9 +32,9 @@ if [ $? -eq 1 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $exit_status -eq 0 ]; then
|
if [ $exit_status -eq 0 ]; then
|
||||||
echo "done."
|
echo "OK"
|
||||||
else
|
else
|
||||||
echo "failed!"
|
echo "FAILED"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit $exit_status
|
exit $exit_status
|
||||||
|
@@ -106,7 +106,7 @@ if [ -z "$PERCONA_TOOLKIT_BRANCH" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "$PERCONA_TOOLKIT_BRANCH" ]; then
|
if [ ! -d "$PERCONA_TOOLKIT_BRANCH" ]; then
|
||||||
err "Invalid Maakit trunk directory: $PERCONA_TOOLKIT_BRANCH"
|
err "Invalid PERCONA_TOOLKIT_BRANCH directory: $PERCONA_TOOLKIT_BRANCH"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
110
sandbox/test-env
110
sandbox/test-env
@@ -1,58 +1,40 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# This script controls the Maatkit test environment. The mk test env is
|
# This script controls the Percona Toolkit test environment. The basic
|
||||||
# a master-slave pair on ports 12345 and 12346, running from respective
|
# environment is a master on port 12345 in /tmp/12345 and a slave on port
|
||||||
# directories in /tmp. This script attempts to ensure that all environment
|
# 12346 in /tmp/12346. This script attempts to ensure that all environment
|
||||||
# vars like PERCONA_TOOLKIT_BRANCH and PERCONA_TOOLKIT_SANDBOX are correct. The
|
# vars like PERCONA_TOOLKIT_BRANCH and PERCONA_TOOLKIT_SANDBOX are correct.
|
||||||
# exit status is 0 on success and 1 on any failure. There's no option to
|
# Exist 0 on success/no errors, or 1 on any warnings or errors.
|
||||||
# disable output, so just >/dev/null if you only care about the exit status.
|
|
||||||
|
|
||||||
_d() {
|
|
||||||
if [ -z "$MKDEBUG" ]; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Is there a way to echo directly to STDERR?
|
|
||||||
# This is my hackish way.
|
|
||||||
for msg; do
|
|
||||||
echo "$msg" 1>/dev/null 1>&2
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
err() {
|
err() {
|
||||||
echo
|
echo
|
||||||
for msg; do
|
for msg; do
|
||||||
echo "$msg"
|
echo "$msg"
|
||||||
done
|
done
|
||||||
echo "See http://code.google.com/p/maatkit/wiki/Testing for more information."
|
|
||||||
echo
|
|
||||||
}
|
}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
err "Usage: mk-test-env start|stop|restart|status|checkconfig|reset|kill" \
|
err "Usage: test-env start|stop|restart|status|checkconfig|reset|kill" \
|
||||||
"" \
|
"" \
|
||||||
" start Start Maatkit test environment (mk test env)" \
|
" start Start test servers in /tmp/PORT" \
|
||||||
" stop Stop and remove mk test env" \
|
" stop Stop test servers and remvoe all /tmp/PORT" \
|
||||||
" restart Stop and start mk test env" \
|
" kill Kill test servers (use if stop fails)" \
|
||||||
" status Check and display status of mk test env" \
|
" restart Stop and start test servers" \
|
||||||
" checkconfig Check and display configuration of mk test env" \
|
" status Print status of test servers" \
|
||||||
" reset Reset mk test env master/slave bin logs" \
|
" checkconfig Check test env and test servers" \
|
||||||
" kill Kill mk test env (use if stop fails)" \
|
" reset Reset test server binary logs" \
|
||||||
|
" version Print MySQL version of running test servers" \
|
||||||
""
|
""
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql_basedir_ok() {
|
mysql_basedir_ok() {
|
||||||
local basedir=$1
|
local basedir=$1
|
||||||
_d "basedir=$basedir"
|
|
||||||
if [ ! -d "$basedir" ] || [ ! -d "$basedir/bin" ]; then
|
if [ ! -d "$basedir" ] || [ ! -d "$basedir/bin" ]; then
|
||||||
_d "basedir invalid"
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
if [ ! -x "$basedir/bin/mysqld_safe" ]; then
|
if [ ! -x "$basedir/bin/mysqld_safe" ]; then
|
||||||
_d "$basedir/bin/mysqld_safe doesn't exist"
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
_d "basedir ok"
|
|
||||||
return 1 # basedir is ok
|
return 1 # basedir is ok
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,14 +44,11 @@ set_mysql_basedir() {
|
|||||||
BASEDIR_AUTO_DETECTED=1
|
BASEDIR_AUTO_DETECTED=1
|
||||||
mysqld=`which mysqld 2>/dev/null`
|
mysqld=`which mysqld 2>/dev/null`
|
||||||
if [ -n "$mysqld" ]; then
|
if [ -n "$mysqld" ]; then
|
||||||
_d "Found mysqld: $mysqld"
|
|
||||||
PERCONA_TOOLKIT_SANDBOX=`$mysqld --verbose --help 2>/dev/null | grep 'basedir ' | awk '{print $2}'`
|
PERCONA_TOOLKIT_SANDBOX=`$mysqld --verbose --help 2>/dev/null | grep 'basedir ' | awk '{print $2}'`
|
||||||
if [ -z "$PERCONA_TOOLKIT_SANDBOX" ]; then
|
if [ -z "$PERCONA_TOOLKIT_SANDBOX" ]; then
|
||||||
_d "$mysqld --verbose --help | grep | ask failed"
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
_d "Could not find mysqld"
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -132,14 +111,13 @@ sandbox_status() {
|
|||||||
local master_port=$3
|
local master_port=$3
|
||||||
local status=0 # sandbox is ok, no problems
|
local status=0 # sandbox is ok, no problems
|
||||||
|
|
||||||
echo "Maatkit sandbox $type $port:"
|
echo "MySQL $type test server on port $port:"
|
||||||
|
|
||||||
echo -n " PID file exists - "
|
echo -n " PID file exists - "
|
||||||
if [ -f "/tmp/$port/data/mysql_sandbox$port.pid" ]; then
|
if [ -f "/tmp/$port/data/mysql_sandbox$port.pid" ]; then
|
||||||
echo "yes"
|
echo "yes"
|
||||||
echo -n " PID file has a PID - "
|
echo -n " PID file has a PID - "
|
||||||
local pid=`cat /tmp/$port/data/mysql_sandbox$port.pid 2>/dev/null`
|
local pid=`cat /tmp/$port/data/mysql_sandbox$port.pid 2>/dev/null`
|
||||||
_d "$type $port PID: $pid"
|
|
||||||
if [ -n "$pid" ]; then
|
if [ -n "$pid" ]; then
|
||||||
echo "yes"
|
echo "yes"
|
||||||
echo -n " process $pid is alive - "
|
echo -n " process $pid is alive - "
|
||||||
@@ -208,7 +186,7 @@ sandbox_status() {
|
|||||||
|
|
||||||
sandbox_is_running() {
|
sandbox_is_running() {
|
||||||
local p=$1
|
local p=$1
|
||||||
ps axw | grep mysqld | grep /tmp/$p >/dev/null
|
ps axw | grep mysqld | grep -v grep | grep /tmp/$p >/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
kill_sandbox() {
|
kill_sandbox() {
|
||||||
@@ -237,13 +215,13 @@ kill_sandbox() {
|
|||||||
# Third and finaly check if the sandbox server is running.
|
# Third and finaly check if the sandbox server is running.
|
||||||
sandbox_is_running $p
|
sandbox_is_running $p
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
err "Failed to kill sandbox $p (PID $pid1, $pid2)"
|
err "Failed to kill MySQL test server on port $p (PID $pid1, $pid2)"
|
||||||
rmdir=0
|
rmdir=0
|
||||||
else
|
else
|
||||||
echo "Killed sandbox $p (PID $pid1, $pid2)"
|
echo "Killed MySQL test server on port $p (PID $pid1, $pid2)"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Killed sandbox $p"
|
echo "Killed MySQL test server on port $p"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -255,12 +233,10 @@ kill_sandbox() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
print_sandbox_version() {
|
MYSQL_VERSION=""
|
||||||
if [ -n "$1" ]; then
|
set_mysql_version() {
|
||||||
echo -n "Maatkit sandboxes running MySQL version "
|
|
||||||
fi
|
|
||||||
if [ -d /tmp/12345 ] && [ -f /tmp/12345/use ]; then
|
if [ -d /tmp/12345 ] && [ -f /tmp/12345/use ]; then
|
||||||
/tmp/12345/use -N -e "select version()" | head -n 2 | tail -n 1 | cut -d'.' -f1,2
|
MYSQL_VERSION=$(/tmp/12345/use -N -e "select version()" | head -n 2 | tail -n 1 | cut -d'.' -f1,2)
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -280,12 +256,9 @@ opt=$1
|
|||||||
|
|
||||||
exit_status=0
|
exit_status=0
|
||||||
|
|
||||||
# Print some debug info about this run.
|
|
||||||
_d "" "`date`" "cwd: `pwd`" "`env | grep PATH`" "$0 $*"
|
|
||||||
|
|
||||||
if [ $opt = 'checkconfig' ]; then
|
if [ $opt = 'checkconfig' ]; then
|
||||||
checkconfig 1
|
checkconfig 1
|
||||||
echo -n "Maatkit test environment config is "
|
echo -n "Percona Toolkit test environment config is "
|
||||||
if [ $conf_err -eq 0 ]; then
|
if [ $conf_err -eq 0 ]; then
|
||||||
echo "ok!"
|
echo "ok!"
|
||||||
exit 0
|
exit 0
|
||||||
@@ -296,7 +269,7 @@ if [ $opt = 'checkconfig' ]; then
|
|||||||
else
|
else
|
||||||
checkconfig
|
checkconfig
|
||||||
if [ $conf_err -eq 1 ]; then
|
if [ $conf_err -eq 1 ]; then
|
||||||
err "The Maatkit test environment config is invalid." \
|
err "The Percona Toolkit test environment config is invalid." \
|
||||||
"Run '$0 checkconfig' to see the current configuration."
|
"Run '$0 checkconfig' to see the current configuration."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -307,7 +280,7 @@ fi
|
|||||||
# /usr/bin/mysqld Ver 5.1.34 for linux-gnu on x86_64 (MySQL Community Server)
|
# /usr/bin/mysqld Ver 5.1.34 for linux-gnu on x86_64 (MySQL Community Server)
|
||||||
version=`$mysqld -V | awk '{print $3}' | cut -d. -f 1,2`;
|
version=`$mysqld -V | awk '{print $3}' | cut -d. -f 1,2`;
|
||||||
if [ ! -d "$PERCONA_TOOLKIT_BRANCH/sandbox/servers/$version" ]; then
|
if [ ! -d "$PERCONA_TOOLKIT_BRANCH/sandbox/servers/$version" ]; then
|
||||||
err "Maatkit sandbox server version $version does not exists."
|
err "Percona Toolkit sandbox server version $version does not exists."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -321,31 +294,36 @@ case $opt in
|
|||||||
exit_status=$?
|
exit_status=$?
|
||||||
if [ "$version" != "4.0" ] && [ "$version" != "4.1" ]; then
|
if [ "$version" != "4.0" ] && [ "$version" != "4.1" ]; then
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "Loading sakila database..."
|
echo -n "Loading sakila database... "
|
||||||
./load-sakila-db 12345
|
./load-sakila-db 12345
|
||||||
exit_status=$?
|
exit_status=$?
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "FAILED"
|
||||||
|
else
|
||||||
|
echo "OK"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ $exit_status -eq 0 ]; then
|
if [ $exit_status -eq 0 ]; then
|
||||||
echo "Maatkit test environment started!"
|
set_mysql_version
|
||||||
|
echo "Percona Toolkit test environment started with MySQL v$MYSQL_VERSION."
|
||||||
else
|
else
|
||||||
# Stop but don't remove the sandboxes. The mysql error log
|
# Stop but don't remove the sandboxes. The mysql error log
|
||||||
# may say why MySQL failed to start.
|
# may say why MySQL failed to start.
|
||||||
./stop-sandbox all >/dev/null 2>&1
|
./stop-sandbox all >/dev/null 2>&1
|
||||||
err "There was an error starting the Maatkit test environment."
|
err "There was an error starting the Percona Toolkit test environment."
|
||||||
fi
|
fi
|
||||||
print_sandbox_version 1
|
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
cd $PERCONA_TOOLKIT_BRANCH/sandbox
|
cd $PERCONA_TOOLKIT_BRANCH/sandbox
|
||||||
./stop-sandbox remove all
|
./stop-sandbox remove all
|
||||||
exit_status=$?
|
exit_status=$?
|
||||||
if [ $exit_status -eq 0 ]; then
|
if [ $exit_status -eq 0 ]; then
|
||||||
echo "Maatkit test environment stopped."
|
echo "Percona Toolkit test environment stopped."
|
||||||
else
|
else
|
||||||
err "There was an error stopping the Maatkit test environment." \
|
err "There was an error stopping the Percona Toolkit test environment." \
|
||||||
"The Maatkit sandboxes may still be running."
|
"The MySQL test servers may still be running."
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
kill)
|
kill)
|
||||||
@@ -364,7 +342,7 @@ case $opt in
|
|||||||
master_status=$?
|
master_status=$?
|
||||||
sandbox_status 'slave' '12346' '12345'
|
sandbox_status 'slave' '12346' '12345'
|
||||||
slave_status=$?
|
slave_status=$?
|
||||||
echo -n "Maaktit test environment is "
|
echo -n "Percona Test test environment is "
|
||||||
if [ $master_status -eq 0 ] && [ $slave_status -eq 0 ]; then
|
if [ $master_status -eq 0 ] && [ $slave_status -eq 0 ]; then
|
||||||
echo "ok!"
|
echo "ok!"
|
||||||
else
|
else
|
||||||
@@ -373,9 +351,10 @@ case $opt in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
reset)
|
reset)
|
||||||
# This resets the master and slave relay logs. It's used in
|
# Several tests reset the bin logs so that queries from prior tests
|
||||||
# mk-table-sync/t/110_replicate_do_db.t. It's not checked;
|
# don't replicate to new sandbox servers. This makes creating new
|
||||||
# user beware.
|
# sandbox servers a lot faster. There's no check if this works or
|
||||||
|
# not, so... yeah.
|
||||||
/tmp/12345/use -e "RESET MASTER"
|
/tmp/12345/use -e "RESET MASTER"
|
||||||
/tmp/12346/use -e "RESET MASTER"
|
/tmp/12346/use -e "RESET MASTER"
|
||||||
/tmp/12346/use -e "STOP SLAVE"
|
/tmp/12346/use -e "STOP SLAVE"
|
||||||
@@ -384,7 +363,8 @@ case $opt in
|
|||||||
exit_status=0
|
exit_status=0
|
||||||
;;
|
;;
|
||||||
version)
|
version)
|
||||||
print_sandbox_version
|
set_mysql_version
|
||||||
|
echo $MYSQL_VERSION
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage
|
usage
|
||||||
|
@@ -1,9 +1,12 @@
|
|||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
# This pseudo-script is for developers to see if their box has all
|
# This pseudo-script is for developers to see if their box has all
|
||||||
# the modules necessary for testing Maatkit. Any missing modules
|
# the modules necessary for testing Percona Toolkit. Any missing
|
||||||
# will cause an error like "Can't locate Foo.pm in @INC ...". Else
|
# modules will cause an error like "Can't locate Foo.pm in @INC ...".
|
||||||
# the version for each module used by this script will be printed.
|
# Else the version for each module used by this script will be printed.
|
||||||
|
#
|
||||||
|
# In addition to these modules, many non-standard programs are needed
|
||||||
|
# for other tasks, like building packages, writing test coverage, etc.
|
||||||
|
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
use DBD::mysql;
|
use DBD::mysql;
|
||||||
|
@@ -209,13 +209,9 @@ sub check_module_usage {
|
|||||||
my $module = $_;
|
my $module = $_;
|
||||||
my $unused = 0;
|
my $unused = 0;
|
||||||
if ( $not_obj{$module} ) {
|
if ( $not_obj{$module} ) {
|
||||||
# MaatkitCommon::_d
|
|
||||||
chomp(my $g = `grep -c '${_}::' $tool_file`);
|
|
||||||
# Transformers->import
|
# Transformers->import
|
||||||
chomp(my $i = `grep -c '${_}->import' $tool_file`);
|
chomp(my $i = `grep -c '${_}->import' $tool_file`);
|
||||||
$g ||= 0;
|
$unused = 1 unless $i;
|
||||||
$i ||= 0;
|
|
||||||
$unused = 1 if $g + $i == 0;
|
|
||||||
}
|
}
|
||||||
elsif ( $dynamic{$tool_name}->{$module} ) {
|
elsif ( $dynamic{$tool_name}->{$module} ) {
|
||||||
# Can't detect these.
|
# Can't detect these.
|
||||||
|
Reference in New Issue
Block a user