Skip to contentSkip to conversation

build: Create version and config information files in Android

PATCH Applied [email protected] 2 participants 4 messages Dec 13, 2013 – Dec 16, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: Create version and config information files in Android

From: Oscar Mateo <[email protected]>

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

---
 tests/Android.mk |   35 +++++++++++++++++++++++++++++++++--
 1 file changed, 33 insertions(+), 2 deletions(-)
tests/Android.mk +33 -2
index c96f30a..c65f94c 100644
@@ -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))
 
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 5 lines · On Fri, Dec 13, 2013 at 08:48:24PM +0000, [email protected] wrote:

From: Oscar Mateo <[email protected]>

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

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

Applied, thanks for the patch.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#2 lore raw
Quoted 1 line

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

#3 lore raw
Quoted 5 lines · Oscar
Quoted 1 line

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

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch