Debug debug

This commit is contained in:
pelya
2011-10-18 16:59:23 +03:00
parent fa0c6805bb
commit d8dfcf01fc
2 changed files with 15 additions and 6 deletions

View File

@@ -1 +1 @@
#define BUILDDATE "2011-10-18" #define BUILDDATE "2011-10-18::16:43:53 "

View File

@@ -4,7 +4,8 @@ if [ -z "$1" ] ; then
echo "Usage: $0 startdate [enddate=now] [revisions-step=10]" echo "Usage: $0 startdate [enddate=now] [revisions-step=10]"
echo "Runs regression tests for all Git revisions up to specified date," echo "Runs regression tests for all Git revisions up to specified date,"
echo "and produces the FPS measurements for each of the revisions." echo "and produces the FPS measurements for each of the revisions."
echo "Naturally, you'll need to have an Android device connected to USB port." echo "Naturally, you'll need to have an Android device connected to USB port,"
echo "and you should disable screen timeout in the Android device settings."
echo "Also, it messes up your current Git branch, so backup all your current changes." echo "Also, it messes up your current Git branch, so backup all your current changes."
fi fi
@@ -29,15 +30,24 @@ if [ -z "$STEP" ] ; then
STEP=10 STEP=10
fi fi
export OLDBRANCH=`git branch | grep '*' | sed 's/[* ]*//'`
function restoreGit() {
echo Restoring Git branch "$OLDBRANCH"
rm -rf project/jni/application/regression
git checkout -f "$OLDBRANCH"
}
trap restoreGit SIGHUP
echo Revisions from "$FROM" to "$TO" , step "$STEP" echo Revisions from "$FROM" to "$TO" , step "$STEP"
rm -rf regression/regression rm -rf regression/regression
cp -r project/jni/application/regression regression/regression cp -r project/jni/application/regression regression/regression
OLDBRANCH=`git branch | grep '*' | sed 's/[* ]*//'`
git checkout -f "@{$TO}" git checkout -f "@{$TO}"
CURRENT="`git log -n 1 --format='%cD' --`" CURRENT="`git log -n 1 --format='%cD' --`"
while [ `date -d "$CURRENT" "+%s"` -gt `date -d "$FROM" "+%s"` ] ; do while [ `date -d "$CURRENT" "+%s"` -gt `date -d "$FROM" "+%s"` ] ; do
CURFMT="`git log -n 1 --format='%ci' -- | sed 's/[+].*//' | sed 's/ /::/'`" CURFMT="`git log -n 1 --format='%ci' -- | sed 's/[+].*//' | sed 's/ /::/'`"
CURFMT=$CURFMT CURFMT=`echo $CURFMT | sed 's/ //'`
echo \"$CURFMT\"
rm -f project/jni/application/src rm -f project/jni/application/src
rm -rf project/jni/application/regression rm -rf project/jni/application/regression
cp -rf regression/regression project/jni/application/regression cp -rf regression/regression project/jni/application/regression
@@ -57,5 +67,4 @@ adb shell logcat -d -t 20 | grep "SDL REGRESSION BUILDDATE $CURFMT" >> regressio
git checkout -f "HEAD~$STEP" git checkout -f "HEAD~$STEP"
CURRENT="`git log -n 1 --format='%cD' --`" CURRENT="`git log -n 1 --format='%cD' --`"
done done
rm -rf project/jni/application/regression restoreGit
git checkout -f "$OLDBRANCH"