Aviv Keshet | f81b438 | 2013-04-26 14:30:47 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Copyright (c) 2013 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 | SCR="/mnt/host/source/src/third_party/autotest/files/site_utils/test_that.py" |
| 8 | |
| 9 | if [ ! -f $SCR ]; then |
| 10 | echo "You appear to have a minilayout checkout, without autotest and" |
| 11 | echo "test_that.py available in your source tree. Aborting." |
| 12 | exit 1 |
| 13 | fi |
| 14 | |
Aviv Keshet | a9fc852 | 2013-06-13 14:32:01 -0700 | [diff] [blame^] | 15 | trap : SIGTERM SIGINT |
| 16 | |
| 17 | sudo $SCR $@ & |
| 18 | child_pid=$! |
| 19 | wait $child_pid |
| 20 | |
| 21 | if [[ $? -gt 128 ]] |
| 22 | then |
| 23 | sudo kill $child_pid |
| 24 | wait $child_pid |
| 25 | fi |