Now with in-process redirection, the adb shell setprop thing is not needed
Change-Id: Ibfda0e6e65d0834cffdd95d4c6d87d07644088f6
This commit is contained in:
parent
fdec471a7c
commit
b58498fb57
3 changed files with 13 additions and 19 deletions
|
@ -9,9 +9,6 @@ and AVD that doesn't work. Instead start it from the console:
|
|||
emulator-arm -avd <Name> -partition-size 500
|
||||
|
||||
Where <Name> is the literal name of the AVD that you entered.
|
||||
Then it is necessary to get stdout/err to go to somewhere we can find it:
|
||||
|
||||
adb shell stop; adb shell setprop log.redirect-stdio true; adb shell start
|
||||
|
||||
Then:
|
||||
|
||||
|
@ -20,12 +17,15 @@ Then it is necessary to get stdout/err to go to somewhere we can find it:
|
|||
make clean all install
|
||||
make run ; adb shell logcat
|
||||
|
||||
And if all goes well - you should have some nice unit
|
||||
test output to enjoy. After a while of this loop you'll probably
|
||||
find that android has lost a lot of space on your device at
|
||||
this point:
|
||||
And if all goes well - you should have some nice unit test output to
|
||||
enjoy. After a while of this loop you might find that you have lost a lot of
|
||||
space on your emulator's or device's /data volume. If using the emulator, you
|
||||
can do:
|
||||
|
||||
adb shell stop; adb shell setprop log.redirect-stdio true; adb shell start
|
||||
adb shell stop; adb shell start
|
||||
|
||||
but on a (non-rooted) device you probably just need to reboot it. On the other
|
||||
hand, this phenomenon might not happen on actual devices.
|
||||
|
||||
and continue onwards & upwards.
|
||||
|
||||
|
|
12
README.cross
12
README.cross
|
@ -395,14 +395,12 @@ mechanism.
|
|||
|
||||
Then to run the unit test, do "make install" followed by "make
|
||||
run". You most likely want to have an "adb logcat" running in another
|
||||
window, and you probably also want to have set the stdout and stderr
|
||||
of app processes to be redirected to logcat ("adb shell stop; adb
|
||||
shell setprop log.redirect-stdio true; adb shell start").
|
||||
window.
|
||||
|
||||
To debug, do manually what "make run" would do, adding args "-e
|
||||
lo-main-delay 20" to the command line, and when the app has started,
|
||||
run ndk-gdb. Unfortunately the gdb in NDK r7 is broken, use the one in
|
||||
the NDK build with newer versions of gcc and gdb from
|
||||
To debug, do manually what "make run" would do, adding args "-e lo-main-delay
|
||||
20" to the command line, and when the app has started, run
|
||||
ndk-gdb. Unfortunately the gdb in NDK r7 and r8 is a bit broken, you can use
|
||||
the one in a NDK build with newer versions of gcc and gdb from
|
||||
http://code.google.com/p/mingw-and-ndk/ instead.
|
||||
|
||||
Running strace on the unit test in progress is often useful to find
|
||||
|
|
|
@ -191,10 +191,6 @@ run: run_ucalc run_filters_test
|
|||
stop-start-cycle:
|
||||
$(ANDROID_SDK_HOME)/platform-tools/adb shell stop && $(ANDROID_SDK_HOME)/platform-tools/adb shell start && sleep 10
|
||||
|
||||
# Too hard to remember this stuff;)
|
||||
redirect-stdio:
|
||||
$(ANDROID_SDK_HOME)/platform-tools/adb shell stop && $(ANDROID_SDK_HOME)/platform-tools/adb shell setprop log.redirect-stdio true && $(ANDROID_SDK_HOME)/platform-tools/adb shell start
|
||||
|
||||
clean: properties
|
||||
$(ANT) clean
|
||||
rm -rf assets $(SODEST) $(OBJLOCAL)
|
||||
|
|
Loading…
Reference in a new issue