blob: 17cfa7e734d5b84e38efa1d1b636bd2d6e4f08a1 [file] [log] [blame]
#!/bin/sh
# Copyright (C) 2022 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
## script to install media stress test files manually
adbOptions=" "
resLabel=CtsMediaStressTestCases-1.0
srcDir="/tmp/$resLabel"
tgtDir="/sdcard/test"
usage="Usage: $0 [-h] [-s serial]"
if [ $# -gt 0 ]; then
if [ "$1" = "-h" ]; then
echo $usage
exit 1
elif [ "$1" = "-s" -a "$2" != "" ] ; then
adbOptions=""$1" "$2""
else
echo "bad options"
echo $usage
exit 1
fi
fi
## download resources if not already done
if [ ! -f "/tmp/$resLabel.zip" ]; then
wget "https://dl.google.com/android/xts/cts/tests/tests/mediastress/$resLabel.zip" -O /tmp/$resLabel.zip
fi
unzip -qo "/tmp/$resLabel" -d $srcDir
## install on target device
echo "adb $adbOptions push $srcDir $tgtDir"
adb $adbOptions shell mkdir -p $tgtDir
adb $adbOptions push $srcDir/. $tgtDir