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 ...@@ -23,7 +23,7 @@ set maxint 2147483647
set clientport 53262 set clientport 53262
set muxport 53263 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. # Fix the tty settings for minimum impact on the data flow.
set stty_init "-echo -onlcr -ocrnl -istrip" set stty_init "-echo -onlcr -ocrnl -istrip"
...@@ -172,8 +172,7 @@ proc unanchored_expect {regex testname} { ...@@ -172,8 +172,7 @@ proc unanchored_expect {regex testname} {
unset test unset test
} }
proc lyskomd_start {{aux_item_conf_file "" } proc lyskomd_start {{aux_item_conf_file ""} {extra_config ""}} {
{extra_config ""}} {
global spawn_id global spawn_id
global server_id global server_id
global test global test
...@@ -187,9 +186,12 @@ proc lyskomd_start {{aux_item_conf_file "" } ...@@ -187,9 +186,12 @@ proc lyskomd_start {{aux_item_conf_file "" }
global muxport global muxport
global aux_item_default_conf_file global aux_item_default_conf_file
global lyskomd_pid global lyskomd_pid
global top_srcdir
if { $aux_item_conf_file == "" } { if { $aux_item_conf_file == "" } {
set aux_item_conf_file $aux_item_default_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 # Check that we are in in the correct directory before removing
...@@ -198,22 +200,18 @@ proc lyskomd_start {{aux_item_conf_file "" } ...@@ -198,22 +200,18 @@ proc lyskomd_start {{aux_item_conf_file "" }
close $f close $f
system "rm -rf db etc" system "rm -rf db etc"
system "mkdir db etc" system "mkdir db etc"
system "cp $srcdir/../../../db-crypt/db/lyskomd-data db/" system "cp $top_srcdir/db-crypt/db/lyskomd-data db/"
system "cp $srcdir/../../../db-crypt/db/lyskomd-texts db/" system "cp $top_srcdir/db-crypt/db/lyskomd-texts db/"
set cf [open "$srcdir/config/lyskomd-config" "w"] set cf [open "config/lyskomd-config" "w"]
set cwd [pwd]
cd $srcdir
set wd [pwd]
cd $cwd
puts $cf "Client port: $clientport" puts $cf "Client port: $clientport"
puts $cf "Mux port: $muxport" puts $cf "Mux port: $muxport"
puts $cf "Prefix: $wd" puts $cf "Prefix: [pwd]"
puts $cf "Aux-item definition file: $wd/$aux_item_conf_file" puts $cf "Aux-item definition file: $aux_item_conf_file"
puts $cf $extra_config puts $cf $extra_config
close $cf close $cf
set pid [spawn ../lyskomd -d $srcdir/config/lyskomd-config] set pid [spawn ../lyskomd -d config/lyskomd-config]
set lyskomd_pid $pid set lyskomd_pid $pid
set server_id $spawn_id set server_id $spawn_id
......
Supports Markdown
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