Created
May 16, 2011 11:13
-
-
Save ppcuni/974253 to your computer and use it in GitHub Desktop.
jenkins の linux ワーカーで flexunit4 を動かす時の設定
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jenkins の linux ワーカーで flexunit4 を動かす時の設定 | |
# ディレクトリ構成 | |
# project | |
# + external | |
# + flex_sdk_4 FlexSDKのパス | |
# + dev | |
# + application テストアプリのパス | |
cd project | |
if [ ! -x external/flex_sdk_4/bin/gflashplayer ] | |
then | |
wget http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_sa_debug.tar.gz -O flashplayer_10_sa_debug.tar.gz | |
tar xfzv flashplayer_10_sa_debug.tar.gz | |
mv flashplayerdebugger external/flex_sdk_4/bin/gflashplayer | |
fi | |
export PATH=$PATH:$WORKSPACE/project/external/flex_sdk_4/bin | |
export HOME=/var/lib/hudson | |
cd application | |
mkdir -p ~/.macromedia/Flash_Player/#Security/FlashPlayerTrust/ | |
killall Xvnc Xrealvnc || true | |
#以下も実行するとよいらしいが、permission deniedになる | |
#rm -fv /tmp/.X*-lock /tmp/.X11-unix/X* | |
ant -f build.xml test:run | |
# JUnitテスト結果の集計 の設定に出力される TEST-*.xml を登録する | |
以下 build.xml のテストに関する中身 | |
<property name="src.loc" location="${basedir}/src" /> | |
<property name="bin.loc" location="${basedir}/bin" /> | |
<property name="testreport.loc" location="report" /> | |
<property name="EXTERNAL_DIR" location="../../external" /> | |
<property name="FLEX_HOME" location="${EXTERNAL_DIR}/flex_sdk_4" /> | |
<property name="UNIT_DIR" location="${EXTERNAL_DIR}/flexunit4/libs" /> | |
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" /> | |
<taskdef resource="flexUnitTasks.tasks" classpath="${UNIT_DIR}/flexUnitTasks-4.1.0-beta3.76.jar"/> | |
<target name="make:test"> | |
<mxmlc file="${src.loc}/TestRunner.mxml" output="${bin.loc}/TestRunner.swf" incremental="true"> | |
<target-player>10.0.0</target-player> | |
<use-network>true</use-network> | |
<default-frame-rate>60</default-frame-rate> | |
<debug>true</debug> | |
<library-path dir="${UNIT_DIR}" append="true"> | |
<include name="*.swc" /> | |
</library-path> | |
<source-path path-element="${src.loc}"/> | |
<define name="CONFIG::useFlexClasses" value="${build.useFlex}" /> | |
<compiler.verbose-stacktraces>true</compiler.verbose-stacktraces> | |
<compiler.headless-server>true</compiler.headless-server> | |
</mxmlc> | |
</target> | |
<target name="test:run" depends="make:test"> | |
<delete dir="${testreport.loc}" failOnError="false" includeEmptyDirs="true" /> | |
<mkdir dir="${testreport.loc}" /> | |
<flexunit swf="${bin.loc}/TestRunner.swf" | |
toDir="${testreport.loc}" | |
haltonfailure="false" | |
verbose="true" | |
headless="true" | |
localTrusted="true" /> | |
<junitreport todir="${testreport.loc}"> | |
<fileset dir="${testreport.loc}"> | |
<include name="TEST-*.xml" /> | |
</fileset> | |
<report format="frames" todir="${testreport.loc}/html" /> | |
</junitreport> | |
</target> | |
flexunit タグの headless を true にするのがキモ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment