Home | History | Annotate | Download | only in cts-media
      1 #!/bin/sh
      2 # Copyright (C) 2012 The Android Open Source Project
      3 #
      4 # Licensed under the Apache License, Version 2.0 (the "License");
      5 # you may not use this file except in compliance with the License.
      6 # You may obtain a copy of the License at
      7 #
      8 #      http://www.apache.org/licenses/LICENSE-2.0
      9 #
     10 # Unless required by applicable law or agreed to in writing, software
     11 # distributed under the License is distributed on an "AS IS" BASIS,
     12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13 # See the License for the specific language governing permissions and
     14 # limitations under the License.
     15 #
     16 adb_options=" "
     17 max_resolution=3
     18 if [ $# -eq 0 ]; then
     19   echo "assuming default resolution"
     20 elif [ "$1" = "-s" ]; then
     21   adb_options=""$1" "$2""
     22 elif [ "$1" = "720x480" ]; then
     23   max_resolution=1
     24 elif [ "$1" = "1280x720" ]; then
     25   max_resolution=2
     26 elif [ "$1" = "1920x1080" ]; then
     27   max_resolution=3
     28 elif [ "$1" = "all" ]; then
     29   max_resolution=3
     30 else
     31   echo "Usage: copy_media.sh [720x480|1280x720|1920x1080] [-s serial]"
     32   echo "  for testing up to 1280x720, copy_media.sh 1280x720"
     33   echo "  default resolution, when no argument is specified, is 1920x1080"
     34   echo "  copy_media.sh all will copy all the files."
     35   exit
     36 fi
     37 
     38 if [ $# -gt 2 ]; then
     39   echo "adb option exists"
     40   adb_options=""$2" "$3""
     41 fi
     42 
     43 echo "max resolution is $1"
     44 echo "adb options "$adb_options""
     45 
     46 if [ $max_resolution -ge 3 ]; then
     47   echo "copying 1920x1080"
     48   adb $adb_options push bbb_short/1920x1080 /sdcard/test/bbb_short/1920x1080
     49   adb $adb_options push bbb_full/1920x1080 /sdcard/test/bbb_full/1920x1080
     50 fi
     51 
     52 if [ $max_resolution -ge 2 ]; then
     53   echo "copying 1280x720"
     54   adb $adb_options push bbb_short/1280x720 /sdcard/test/bbb_short/1280x720
     55   adb $adb_options push bbb_full/1280x720 /sdcard/test/bbb_full/1280x720
     56 fi
     57 
     58 if [ $max_resolution -ge 1 ]; then
     59   echo "copying 720x480"
     60   adb $adb_options push bbb_short/720x480 /sdcard/test/bbb_short/720x480
     61   adb $adb_options push bbb_full/720x480 /sdcard/test/bbb_full/720x480
     62 fi
     63 
     64 echo "copying all others"
     65 adb $adb_options push bbb_short/176x144 /sdcard/test/bbb_short/176x144
     66 adb $adb_options push bbb_full/176x144 /sdcard/test/bbb_full/176x144
     67 adb $adb_options push bbb_short/480x360 /sdcard/test/bbb_short/480x360
     68 adb $adb_options push bbb_full/480x360 /sdcard/test/bbb_full/480x360
     69