Updated Branches:
  refs/heads/release4.10.0 2d19e5b5f -> 76f050277

Changed shell script to run Mustella against various versions of the Flash 
Player and AIR. This commit is an early test version intended to check the new 
functionality when running on the VM's Jenkins instance.

Signed-off-by: Erik de Bruin <e...@ixsoftware.nl>


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/30113b72
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/30113b72
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/30113b72

Branch: refs/heads/release4.10.0
Commit: 30113b72c1f068e3fd3463130825c7e6df38588b
Parents: 3909402
Author: Erik de Bruin <e...@ixsoftware.nl>
Authored: Mon Jul 15 13:14:14 2013 +0200
Committer: Erik de Bruin <e...@ixsoftware.nl>
Committed: Mon Jul 15 13:14:14 2013 +0200

----------------------------------------------------------------------
 mustella/.gitignore |   1 +
 mustella/jenkins.sh | 152 +++++++++++++++++++++++++++++++++++++++++------
 2 files changed, 136 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/30113b72/mustella/.gitignore
----------------------------------------------------------------------
diff --git a/mustella/.gitignore b/mustella/.gitignore
index c048f97..b09ae30 100644
--- a/mustella/.gitignore
+++ b/mustella/.gitignore
@@ -1,6 +1,7 @@
 # mustella files
 failures.txt
 results.txt
+versions.txt
 properties/mustella_tmp.properties
 test_files.tmp
 *.lnk.xml

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/30113b72/mustella/jenkins.sh
----------------------------------------------------------------------
diff --git a/mustella/jenkins.sh b/mustella/jenkins.sh
index b7f1970..d023d43 100755
--- a/mustella/jenkins.sh
+++ b/mustella/jenkins.sh
@@ -24,21 +24,98 @@
 ## NOTE: this file MUST HAVE Unix style line endings!
 ##
 
-export SHELLOPTS
-set -o igncr
+LOG=""
+SUCCES=true
 
-
-
-# A method to be able to run various FP and AIR version is to override the env 
variables?
-#export FLASHPLAYER_DEBUGGER=
-#export AIR_HOME=
+PLATFORM=$(uname -s)
+if [ "${PLATFORM:0:6}" == "CYGWIN" ]
+then
+  export SHELLOPTS
+  set -o igncr
+  LOG=$LOG"- Made Cygwin ignore carriage returns"$'\n'
+fi
 
 
 
 # CLEAN
+rm -f ../local.properties
 rm -f local.properties
+LOG=$LOG"- Cleaned up 'local.properties' files from previous runs"$'\n'
+
+
+
+# VERSIONS
+
+VERSIONS_FILE="versions.txt"
+
+# If a 'versions' file exists, load it
+if [ -f $VERSIONS_FILE ];
+then
+   source $VERSIONS_FILE
+fi
+
+# toggle between versions
+if [ "$FLASH_VERSION" == "11.1" ]
+then
+  FLASH_VERSION=11.8
+  AIR_VERSION=3.7
+else
+  FLASH_VERSION=11.1
+  AIR_VERSION=3.7
+fi
+
+# write toggled values to 'versions' file
+cat > $VERSIONS_FILE <<END 
+FLASH_VERSION=$FLASH_VERSION
+AIR_VERSION=$AIR_VERSION
+END
+
+LOG=$LOG"- Set FLASH_VERSION to '$FLASH_VERSION' and AIR_VERSION to 
'$AIR_VERSION'"$'\n'
+
+
+
+# LOCATIONS
+export AIR_HOME="/Users/erik/Documents/ApacheFlex/dependencies/AdobeAIRSDK"
+#export AIR_HOME="C:\\ApacheFlex\\dependencies\\AdobeAIRSDK\\$AIR_VERSION"
+LOG=$LOG"- Set AIR_HOME to '$AIR_HOME'"$'\n'
+
+case "$FLASH_VERSION" in
+  11.1)
+    export FLASHPLAYER_DEBUGGER="/Applications/Flash Player 
Debugger.app/Contents/MacOS/Flash Player Debugger"
+    #export FLASHPLAYER_DEBUGGER="C:\\Program\ Files\ 
(x86)\\flashplayer11_1r102_55_win_sa_debug_32bit.exe"
+  ;;
+  11.7)
+    export FLASHPLAYER_DEBUGGER="C:\\Program\ Files\ 
(x86)\\flashplayer11_7r700_232_win_sa_debug.exe"
+  ;;
+  11.8)
+    export FLASHPLAYER_DEBUGGER="C:\\Program\ Files\ 
(x86)\\flashplayer11_8r800_94_win_sa_debug.exe"
+  ;;
+  *)
+    echo "No valid Flash Player Debugger variable value could be parsed."
+    exit 1
+  ;;
+esac
+LOG=$LOG"- Set FLASHPLAYER_DEBUGGER to '$FLASHPLAYER_DEBUGGER'"$'\n'
+
+
+
+# To build the SDK using the versions specified above, write 
'../local.properties'
+cat > ../local.properties <<END 
+playerglobal.version = $FLASH_VERSION
+air.version = AIR_VERSION
+END
+
 
 
+# ANT
+#ant -f ../build.xml clean
+#ant -f ../build.xml main
+#ant -f ../build.xml other.locales
+LOG=$LOG"- Ran 'clean', 'main' and 'other.locales' ant targets to prepare the 
SDK for testing"$'\n'
+
+
+
+# RUN
 
 RUN_TYPE="main"
 while [ "$1" != "" ]; do
@@ -52,12 +129,11 @@ while [ "$1" != "" ]; do
   shift
 done
 
-
-
 if [ "$RUN_TYPE" == "main" ]
 then
   TEST_COMMAND=-timeout=60000
-  TEST_SET=-all
+  #TEST_SET=-all
+  TEST_SET=tests/components/Label
 elif [ "$RUN_TYPE" == "air" ]
 then
   TEST_COMMAND=-apollo
@@ -75,22 +151,64 @@ END
   TEST_SET=tests/mobile
 fi
 
+#sh ./mini_run.sh $TEST_COMMAND $TEST_SET 
+
+LOG=$LOG"- Ran Mustella on the SDK with these parameters: '$TEST_COMMAND 
$TEST_SET'"$'\n'
 
 
-sh ./mini_run.sh $TEST_COMMAND $TEST_SET 
 
+# FAILURES
 if [[ -s failures.txt ]]
 then
-  echo "Some tests failed: running '-failures'" 
-  sh ./mini_run.sh $TEST_COMMAND -failures
+  LOG=$LOG"- Some tests failed: running '-failures'"$'\n' 
+  #sh ./mini_run.sh $TEST_COMMAND -failures
   if [[ -s failures.txt ]]
   then
-    echo "Some of tests failed, even after running '-failures'..."
+    LOG=$LOG"- Some of tests failed, even after running '-failures'..."$'\n'
     
-    exit 1
+    SUCCESS=false
   else
-    echo "All tests passed after running '-failures'" 
+    LOG=$LOG"- All tests passed after running '-failures'"$'\n'
   fi
 else
-  echo "All tests passed on first run" 
+  LOG=$LOG"- All tests passed on the first run"$'\n'
+fi
+
+
+
+# REPORT
+NOW=$(date +"%m-%d-%Y %H:%M")
+cat <<END
+
+
+
+============ JENKINS MUSTELLA RUN REPORT ============
+
+Date and time: $NOW
+
+Settings:
+player.version = $FLASH_VERSION
+air.version = $AIR_VERSION
+FLASHPLAYER_DEBUGGER = $FLASHPLAYER_DEBUGGER
+AIR_HOME = $AIR_HOME
+
+Build: 
+  type = $RUN_TYPE
+  command = $TEST_COMMAND
+  set = $TEST_SET
+
+Log:
+$LOG
+
+=====================================================
+
+
+
+END
+
+
+
+if [ ! SUCCESS ]
+then
+  exit 1
 fi

Reply via email to