Shuo-Peng Liao | b69ac57 | 2020-09-28 17:29:31 +0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # Installs Wi-Fi Test Suite Linux Control Agent to the specified DUT. |
| 4 | |
| 5 | if [[ $# -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 |
| 9 | fi |
| 10 | |
Shuo-Peng Liao | b69ac57 | 2020-09-28 17:29:31 +0800 | [diff] [blame] | 11 | DUT_HOST=$1 |
Shuo-Peng Liao | afe5b18 | 2020-10-27 16:14:39 +0800 | [diff] [blame] | 12 | WFA_BIN=/usr/local/bin |
| 13 | WFA_LIBEXE=/usr/local/libexe/wfa |
Shuo-Peng Liao | b69ac57 | 2020-09-28 17:29:31 +0800 | [diff] [blame] | 14 | |
| 15 | # Load run_dut and deploy_dut functions. |
| 16 | MY_DIR=$( dirname "${BASH_SOURCE[0]}" ) |
| 17 | source $MY_DIR/dut.sh |
| 18 | |
| 19 | # Change working directory to the base dir of the package. |
| 20 | cd $MY_DIR/.. |
| 21 | |
| 22 | echo "Stopping existing wfa_ca and wfa_dut on $DUT_HOST" |
Shuo-Peng Liao | afe5b18 | 2020-10-27 16:14:39 +0800 | [diff] [blame] | 23 | deploy bin/stop_wfa_ca_dut $WFA_BIN |
| 24 | run_dut stop_wfa_ca_dut |
Shuo-Peng Liao | b69ac57 | 2020-09-28 17:29:31 +0800 | [diff] [blame] | 25 | |
Shuo-Peng Liao | afe5b18 | 2020-10-27 16:14:39 +0800 | [diff] [blame] | 26 | echo "Deploying wfa_ca, wfa_dut and start/stop scripts to $DUT_HOST:$WFA_BIN" |
| 27 | deploy bin/* $WFA_BIN |
| 28 | |
| 29 | echo "Deploying helper scripts to $DUT_HOST:$WFA_LIBEXE" |
| 30 | run_dut mkdir -p $WFA_LIBEXE |
| 31 | deploy scripts/* $WFA_LIBEXE |