summaryrefslogtreecommitdiffhomepage
path: root/test/scripts/build-manager.sh
blob: 60cf5da98cbc02d21cf6527ae1bf1882b8109db9 (plain)
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
#!/usr/bin/env bash

set -eu

# Build `test-manager`
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
TEST_FRAMEWORK_ROOT="$SCRIPT_DIR/.."
REPO_DIR="$TEST_FRAMEWORK_ROOT/.."

# shellcheck disable=SC1091
source "$REPO_DIR/scripts/utils/log"

build_linux() {
    cd "$TEST_FRAMEWORK_ROOT"
    # Build the test manager
    cargo build -p test-manager --release
}

case ${1-:""} in
    linux)
        build_linux
        shift
    ;;
    *)
        log_error "Invalid platform. Specify a valid platform as first argument"
        exit 1
esac