blob: 615b54769367f592897c34cb1cb6feead007c4ef [file] [log] [blame]
Shuo-Peng Liaob69ac572020-09-28 17:29:31 +08001#!/bin/bash
2#
3# Installs Wi-Fi Test Suite Linux Control Agent to the specified DUT.
4
5if [[ $# -eq 0 || $1 == "--help" || $1 == "-h" ]]; then
6 echo "Install wfa_ca and wfa_dut to the DUT."
7 echo "Usage: ./install.sh \$DUT_HOST"
8 exit 0
9fi
10
Shuo-Peng Liaob69ac572020-09-28 17:29:31 +080011DUT_HOST=$1
Shuo-Peng Liaoafe5b182020-10-27 16:14:39 +080012WFA_BIN=/usr/local/bin
13WFA_LIBEXE=/usr/local/libexe/wfa
Shuo-Peng Liaob69ac572020-09-28 17:29:31 +080014
15# Load run_dut and deploy_dut functions.
16MY_DIR=$( dirname "${BASH_SOURCE[0]}" )
17source $MY_DIR/dut.sh
18
19# Change working directory to the base dir of the package.
20cd $MY_DIR/..
21
22echo "Stopping existing wfa_ca and wfa_dut on $DUT_HOST"
Shuo-Peng Liaoafe5b182020-10-27 16:14:39 +080023deploy bin/stop_wfa_ca_dut $WFA_BIN
24run_dut stop_wfa_ca_dut
Shuo-Peng Liaob69ac572020-09-28 17:29:31 +080025
Shuo-Peng Liaoafe5b182020-10-27 16:14:39 +080026echo "Deploying wfa_ca, wfa_dut and start/stop scripts to $DUT_HOST:$WFA_BIN"
27deploy bin/* $WFA_BIN
28
29echo "Deploying helper scripts to $DUT_HOST:$WFA_LIBEXE"
30run_dut mkdir -p $WFA_LIBEXE
31deploy scripts/* $WFA_LIBEXE