Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Unified Diff: Makefile

Issue 10696048: Add Makefile targets for running tests on Android. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix typo Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('j') | tools/android-run.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Makefile
diff --git a/Makefile b/Makefile
index 9a17d6baa585f1d261ebd2257d40310f68ca98eb..632dc84a0691cb7c4e426fa542feb39477d32712 100644
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,7 @@ GYPFLAGS ?=
TESTFLAGS ?=
ANDROID_NDK_ROOT ?=
ANDROID_TOOL_PREFIX = $(ANDROID_NDK_ROOT)/toolchain/bin/arm-linux-androideabi
+ANDROID_V8 ?= /data/local/v8
# Special build flags. Use them like this: "make library=shared"
@@ -120,6 +121,7 @@ endif
ARCHES = ia32 x64 arm mips
DEFAULT_ARCHES = ia32 x64 arm
MODES = release debug
+ANDROID_MODES = android.release android.debug
# List of files that trigger Makefile regeneration:
GYPFILES = build/all.gyp build/common.gypi build/standalone.gypi \
@@ -166,8 +168,9 @@ native: $(OUTDIR)/Makefile.native
CXX="$(CXX)" LINK="$(LINK)" BUILDTYPE=Release \
builddir="$(shell pwd)/$(OUTDIR)/$@"
-# TODO(jkummerow): add "android.debug" when we need it.
-android android.release: $(OUTDIR)/Makefile.android
+android: $(ANDROID_MODES)
+
+$(ANDROID_MODES): $(OUTDIR)/Makefile.android
@$(MAKE) -C "$(OUTDIR)" -f Makefile.android \
CXX="$(ANDROID_TOOL_PREFIX)-g++" \
AR="$(ANDROID_TOOL_PREFIX)-ar" \
@@ -175,8 +178,9 @@ android android.release: $(OUTDIR)/Makefile.android
CC="$(ANDROID_TOOL_PREFIX)-gcc" \
LD="$(ANDROID_TOOL_PREFIX)-ld" \
LINK="$(ANDROID_TOOL_PREFIX)-g++" \
- BUILDTYPE=Release \
- builddir="$(shell pwd)/$(OUTDIR)/android.release"
+ BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \
+ python -c "print raw_input().capitalize()") \
+ builddir="$(shell pwd)/$(OUTDIR)/$@"
# Test targets.
check: all
@@ -196,6 +200,17 @@ $(CHECKS): $$(basename $$@)
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
--arch-and-mode=$(basename $@) $(TESTFLAGS)
+$(addsuffix .sync, $(ANDROID_MODES)): $$(basename $$@)
+ @tools/android-sync.sh $(basename $@) $(OUTDIR) \
Jakob Kummerow 2012/07/02 14:25:58 Does this line start with a <TAB>? Makefile recipe
ulan 2012/07/02 16:18:23 Done. Line 205 didn't have TAB, all other lines ha
+ $(shell pwd) $(ANDROID_V8)
+
+$(addsuffix .check, $(ANDROID_MODES)): $$(basename $$@).sync
+ @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
+ --arch-and-mode=$(basename $@) \
+ --special-command="tools/android-run.py @"
+
+android.check: android.release.check android.debug.check
+
native.check: native
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR)/native \
--arch-and-mode=. $(TESTFLAGS)
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('j') | tools/android-run.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698