From 1fe40373e94025cebe5cac99ad2650cb13fa129a Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Fri, 1 May 2020 15:39:06 +0100 Subject: [PATCH 1/4] Just build the monolith server when testing --- scripts/dendrite_sytest.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/dendrite_sytest.sh b/scripts/dendrite_sytest.sh index aecd09a8b..ac064f127 100755 --- a/scripts/dendrite_sytest.sh +++ b/scripts/dendrite_sytest.sh @@ -32,7 +32,9 @@ export POSTGRES_DB_2=pg2 # Build dendrite echo >&2 "--- Building dendrite from source" cd /src -./build.sh +# Put installed packages into ./bin +export GOBIN=$PWD/`dirname $0`/bin +go install ./cmd/dendrite-monolith-server cd - # Run the tests From d71637c7cc697cc568796755f71d67cc2b94cedb Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Fri, 1 May 2020 15:57:55 +0100 Subject: [PATCH 2/4] Better --- scripts/dendrite_sytest.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/dendrite_sytest.sh b/scripts/dendrite_sytest.sh index ac064f127..c39c6ce08 100755 --- a/scripts/dendrite_sytest.sh +++ b/scripts/dendrite_sytest.sh @@ -32,9 +32,7 @@ export POSTGRES_DB_2=pg2 # Build dendrite echo >&2 "--- Building dendrite from source" cd /src -# Put installed packages into ./bin -export GOBIN=$PWD/`dirname $0`/bin -go install ./cmd/dendrite-monolith-server +go build -o bin/dendrite-monolith-server cmd/dendrite-monolith-server cd - # Run the tests From a7a2f846caee9e1152fe452beb30ecdcc2d78483 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Fri, 1 May 2020 16:14:06 +0100 Subject: [PATCH 3/4] Maybe this time --- scripts/dendrite_sytest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dendrite_sytest.sh b/scripts/dendrite_sytest.sh index c39c6ce08..b2229a5c2 100755 --- a/scripts/dendrite_sytest.sh +++ b/scripts/dendrite_sytest.sh @@ -32,7 +32,7 @@ export POSTGRES_DB_2=pg2 # Build dendrite echo >&2 "--- Building dendrite from source" cd /src -go build -o bin/dendrite-monolith-server cmd/dendrite-monolith-server +go build -o bin/dendrite-monolith-server ./cmd/dendrite-monolith-server cd - # Run the tests From 36ae530d2c068d6cf3b31d59dc1dd2d6e9a0b210 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Mon, 4 May 2020 10:20:24 +0100 Subject: [PATCH 4/4] Fix build, don't build into source directory --- scripts/dendrite_sytest.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/dendrite_sytest.sh b/scripts/dendrite_sytest.sh index b2229a5c2..ae17d621f 100755 --- a/scripts/dendrite_sytest.sh +++ b/scripts/dendrite_sytest.sh @@ -9,7 +9,7 @@ set -ex cd /sytest -mkdir /work +mkdir -p /work # Make sure all Perl deps are installed -- this is done in the docker build so will only install packages added since the last Docker build ./install-deps.pl @@ -23,6 +23,7 @@ su -c 'for i in pg1 pg2 sytest_template; do psql -c "CREATE DATABASE $i;"; done' export PGUSER=postgres export POSTGRES_DB_1=pg1 export POSTGRES_DB_2=pg2 +export GOBIN=/tmp/bin # Write out the configuration for a PostgreSQL Dendrite # Note: Dendrite can run entirely within a single database as all of the tables have @@ -32,7 +33,9 @@ export POSTGRES_DB_2=pg2 # Build dendrite echo >&2 "--- Building dendrite from source" cd /src -go build -o bin/dendrite-monolith-server ./cmd/dendrite-monolith-server +mkdir -p $GOBIN +go install -v ./cmd/dendrite-monolith-server +go install -v ./cmd/generate-keys cd - # Run the tests @@ -40,7 +43,7 @@ echo >&2 "+++ Running tests" TEST_STATUS=0 mkdir -p /logs -./run-tests.pl -I Dendrite::Monolith -d /src/bin -W /src/sytest-whitelist -O tap --all \ +./run-tests.pl -I Dendrite::Monolith -d $GOBIN -W /src/sytest-whitelist -O tap --all \ --work-directory="/work" \ "$@" > /logs/results.tap || TEST_STATUS=$?