Commit 3aa0e440 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(lyskomd_start): Run the test suite in the build directory. Look for

	files relative to $srcdir or top_srcdir so that they are found
	properly.
(aux_item_default_conf_file): Use $top_srcdir to get a full path.
parent c765344e
......@@ -23,7 +23,7 @@ set maxint 2147483647
set clientport 53262
set muxport 53263
set aux_item_default_conf_file "../../../run-support/aux-items.conf"
set aux_item_default_conf_file "$top_srcdir/run-support/aux-items.conf"
# Fix the tty settings for minimum impact on the data flow.
set stty_init "-echo -onlcr -ocrnl -istrip"
......@@ -172,8 +172,7 @@ proc unanchored_expect {regex testname} {
unset test
}
proc lyskomd_start {{aux_item_conf_file "" }
{extra_config ""}} {
proc lyskomd_start {{aux_item_conf_file ""} {extra_config ""}} {
global spawn_id
global server_id
global test
......@@ -187,9 +186,12 @@ proc lyskomd_start {{aux_item_conf_file "" }
global muxport
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
......@@ -198,22 +200,18 @@ proc lyskomd_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"
puts $cf "Mux port: $muxport"
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"
puts $cf $extra_config
close $cf
set pid [spawn ../lyskomd -d $srcdir/config/lyskomd-config]
set pid [spawn ../lyskomd -d config/lyskomd-config]
set lyskomd_pid $pid
set server_id $spawn_id
......
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