forked from decred/vspd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_tests.sh
executable file
·46 lines (38 loc) · 871 Bytes
/
run_tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
#
# Copyright (c) 2020-2024 The Decred developers
# Use of this source code is governed by an ISC
# license that can be found in the LICENSE file.
#
# Usage:
# ./run_tests.sh
set -e
go version
# This list needs to be updated if new submodules are added to the vspd repo.
submodules="client types"
# Test main module.
echo "==> test main module"
GORACE="halt_on_error=1" go test -race ./...
# Test all submodules in a subshell.
for module in $submodules
do
echo "==> test ${module}"
(
cd $module
GORACE="halt_on_error=1" go test -race .
)
done
# Lint main module.
echo "==> lint main module"
golangci-lint run
# Lint all submodules in a subshell.
for module in $submodules
do
echo "==> lint ${module}"
(
cd $module
golangci-lint run
)
done
echo "-----------------------------"
echo "Tests completed successfully!"