py-libp2p/tests_interop/go_pkgs/install_interop_go_pkgs.sh
mhchia 006002f687
Move interop tests out of tests
It is moved to the top level package `tests_interop`, to avoid circular
dependency, with the dependency moved to `tox`.
2019-09-23 22:00:40 +08:00

32 lines
682 B
Bash
Executable File

#!/bin/bash
SCRIPT_RELATIVE_PATH=`dirname $0`
GO_PKGS_PATH=$SCRIPT_RELATIVE_PATH
DAEMON_REPO=go-libp2p-daemon
DAEMON_PATH=$GO_PKGS_PATH/$DAEMON_REPO
EXAMPLES_PATHS=$GO_PKGS_PATH/examples
go version
# Install `p2pd`
# FIXME: Use the canonical repo in libp2p, when we don't need `insecure`.
if [ ! -e "$DAEMON_PATH" ]; then
git clone https://github.com/mhchia/$DAEMON_REPO.git --branch test/add-options $DAEMON_PATH
if [ "$?" != 0 ]; then
echo "Failed to clone the daemon repo"
exit 1
fi
fi
cd $DAEMON_PATH && go install ./...
cd -
# Install example modeuls
cd $EXAMPLES_PATHS && go install ./...
echo "Finish installing go modules for interop."