Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Bug 1023877 - Fixed reference workloads to work on flame. r=dhunt
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Hylands authored and rvandermeulen committed Jul 18, 2014
1 parent dc8e189 commit 851d01b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 8 deletions.
14 changes: 11 additions & 3 deletions test_media/reference-workload/generateImages.sh
Expand Up @@ -8,11 +8,19 @@ if [ -z "$1" ]; then
fi

if [ "$1" != "0" ]; then
REMOTE_DIR="/sdcard/DCIM/100MZLLA"
adb push ${SCRIPT_DIR}/MasterGalleryImage.jpg ${REMOTE_DIR}/IMG_0001.jpg
# REMOTE_DIR="/sdcard/DCIM/100MZLLA"
REMOTE_DIR=
for dir in /sdcard /storage/sdcard0; do
if [ -n "$(adb shell "test -d $dir && echo found")" ]; then
REMOTE_DIR=$dir
break
fi
done

adb push ${SCRIPT_DIR}/MasterGalleryImage.jpg ${REMOTE_DIR}/DCIM/100MZLLA/IMG_0001.jpg

for i in `seq -f '%04g' 2 $1` ; do
FILENAME=IMG_$i.jpg
adb shell "cat ${REMOTE_DIR}/IMG_0001.jpg > ${REMOTE_DIR}/${FILENAME}"
adb shell "cat ${REMOTE_DIR}/DCIM/100MZLLA/IMG_0001.jpg > ${REMOTE_DIR}/DCIM/100MZLLA/${FILENAME}"
done
fi
11 changes: 9 additions & 2 deletions test_media/reference-workload/generateMusicFiles.sh
Expand Up @@ -23,13 +23,20 @@ mid3v2 -D ${SCRIPT_DIR}/${SONG_NAME}

# We start with 1 track per album, and increment that up to 10, and then cycle between 5 and 10
TRACKS_PER_ALBUM=1
REMOTE_DIR="/sdcard/Music"
# REMOTE_DIR="/sdcard/Music"
REMOTE_DIR=
for dir in /sdcard /storage/sdcard0; do
if [ -n "$(adb shell "test -d $dir && echo found")" ]; then
REMOTE_DIR=$dir
break
fi
done

for i in `seq -f '%04g' 2 $1` ; do
FILENAME=SONG_$i.mp3

mid3v2 -t "Song ${i}" -a "Artist ${ARTIST}" -A "Album ${ALBUM}" -T "${TRACK}" ${SCRIPT_DIR}/${SONG_NAME}
adb push ${SCRIPT_DIR}/${SONG_NAME} ${REMOTE_DIR}/${FILENAME}
adb push ${SCRIPT_DIR}/${SONG_NAME} ${REMOTE_DIR}/Music/${FILENAME}

let TRACK=TRACK+1
if [ ${TRACK} -gt ${TRACKS_PER_ALBUM} ]; then
Expand Down
13 changes: 10 additions & 3 deletions test_media/reference-workload/generateVideos.sh
Expand Up @@ -8,12 +8,19 @@ if [ -z "$1" ]; then
fi

if [ "$1" != "0" ]; then
REMOTE_DIR="/sdcard/Movies"
adb push ${SCRIPT_DIR}/MasterVideo.3gp ${REMOTE_DIR}/VID_0001.3gp
# REMOTE_DIR="/sdcard/Movies"
REMOTE_DIR=
for dir in /sdcard /storage/sdcard0; do
if [ -n "$(adb shell "test -d $dir && echo found")" ]; then
REMOTE_DIR=$dir
break
fi
done
adb push ${SCRIPT_DIR}/MasterVideo.3gp ${REMOTE_DIR}/Movies/VID_0001.3gp

for i in `seq -f '%04g' 2 $1` ; do
FILENAME=VID_$i.3gp
adb shell "cat ${REMOTE_DIR}/VID_0001.3gp > ${REMOTE_DIR}/${FILENAME}"
adb shell "cat ${REMOTE_DIR}/Movies/VID_0001.3gp > ${REMOTE_DIR}/Movies/${FILENAME}"
done

fi

0 comments on commit 851d01b

Please sign in to comment.