Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
add78ea6
Commit
add78ea6
authored
Aug 24, 2001
by
Leigh B. Stoller
Browse files
Add TESTMODE test to make sure we do not console_setup nodes!
parent
e2ed8a1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
db/nalloc.in
View file @
add78ea6
...
...
@@ -8,8 +8,9 @@ my $d = 0;
#
# Configure variables
#
my
$TB
=
"
@prefix
@
";
my
$DBNAME
=
"
@TBDBNAME
@
";
my
$TB
=
"
@prefix
@
";
my
$DBNAME
=
"
@TBDBNAME
@
";
my
$TESTMODE
=
@TESTMODE@
;
my
$dbh
=
Mysql
->
connect
("
localhost
",
$DBNAME
,"
script
","
none
");
...
...
@@ -101,7 +102,7 @@ $cmd = "unlock tables";
$sth
=
$dbh
->
query
(
$cmd
)
||
die
("
Locking error:
\n
$cmd
\n
Error string is:
"
.
$dbh
->
errstr
.
"
\n
");
if
(
!
$error
&&
@nodes
)
{
if
(
!
$TESTMODE
&&
!
$error
&&
@nodes
)
{
my
@conlist
=
();
my
@sharks
=
();
...
...
db/nfree.in
View file @
add78ea6
...
...
@@ -4,8 +4,9 @@ use Mysql;
#
# Configure variables
#
my
$TB
=
"
@prefix
@
";
my
$DBNAME
=
"
@TBDBNAME
@
";
my
$TB
=
"
@prefix
@
";
my
$DBNAME
=
"
@TBDBNAME
@
";
my
$TESTMODE
=
@TESTMODE@
;
my
$dbh
=
Mysql
->
connect
("
localhost
",
$DBNAME
,"
script
","
none
");
...
...
@@ -236,7 +237,7 @@ if ( (@reloaded > 0) || (keys %reserves > 0) ) {
||
die
("
Locking error:
\n
$cmd
\n
Error string is:
"
.
$dbh
->
errstr
.
"
\n
");
}
if
(
@freed_nodes
)
{
if
(
!
$TESTMODE
&&
@freed_nodes
)
{
my
@conlist
=
();
my
@sharks
=
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment