Commit 15ec465e authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(timeout): Don't alter the default value. Not every computer is fast

	computer.
(lyskomd_start): The aux-item config file is found relative to
	$srcdir, not [pwd].  The config/lyskomd-config file is found
	relative to the current working directory.
(lyskomd_fail_start): Likewise.  Find the database files relative
	to top_srcdir.
parent 632eaf39
......@@ -6,7 +6,7 @@ set attach 0
set efence 0
# Set the timeout value to something small for quicker testing
set timeout 5
# set timeout 5
# Some useful constants.
set nl "\r?\n"
......@@ -192,10 +192,11 @@ proc unanchored_expect {regex testname} {
unset test
}
proc lyskomd_start {{aux_item_conf_file "" }
{extra_config ""}
{base_config ""}
{args ""}} {
proc lyskomd_start {{aux_item_conf_file ""} \
{extra_config ""} \
{base_config ""} \
{args ""}} {
global spawn_id
global server_id
global test
......@@ -236,7 +237,7 @@ proc lyskomd_start {{aux_item_conf_file "" }
if { [regexp -nocase "Max texts" $extra_config] == 0 } {
puts $cf "Max texts: 2000"
}
puts $cf "Aux-item definition file: [pwd]/$aux_item_conf_file"
puts $cf "Aux-item definition file: $aux_item_conf_file"
} else {
puts $cf $base_config
}
......@@ -244,7 +245,7 @@ proc lyskomd_start {{aux_item_conf_file "" }
close $cf
if { $args == "" } {
set pid [spawn ../lyskomd -d $srcdir/config/lyskomd-config]
set pid [spawn ../lyskomd -d config/lyskomd-config]
} else {
set pid [spawn ../lyskomd $args]
}
......@@ -301,9 +302,12 @@ proc lyskomd_fail_start {{aux_item_conf_file "" }
global clientport
global aux_item_default_conf_file
global lyskomd_pid
global top_srcdir
if { $aux_item_conf_file == "" } {
set aux_item_conf_file $aux_item_default_conf_file
} else {
set aux_item_conf_file $srcdir/$aux_item_conf_file
}
# Check that we are in in the correct directory before removing
......@@ -312,20 +316,16 @@ proc lyskomd_fail_start {{aux_item_conf_file "" }
close $f
system "rm -rf db etc"
system "mkdir db etc"
system "cp $srcdir/../../../db-crypt/db/lyskomd-data db/"
system "cp $srcdir/../../../db-crypt/db/lyskomd-texts db/"
set cf [open "$srcdir/config/lyskomd-config" "w"]
set cwd [pwd]
cd $srcdir
set wd [pwd]
cd $cwd
system "cp $top_srcdir/db-crypt/db/lyskomd-data db/"
system "cp $top_srcdir/db-crypt/db/lyskomd-texts db/"
set cf [open "config/lyskomd-config" "w"]
puts $cf "Client port: $clientport"
if { $base_config == "" } {
puts $cf "Max conferences: 2000"
puts $cf "Max texts: 2000"
puts $cf "Prefix: $wd"
puts $cf "Aux-item definition file: $wd/$aux_item_conf_file"
puts $cf "Prefix: [pwd]"
puts $cf "Aux-item definition file: $aux_item_conf_file"
} else {
puts $cf $base_config
}
......@@ -333,9 +333,9 @@ proc lyskomd_fail_start {{aux_item_conf_file "" }
close $cf
if { $args == "" } {
set pid [spawn ../lyskomd -d $srcdir/config/lyskomd-config]
set pid [spawn ../lyskomd -d config/lyskomd-config]
} else {
set pid [spawn ../lyskomd -d $args]
set pid [spawn ../lyskomd $args]
}
set lyskomd_pid $pid
......
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