Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/bin/bash | |
| 2 | |
| 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | |
| 4 # Use of this source code is governed by a BSD-style license that can be | |
| 5 # found in the LICENSE file. | |
| 6 | |
| 7 # Run remote access test to ensure ssh access to a host is working. Exits with | |
| 8 # a code of 0 if successful and non-zero otherwise. Used by test infrastructure | |
| 9 # scripts. | |
| 10 | |
| 11 . "$(dirname "$0")/common.sh" | |
| 12 . "$(dirname "$0")/remote_access.sh" | |
| 13 | |
| 14 function cleanup { | |
| 15 cleanup_remote_access | |
| 16 rm -rf "${TMP}" | |
| 17 } | |
| 18 | |
| 19 function main() { | |
| 20 cd $(dirname "$0") | |
| 21 | |
| 22 FLAGS "$@" || exit 1 | |
| 23 eval set -- "${FLAGS_ARGV}" | |
| 24 | |
| 25 set -e | |
| 26 | |
| 27 trap cleanup EXIT | |
| 28 | |
| 29 TMP=$(mktemp -d /tmp/ssh_test.XXXX) | |
| 30 | |
| 31 remote_access_init | |
| 32 } | |
| 33 | |
| 34 main $@ | |
| OLD | NEW |