diff mbox

build: Create version and config information files in Android

Message ID 1386967704-17984-1-git-send-email-oscar.mateo@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

oscar.mateo@intel.com Dec. 13, 2013, 8:48 p.m. UTC
From: Oscar Mateo <oscar.mateo@intel.com>

Also, skip the compilation of pm_lpsp in Android (uses Cairo)

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
---
 tests/Android.mk |   35 +++++++++++++++++++++++++++++++++--
 1 file changed, 33 insertions(+), 2 deletions(-)

Comments

Daniel Vetter Dec. 13, 2013, 8:38 p.m. UTC | #1
On Fri, Dec 13, 2013 at 08:48:24PM +0000, oscar.mateo@intel.com wrote:
> From: Oscar Mateo <oscar.mateo@intel.com>
> 
> Also, skip the compilation of pm_lpsp in Android (uses Cairo)
> 
> Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>

Oops, we seem to be pretty bad at breaking the Android build :(

Applied, thanks for the patch.
-Daniel
oscar.mateo@intel.com Dec. 16, 2013, 9:16 a.m. UTC | #2
> Oops, we seem to be pretty bad at breaking the Android build :(

Or very good, depends on how you look at it :)

It´s my bad: preparing our Jenkins to automatically compile-test i-g-t after every check-in is in my backlog, but I have no bandwidth at the moment. I´ll try to give it a go  after the Xmas break.

Cheers,
Oscar
Daniel Vetter Dec. 16, 2013, 9:22 a.m. UTC | #3
On Mon, Dec 16, 2013 at 10:16 AM, Mateo Lozano, Oscar
<oscar.mateo@intel.com> wrote:
>> Oops, we seem to be pretty bad at breaking the Android build :(
>
> Or very good, depends on how you look at it :)
>
> It´s my bad: preparing our Jenkins to automatically compile-test i-g-t after every check-in is in my backlog, but I have no bandwidth at the moment. I´ll try to give it a go  after the Xmas break.

btw if you set that up pls send build failure notices to intel-gfx.
That way we'll raise awareness and hopefully break Android less often
...
-Daniel
diff mbox

Patch

diff --git a/tests/Android.mk b/tests/Android.mk
index c96f30a..c65f94c 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -23,6 +23,33 @@  skip_lib_list := \
 lib_list := $(filter-out $(skip_lib_list),$(libintel_tools_la_SOURCES))
 LIB_SOURCES := $(addprefix lib/,$(lib_list))
 
+.PHONY: version.h.tmp
+
+$(LOCAL_PATH)/version.h.tmp:
+	@touch $@
+	@if test -d .git; then \
+		if which git > /dev/null; then git log -n 1 --oneline | \
+		        sed 's/^\([^ ]*\) .*/#define IGT_GIT_SHA1 "g\1"/' \
+		        >> $@ ; \
+		fi \
+	else \
+		echo '#define IGT_GIT_SHA1 "NOT-GIT"' >> $@ ; \
+	fi
+
+$(LOCAL_PATH)/version.h: $(LOCAL_PATH)/version.h.tmp
+	@echo "updating version.h"
+	@if ! cmp -s $(LOCAL_PATH)/version.h.tmp $(LOCAL_PATH)/version.h; then \
+		mv $(LOCAL_PATH)/version.h.tmp $(LOCAL_PATH)/version.h ; \
+	else \
+		rm $(LOCAL_PATH)/version.h.tmp ; \
+	fi
+
+# FIXME: autogenerate this info #
+$(LOCAL_PATH)/config.h:
+	@echo "updating config.h"
+	echo '#define PACKAGE_VERSION "1.5"' >> $@ ; \
+	echo '#define TARGET_CPU_PLATFORM "android-ia"' >> $@ ;
+
 #================#
 
 define add_test
@@ -31,7 +58,10 @@  define add_test
     LOCAL_SRC_FILES :=          \
        tests/$1.c               \
        $(LIB_SOURCES)
-       
+
+    LOCAL_GENERATED_SOURCES :=       \
+       $(LOCAL_PATH)/version.h       \
+       $(LOCAL_PATH)/config.h
 
     LOCAL_C_INCLUDES +=              \
        $(LOCAL_PATH)/lib             \
@@ -70,7 +100,8 @@  skip_tests_list := \
     kms_setmode \
     pm_pc8 \
     gem_seqno_wrap \
-    gem_render_copy
+    gem_render_copy \
+    pm_lpsp
 
 tests_list := $(filter-out $(skip_tests_list),$(TESTS_progs) $(TESTS_progs_M) $(HANG) $(TESTS_testsuite))