also delete spaces

This commit is contained in:
syureyi 2014-07-21 16:15:03 +08:00
parent 69be28bd1b
commit f3a5655754
4 changed files with 42 additions and 42 deletions

@ -13,13 +13,13 @@ CODEC_TEST_IOS_REPORT_SUBFOLDER="release"
buildXcodeProject()
{
xcodebuild ARCHS="${CODEC_TEST_IOS_ARCH}" VALID_ARCHS="${CODEC_TEST_IOS_ARCH}" ONLY_ACTIVE_ARCH=YES -project $1 -target $2 -configuration $3 -sdk ${CODEC_TEST_IOS_PLATFORM} clean build
if [ $? -eq 0 ]; then
echo "build $1 $3 successfully"
else
echo "build $1 $3 fail"
exit 1
fi
if [ $? -eq 0 ]; then
echo "build $1 $3 successfully"
else
echo "build $1 $3 fail"
exit 1
fi
}
@ -50,22 +50,22 @@ for PARAM in $*; do
CODEC_TEST_RES=${AUTO_TEST_IOS_PATH}/../DecoderPerfTestRes
CODEC_TEST_LOG="decPerf"
elif [ "release" = "${PARAM}" ]; then
CODEC_TEST_IOS_DEBUG_RELEASE="Release"
CODEC_TEST_IOS_REPORT_SUBFOLDER="release"
elif [ "debug" = "${PARAM}" ]; then
CODEC_TEST_IOS_DEBUG_RELEASE="Debug"
CODEC_TEST_IOS_REPORT_SUBFOLDER="debug"
else
echo parameters are illegal!!!, please have a check.
exit 1
fi
done
CODEC_TEST_IOS_DEBUG_RELEASE="Release"
CODEC_TEST_IOS_REPORT_SUBFOLDER="release"
elif [ "debug" = "${PARAM}" ]; then
CODEC_TEST_IOS_DEBUG_RELEASE="Debug"
CODEC_TEST_IOS_REPORT_SUBFOLDER="debug"
else
echo parameters are illegal!!!, please have a check.
exit 1
fi
done
echo "Codec test will run on ${CODEC_TEST_IOS_PLATFORM} with ${CODEC_TEST_IOS_DEBUG_RELEASE}"
buildXcodeProject ${CODEC_TEST_XCODE_PROJECT_NAME} ${CODEC_TEST_IOS_PROJECT_NAME} ${CODEC_TEST_IOS_DEBUG_RELEASE} ${CODEC_TEST_IOS_PLATFORM}
##############run on ios devices#########################
# for real device
@ -81,15 +81,15 @@ echo "Try to kill the runing instruments"
pids_str=`ps x -o pid,command | grep -v grep | grep "instruments" | awk '{printf "%s,", $1}'`
instruments_pids="${pids_str//,/ }"
for pid in ${instruments_pids}; do
echo "Found instruments ${pid}. Killing..."
kill -9 ${pid} && wait ${pid} &> /dev/null
done
echo "Found instruments ${pid}. Killing..."
kill -9 ${pid} && wait ${pid} &> /dev/null
done
DEVICES=`system_profiler SPUSBDataType | sed -n -e '/iPad/,/Serial/p' -e '/iPhone/,/Serial/p' | grep "Serial Number:" | awk -F ": " '{print $2}'`
if [ "${DEVICES}#" == "#" ]
then
then
echo "Can not find any connected device! please check device is connected to MAC!"
exit 1
else
@ -135,13 +135,13 @@ ENCDEC=$1
#start to get encoder/decoder performance data,default run the xcode with release
iosPerformanceTest $ENCDEC release
if [ $? -ne 0 ]; then
echo "Running $ENCDEC demo to get encoder performance is failed!"
if [ $? -ne 0 ]; then
echo "Running $ENCDEC demo to get encoder performance is failed!"
exit 1
else
else
echo Finished $ENCDEC performance test on ios devices
echo the test result is generated at ./ios/report/xx.loGbash parsePerfData.sh
echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxIOS $ENCDEC Endxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
fi
#TODO:according to the trace of instruments to do some analysis
#TODO:according to the trace of instruments to do some analysis
find .\ -name *.trace -exec rm -rf {} \;

@ -11,7 +11,7 @@ UIATarget.onAlert = function onAlert(alert){
var acceptButton = buttons[buttonCount - 1];
acceptButton.tap(); // last button is accept
}
return true; //forbid the default cancel processing
return true; //forbid the default cancel processing
}
return false; //using the default cancel processing
}

@ -22,32 +22,32 @@ runGetPerformanceInfo_openh264()
then seperatorNum=3
else
seperatorNum=2
fi
fi
while read line
do
do
if [[ $line =~ "enc yuv file" ]]
then
FileName=`echo $line | awk 'BEGIN {FS="enc yuv file"} {print $2}'`
FileName=`echo $FileName | awk 'BEGIN {FS=":"} {print $2}'`
FileName=`echo $FileName | awk 'BEGIN {FS=":"} {print $2}'`
fi
if [[ $line =~ "Width" ]]
then
then
Width=`echo $line | awk 'BEGIN {FS=":"} {print $'${seperatorNum}'}'`
fi
if [[ $line =~ "Height" ]]
then
then
Height=`echo $line | awk 'BEGIN {FS=":"} {print $'${seperatorNum}'}'`
fi
if [[ $line =~ "Frames" ]]
then
if [[ $line =~ "Frames" ]]
then
Frames=`echo $line | awk 'BEGIN {FS=":"} {print $'${seperatorNum}'}'`
fi
if [[ $line =~ "FPS" ]]
then
if [[ $line =~ "FPS" ]]
then
FPS=`echo $line | awk 'BEGIN {FS=":"} {print $'${seperatorNum}'}'`
FPS=`echo $FPS | awk 'BEGIN {FS="fps"} {print $1}'`
echo "${FileName},"${Width}x${Height}",${Frames},${FPS}"
echo "${FileName},"${Width}x${Height}",${Frames},${FPS}"
fi
if [[ $line =~ "encode time" ]]
@ -62,11 +62,11 @@ runGetPerformanceInfo_openh264()
then
FileName=`echo $line | awk 'BEGIN {FS=":"} {print $'${seperatorNum}'}'`
if [ $1 = "ios" ]
then
then
FileName=`echo $FileName | awk -F"DecoderPerfTestRes" '{print $2}'`
FileName=`echo $FileName | awk -F"/" '{print $2}'`
else
FileName=`echo $FileName | awk -F"/" '{print $4}'`
FileName=`echo $FileName | awk -F"/" '{print $4}'`
fi
fi
@ -83,7 +83,7 @@ if [ $# -ne 1 ]
then echo "Please input $0 [android/ios]"
fi
if [ $* = "android" ]
then
then
Result_log_path="./android/report/"
suffix=android
dos2unix ${Result_log_path}*.*
@ -99,7 +99,7 @@ do
PerformFile=${PerformFile}_${suffix}.csv
#inital perfermance file
echo "$log,,,">>${AUTO_TEST_RESULT_PATH}${PerformFile}
echo "YUV,Resolution,Encodedframes,FPS">>${AUTO_TEST_RESULT_PATH}${PerformFile}
echo "YUV,Resolution,Encodedframes,FPS">>${AUTO_TEST_RESULT_PATH}${PerformFile}
runGetPerformanceInfo_openh264 ${suffix} ${Result_log_path}${log}>>${AUTO_TEST_RESULT_PATH}${PerformFile}
done
}

@ -23,7 +23,7 @@ elif [ $params = "dec" ];then
echo Running the decoder performance test
ENC=0
else
echo parameters are illegal!!!, ${0} [ios/android] [enc/dec]
echo parameters are illegal!!!, ${0} [ios/android] [enc/dec]
exit 1
fi
done