2014-02-13 10:42:52 -06:00
|
|
|
# Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
# file at the top-level directory of this distribution and at
|
|
|
|
# http://rust-lang.org/COPYRIGHT.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
# option. This file may not be copied, modified, or distributed
|
|
|
|
# except according to those terms.
|
|
|
|
#
|
|
|
|
# ignore-tidy-linelength
|
2013-05-29 19:36:53 -05:00
|
|
|
#
|
|
|
|
# usage : adb_run_wrapper [test dir - where test executables exist] [test executable]
|
|
|
|
#
|
2013-06-01 03:27:05 -05:00
|
|
|
|
2013-11-14 21:31:58 -06:00
|
|
|
TEST_PATH=$1
|
|
|
|
BIN_PATH=/system/bin
|
|
|
|
if [ -d "$TEST_PATH" ]
|
2013-05-29 02:04:11 -05:00
|
|
|
then
|
|
|
|
shift
|
2013-05-29 19:36:53 -05:00
|
|
|
RUN=$1
|
2013-05-29 02:04:11 -05:00
|
|
|
|
2013-05-29 19:36:53 -05:00
|
|
|
if [ ! -z "$RUN" ]
|
|
|
|
then
|
|
|
|
shift
|
2013-06-01 03:27:05 -05:00
|
|
|
|
2015-02-02 02:42:23 -06:00
|
|
|
# The length of binary path (i.e. ./$RUN) should be shorter than 128 characters.
|
2013-11-14 21:31:58 -06:00
|
|
|
cd $TEST_PATH
|
2015-02-02 02:42:23 -06:00
|
|
|
TEST_EXEC_ENV=22 LD_LIBRARY_PATH=$TEST_PATH PATH=$BIN_PATH:$TEST_PATH ./$RUN $@ 1>$TEST_PATH/$RUN.stdout 2>$TEST_PATH/$RUN.stderr
|
2014-02-13 23:19:06 -06:00
|
|
|
L_RET=$?
|
2013-06-13 16:59:34 -05:00
|
|
|
|
2013-11-14 21:31:58 -06:00
|
|
|
echo $L_RET > $TEST_PATH/$RUN.exitcode
|
2013-06-01 03:27:05 -05:00
|
|
|
|
2013-05-29 19:36:53 -05:00
|
|
|
fi
|
|
|
|
fi
|