Hudson Android Emulator Pluginã使ã£ã¦ã¿ã
ååã®è¨äºã§HudsonããEmulatorãèµ·åã§ããªã件ã®ç¶ãã§ãã
vvakameããã¨androidzaurusãããbols-blueããããããããå©è¨ãããã ãã¾ããããããã¨ããããã¾ãã
çµæå ±å
Emulatorãèµ·åããã¾ã§å¾
ã¤ã£ã¦ããã³ãã³ããæãã¦ããã£ãã®ã§æ©éå®è¡
ã³ãã³ã
adb wait-for-device
ã§å®è¡ã³ãã³ãã以ä¸ã®ããã«å¤æ´
adb wait-for-device shell am instrument -w com.example.hellohudson.tests/android.test.InstrumentationTestRunner
çµæã¯NGã§ããã
log
+ adb wait-for-device shell am instrument -w com.example.hellohudson.tests/android.test.InstrumentationTestRunner Error type 2 Error: Unable to connect to activity manager; is the system running? usage: am [start|broadcast|instrument|profile] am start [-D] INTENT am broadcast INTENT am instrument [-r] [-e <ARG_NAME> <ARG_VALUE>] [-p <PROF_FILE>] [-w] <COMPONENT> am profile <PROCESS> [start <PROF_FILE>|stop] INTENT is described with: [-a <ACTION>] [-d <DATA_URI>] [-t <MIME_TYPE>] [-c <CATEGORY> [-c <CATEGORY>] ...] [-e|--es <EXTRA_KEY> <EXTRA_STRING_VALUE> ...] [--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> ...] [-e|--ei <EXTRA_KEY> <EXTRA_INT_VALUE> ...] [-n <COMPONENT>] [-f <FLAGS>] [<URI>] Finished: SUCCESS
è¦ããä¸æåãã¦ã¾ããããã£ããErroråãã¦ã¾ãã
ã§ã Android Emulator Plugin ãããã®ã§ããã使ãã¾ããã
http://wiki.hudson-ci.org/display/HUDSON/Android+Emulator+Plugin
â失æ
æé
Android Emulator Plugin ã®ã¤ã³ã¹ãã¼ã«
- Hudsonãèµ·åãã
- Hudsonã®ç®¡çã¡ãã¥ã¼ãéã
- ãã©ã°ã¤ã³ã®ç®¡çã¡ãã¥ã¼ãéã
- android-emulatorã«ãã§ãã¯ãããã¦"ã¤ã³ã¹ãã¼ã«"ãå®è¡
- å®äºããããHudsonãåèµ·å
Android Emulator Plugin ã®è¨å®
- Hudsonã®ç®¡çã¡ãã¥ã¼ãéã
- "ã·ã¹ãã ã®è¨å®"ã¡ãã¥ã¼ãéã
- "Android Emulator"ã®æ¬ã追å ããã¦ããã®ã§ã"Android SDK root"ã«android-sdkã®ãã¹ãå ¥åãã
- ç»é¢ä¸çªä¸ã®"ä¿å"ãã¿ã³ãã¯ãªãã¯
- ååä½æããã¸ã§ã"HelloHudsonTest"ãé¸æ
- "è¨å®"ã¡ãã¥ã¼ãéã
- ãã«ãç°å¢ã«"Run an Android emulator during build"ã追å ããã¦ããã®ã§ãã§ãã¯ãã
- "Run existing emulator"ã«ãã§ãã¯ãå ¥ãã
- AVD nameã«ä½æããEmulatoråãè¨å ¥
- "Common emulator options"ã®è¨å®
- "Reset emulator state at start-up"ï¼ãã§ãã¯(ç»åã«ã¯ãã§ãã¯ããªããã©å®éã¯ãã§ãã¯ãã¦ãã¼ãããã§ãã¯ã¨ããããªãããï¼
- "Show emulator window"ï¼ãã§ãã¯
- "ã·ã§ã«ã®å®è¡"ã®ã³ãã³ã
- logcatã¯ãªã¢ã³ãã³ã追å
logcat -c ant adb shell am instrument -w com.example.hellohudson.tests/android.test.InstrumentationTestRunner
- ç»é¢ä¸ã®"ä¿å"ãã¯ãªãã¯
ãã¹ããã
ãã«ããå®è¡ããã¨èªåçã«ã¨ãã¥ã¬ã¼ã¿ãèµ·åãã¾ãã
- "ãã«ãã®å®è¡"ãã¯ãªãã¯
- å·¦ä¸ã®"ãã«ãå±¥æ´"ããå®è¡ä¸ã®ãã«ãçªå·ãé¸æï¼"ã³ã³ã½ã¼ã«åºå"ãé¸æ
- å®äºããã¾ã§ãã°ããªããã
- æåãããã¨ã確èªãã
log
ãç¥ã [android] Emulator is ready for use (took 94 seconds) [workspace] $ /bin/sh -xe /tmp/hudson1986880721112408258.sh + adb logcat -c + ant Buildfile: build.xml [setup] Android SDK Tools Revision 7 [setup] Project Target: Android 1.6 [setup] API level: 4 [setup] [setup] ------------------ [setup] Resolving library dependencies: [setup] ------------------ [setup] Ordered libraries: [setup] ------------------ [setup] [setup] WARNING: No minSdkVersion value set. Application will install on all Android versions. [setup] [setup] Importing rules file: tools/ant/ant_test_rules_r3.xml help: [echo] Android Ant Build. Available targets: [echo] help: Displays this help. [echo] clean: Removes output files created by other targets. [echo] compile: Compiles project's .java files into .class files. [echo] debug: Builds the application and signs it with a debug key. [echo] release: Builds the application. The generated apk file must be [echo] signed before it is published. [echo] install: Installs/reinstalls the debug package onto a running [echo] emulator or device. [echo] If the application was previously installed, the [echo] signatures must match. [echo] uninstall: Uninstalls the application from a running emulator or [echo] device. BUILD SUCCESSFUL Total time: 0 seconds + adb shell am instrument -w com.example.hellohudson.tests/android.test.InstrumentationTestRunner INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{com.example.hellohudson.tests/android.test.InstrumentationTestRunner} INSTRUMENTATION_STATUS: id=ActivityManagerService INSTRUMENTATION_STATUS_CODE: -1 INSTRUMENTATION_FAILED: com.example.hellohudson.tests/android.test.InstrumentationTestRunner usage: am [start|broadcast|instrument|profile] am start [-D] INTENT am broadcast INTENT am instrument [-r] [-e <ARG_NAME> <ARG_VALUE>] [-p <PROF_FILE>] [-w] <COMPONENT> am profile <PROCESS> [start <PROF_FILE>|stop] INTENT is described with: [-a <ACTION>] [-d <DATA_URI>] [-t <MIME_TYPE>] [-c <CATEGORY> [-c <CATEGORY>] ...] [-e|--es <EXTRA_KEY> <EXTRA_STRING_VALUE> ...] [--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> ...] [-e|--ei <EXTRA_KEY> <EXTRA_INT_VALUE> ...] [-n <COMPONENT>] [-f <FLAGS>] [<URI>] $ /home/ore/develop/android/android-sdk-linux_x86/tools/adb disconnect localhost:40870 [android] Stopping Android emulator [android] Archiving emulator log Finished: SUCCESS æ´æ°: 2010/09/24 21:07:20Hudson ver. 1.377
æåãã¦ããããã«è¦ãããã©ã
INSTRUMENTATION_FAILED: com.example.hellohudson.tests/android.test.InstrumentationTestRunner
ã£ã¦åºã¦ãã»ã»ã»orz
ææç©ã®ç¢ºèª
ææç©ã«logcat.txtãã§ãã¦ããã¨ã確èªãã
- "ç¶æ
"ãé¸æ
- ãã«ãã®ææç©ã«"logacat.txt"ããããã¨ã確èª
ãã°ããèããã¨ãã¶ãapkããªãã ãã®æ§åã
ã¤ã¾ã
adb install XX.apk
ãå®è¡ããã°ãããã
ã§å®è¡ã³ãã³ãã«è¿½å
adb install HelloHudsonTest.apk
çµæ
apkãè¦ã¤ãããªãã¨æãããã
ä»æ¥ã¯ããã¾ã§ã
Hudsonã§ã¨ãã¥ã¬ã¼ã¿ãèµ·åã§ããªãåé¡ã¯ã¾ã 解決ã§ãã¦ã¾ããããã ãã¶è¿ã¥ãã¦ããã¨æãã¾ãã