flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject svn commit: r1399930 - /incubator/flex/sdk/branches/develop/mustella/mini_run.sh
Date Fri, 19 Oct 2012 00:02:59 GMT
Author: aharui
Date: Fri Oct 19 00:02:59 2012
New Revision: 1399930

URL: http://svn.apache.org/viewvc?rev=1399930&view=rev
Log:
Run the tests in the files listed in changes.txt.  Files do not have .mxml suffixes and are
relative to mustella/tests directory

Modified:
    incubator/flex/sdk/branches/develop/mustella/mini_run.sh

Modified: incubator/flex/sdk/branches/develop/mustella/mini_run.sh
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/mini_run.sh?rev=1399930&r1=1399929&r2=1399930&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/mini_run.sh (original)
+++ incubator/flex/sdk/branches/develop/mustella/mini_run.sh Fri Oct 19 00:02:59 2012
@@ -53,6 +53,8 @@ if [ $# -lt 1 ]
     echo ""
     echo "   -caseName=<testcase> - runs <testcase>, if you have also designated
a file. "
     echo ""
+    echo "   -changes      - run the tests in changes.properties (generated by MustellaTestChooser)"
+    echo ""
     echo "   -covtimeout  - add a 30 second additional timeout to run. separate from other
timeouts"
     echo ""
     echo "   -createImages - mixin the CreateBitmapReferences, to create baselines image
files"
@@ -145,7 +147,7 @@ fi
 propfile=properties/mustella_tmp.properties
 inherit_propfile=properties/mustella1.properties
 
-
+changes=0
 hurricane=0
 use_wire=true
 propfileName=mustella_tmp
@@ -228,6 +230,11 @@ do
             continue
         fi
             
+        if [ "$i" = "-changes" ]
+            then
+            changes=1
+            continue
+        fi
 
         if [ "$i" = "-failures" ]
             then
@@ -812,7 +819,7 @@ fi
 rm  $propfile  2>/dev/null
 
 
-if [ "$sdk_mustella_includes" = "" ] && [ "$run_all" = "0" ] && [ "$find_our_own_files"
= "false" ] && [ "$failed_only" = "0" ] && [ "$keyword_list" = "" ]
+if [ "$sdk_mustella_includes" = "" ] && [ "$changes" = "0" ] && [ "$run_all"
= "0" ] && [ "$find_our_own_files" = "false" ] && [ "$failed_only" = "0" ]
&& [ "$keyword_list" = "" ]
     then
     echo "Nothing was found to include. Will exit"
     exit 1
@@ -972,6 +979,57 @@ elif [ "$keyword_list" != "" ]
 
     ### NEED THE ARGS
 
+elif [ "$changes" = "1" ]
+    then
+    input=changes.txt
+
+
+    list_of_files=`awk '{{print $1}}' $input | sort -u`
+
+    for i in $list_of_files
+    do
+
+
+    derived_swf=`dirname $i`
+    derived_swf=`dirname $derived_swf`
+
+    ## create the ant fileset type includes
+    testfile="${i}.mxml";
+	
+	echo $testfile
+	
+    tmp0list="$tmp0list,$testfile"
+    
+	## split on the word testSWF, then split on the quotes, take the middle and replace .mxml
with .swf
+	swfname=`grep 'testSWF=' tests/$testfile | awk -F 'testSWF' '{print $2}' | awk -F '"' '{print
$2}' | sed 's/\.mxml/\.swf/'`
+    swfname=`echo $swfname | sed 's_\.\.\/SWFs\/__'`
+    swfname=`echo $swfname | sed 's_\.\.\/swfs\/__'`
+	
+    echo $swfname
+	
+    if [ -d "tests/${derived_swf}/SWFs" ] 
+        then
+        ## backflips for windows because it will match either:
+        f_lower=`ls "tests/${derived_swf}" | egrep "swfs"`
+        [ $? = 0 ] &&  swf0list="$swf0list,$derived_swf/swfs/$swfname" || swf0list="$swf0list,$derived_swf/SWFs/$swfname"
+
+
+    ## on unix(mac) the guess is that it would actually match correctly
+    elif [ -d "tests/${derived_swf}/swfs" ] 
+        then
+        echo "Matched lower"
+        swf0list="$swf0list,$derived_swf/swfs/$swfname"
+
+
+    fi
+
+    done
+	
+    ## write properties file
+    echo "sdk.mustella.includes=${tmp0list}" >> $propfile
+    # echo "sdk.mustella.swfs=**/*.swf" >> $propfile
+    echo "sdk.mustella.swfs=$swf0list" >> $propfile
+
 else
 
 



Mime
View raw message