mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 17:33:09 -06:00
Move TEST_SUITE to only be in travis-test.sh
This commit is contained in:
parent
fad7c568be
commit
ee520cd3f5
|
|
@ -7,23 +7,17 @@ set -eu
|
||||||
export GOPATH="$(pwd):$(pwd)/vendor"
|
export GOPATH="$(pwd):$(pwd)/vendor"
|
||||||
export PATH="$PATH:$(pwd)/vendor/bin:$(pwd)/bin"
|
export PATH="$PATH:$(pwd)/vendor/bin:$(pwd)/bin"
|
||||||
|
|
||||||
if [ "${TEST_SUITE-}" != "lint" ]; then
|
echo "Checking that it builds"
|
||||||
echo "Checking that it builds"
|
gb build
|
||||||
gb build
|
|
||||||
|
|
||||||
# Check that all the packages can build.
|
# Check that all the packages can build.
|
||||||
# When `go build` is given multiple packages it won't output anything, and just
|
# When `go build` is given multiple packages it won't output anything, and just
|
||||||
# checks that everything builds. This seems to do a better job of handling
|
# checks that everything builds. This seems to do a better job of handling
|
||||||
# missing imports than `gb build` does.
|
# missing imports than `gb build` does.
|
||||||
echo "Double checking it builds..."
|
echo "Double checking it builds..."
|
||||||
go build github.com/matrix-org/dendrite/cmd/...
|
go build github.com/matrix-org/dendrite/cmd/...
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${TEST_SUITE-lint}" == "lint" ]; then
|
./scripts/find-lint.sh
|
||||||
./scripts/find-lint.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${TEST_SUITE-unit-test}" == "unit-test" ]; then
|
echo "Testing..."
|
||||||
echo "Testing..."
|
gb test
|
||||||
gb test
|
|
||||||
fi
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
# The entry point for travis tests
|
# The entry point for travis tests
|
||||||
|
#
|
||||||
|
# TEST_SUITE env var can be set to "lint", "unit-test" or "integ-test", in
|
||||||
|
# which case only the linting, unit tests or integration tests will be run
|
||||||
|
# respectively. If not specified or null all tests are run.
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
|
@ -8,8 +12,26 @@ set -eu
|
||||||
export GOGC=400
|
export GOGC=400
|
||||||
export DENDRITE_LINT_DISABLE_GC=1
|
export DENDRITE_LINT_DISABLE_GC=1
|
||||||
|
|
||||||
# We don't bother to build if we're only checking the linting
|
export GOPATH="$(pwd):$(pwd)/vendor"
|
||||||
if [ "${TEST_SUITE-}" != "lint" ]; then
|
export PATH="$PATH:$(pwd)/vendor/bin:$(pwd)/bin"
|
||||||
|
|
||||||
|
if [ "${TEST_SUITE:-lint}" == "lint" ]; then
|
||||||
|
./scripts/find-lint.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${TEST_SUITE:-unit-test}" == "unit-test" ]; then
|
||||||
|
gb test
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${TEST_SUITE:-integ-test}" == "integ-test" ]; then
|
||||||
|
gb build
|
||||||
|
|
||||||
|
# Check that all the packages can build.
|
||||||
|
# When `go build` is given multiple packages it won't output anything, and just
|
||||||
|
# checks that everything builds. This seems to do a better job of handling
|
||||||
|
# missing imports than `gb build` does.
|
||||||
|
go build github.com/matrix-org/dendrite/cmd/...
|
||||||
|
|
||||||
# Check that the servers build (this is done explicitly because `gb build` can silently fail (exit 0) and then we'd test a stale binary)
|
# Check that the servers build (this is done explicitly because `gb build` can silently fail (exit 0) and then we'd test a stale binary)
|
||||||
gb build github.com/matrix-org/dendrite/cmd/dendrite-room-server
|
gb build github.com/matrix-org/dendrite/cmd/dendrite-room-server
|
||||||
gb build github.com/matrix-org/dendrite/cmd/roomserver-integration-tests
|
gb build github.com/matrix-org/dendrite/cmd/roomserver-integration-tests
|
||||||
|
|
@ -19,12 +41,7 @@ if [ "${TEST_SUITE-}" != "lint" ]; then
|
||||||
gb build github.com/matrix-org/dendrite/cmd/dendrite-media-api-server
|
gb build github.com/matrix-org/dendrite/cmd/dendrite-media-api-server
|
||||||
gb build github.com/matrix-org/dendrite/cmd/mediaapi-integration-tests
|
gb build github.com/matrix-org/dendrite/cmd/mediaapi-integration-tests
|
||||||
gb build github.com/matrix-org/dendrite/cmd/client-api-proxy
|
gb build github.com/matrix-org/dendrite/cmd/client-api-proxy
|
||||||
fi
|
|
||||||
|
|
||||||
# Run unit tests and linters
|
|
||||||
./scripts/build-test-lint.sh
|
|
||||||
|
|
||||||
if [ "${TEST_SUITE-integ-test}" == "integ-test" ]; then
|
|
||||||
# Run the integration tests
|
# Run the integration tests
|
||||||
bin/roomserver-integration-tests
|
bin/roomserver-integration-tests
|
||||||
bin/syncserver-integration-tests
|
bin/syncserver-integration-tests
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue