Commit add78ea6 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Add TESTMODE test to make sure we do not console_setup nodes!

parent e2ed8a1c
...@@ -8,8 +8,9 @@ my $d = 0; ...@@ -8,8 +8,9 @@ my $d = 0;
# #
# Configure variables # Configure variables
# #
my $TB = "@prefix@"; my $TB = "@prefix@";
my $DBNAME = "@TBDBNAME@"; my $DBNAME = "@TBDBNAME@";
my $TESTMODE = @TESTMODE@;
my $dbh = Mysql->connect("localhost",$DBNAME,"script","none"); my $dbh = Mysql->connect("localhost",$DBNAME,"script","none");
...@@ -101,7 +102,7 @@ $cmd = "unlock tables"; ...@@ -101,7 +102,7 @@ $cmd = "unlock tables";
$sth = $dbh->query($cmd) $sth = $dbh->query($cmd)
|| die("Locking error:\n$cmd\nError string is:".$dbh->errstr."\n"); || die("Locking error:\n$cmd\nError string is:".$dbh->errstr."\n");
if (!$error && @nodes) { if (! $TESTMODE && !$error && @nodes) {
my @conlist=(); my @conlist=();
my @sharks=(); my @sharks=();
......
...@@ -4,8 +4,9 @@ use Mysql; ...@@ -4,8 +4,9 @@ use Mysql;
# #
# Configure variables # Configure variables
# #
my $TB = "@prefix@"; my $TB = "@prefix@";
my $DBNAME = "@TBDBNAME@"; my $DBNAME = "@TBDBNAME@";
my $TESTMODE = @TESTMODE@;
my $dbh = Mysql->connect("localhost",$DBNAME,"script","none"); my $dbh = Mysql->connect("localhost",$DBNAME,"script","none");
...@@ -236,7 +237,7 @@ if ( (@reloaded > 0) || (keys %reserves > 0) ) { ...@@ -236,7 +237,7 @@ if ( (@reloaded > 0) || (keys %reserves > 0) ) {
|| die("Locking error:\n$cmd\nError string is:".$dbh->errstr."\n"); || die("Locking error:\n$cmd\nError string is:".$dbh->errstr."\n");
} }
if (@freed_nodes) { if (!$TESTMODE && @freed_nodes) {
my @conlist=(); my @conlist=();
my @sharks=(); my @sharks=();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment