Install test_server.bin in well known location
This patch installs and uses test_server.bin from
/opt/octavia-tempest-plugin as a well known location on the
filesystem. This way tests, like grenade, that run the devstack
plugins once in /old paths, can find the binary when running from
/new paths.
Change-Id: Ia78f16fde026269dec01f4dceb202842ad12a557
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
index 4b8f60b..df0336e 100644
--- a/devstack/plugin.sh
+++ b/devstack/plugin.sh
@@ -16,9 +16,11 @@
fi
go_path=$(find $DEST/tempest/.tox/tempest/ -name test_server.go)
- bin_path=${go_path%.go}.bin
+ sudo mkdir -m755 -p /opt/octavia-tempest-plugin
+ sudo chown $STACK_USER /opt/octavia-tempest-plugin
CGO_ENABLED=0 GOOS=linux go build \
- -a -ldflags '-s -w -extldflags -static' -o $bin_path \
+ -a -ldflags '-s -w -extldflags -static' \
+ -o /opt/octavia-tempest-plugin/test_server.bin \
${DEST}/octavia-tempest-plugin/octavia_tempest_plugin/contrib/test_server/test_server.go
}