summaryrefslogtreecommitdiff
path: root/yarns/morph.shell-lib
diff options
context:
space:
mode:
Diffstat (limited to 'yarns/morph.shell-lib')
-rw-r--r--yarns/morph.shell-lib18
1 files changed, 11 insertions, 7 deletions
diff --git a/yarns/morph.shell-lib b/yarns/morph.shell-lib
index d9c9eff6..c5de80df 100644
--- a/yarns/morph.shell-lib
+++ b/yarns/morph.shell-lib
@@ -3,7 +3,7 @@
# The shell functions in this library are meant to make writing IMPLEMENTS
# sections for yarn scenario tests easier.
-# Copyright (C) 2013-2014 Codethink Limited
+# Copyright (C) 2013-2015 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -189,15 +189,19 @@ slashify_colons()
echo "$1" | sed s,:,/,g
}
-start_cache_server(){
+start_distbuild(){
mkfifo "$1"
start-stop-daemon --start --pidfile="$2" \
--background --make-pidfile --verbose \
- --startas="$SRCDIR/morph-cache-server" -- \
- --port-file="$1" --no-fcgi \
- --repo-dir="$DATADIR/gits" --direct-mode \
- --bundle-dir="$DATADIR/bundles" \
- --artifact-dir="$3" "$@"
+ --startas="$SRCDIR/scripts/distbuild" -- \
+ run \
+ --port-file="$1" \
+ --datadir="$DATADIR/distbuild" \
+ --morph-instance="$3" "$@"
+
+ # Wait for the process to be ready by watching the FIFO. Beware that if the
+ # process doesn't start fully (maybe it crashes or exists with an error)
+ # then this will hang forever.
port="$(cat "$1")"
rm "$1"
echo "$port" >"$1"