summaryrefslogtreecommitdiffstats
path: root/patches/ltp-full-20090131/ltp-full-20090131-arch-specific-tests.diff
blob: a3733d92a04a617218e931ac4b40fe8d9474bc44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
Subject: [patch] add infrastructure to make tests arch dependend
From: Robert Schwebel <r.schwebel@pengutronix.de>

Propagate host_cpu to Makefiles, in order to make some tests arch
dependend.

FIXME: Patch not finished yet...

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>

---
 config.mk.in                                                |    3 ++
 configure.ac                                                |    6 ++++
 testcases/kernel/sched/hyperthreading/Makefile              |    3 +-
 testcases/kernel/sched/hyperthreading/ht_affinity/Makefile  |    2 -
 testcases/kernel/sched/hyperthreading/ht_enabled/Makefile   |    2 -
 testcases/kernel/sched/hyperthreading/ht_interrupt/Makefile |    2 -
 testcases/realtime/Makefile.in                              |   16 ++++++++++++
 7 files changed, 30 insertions(+), 4 deletions(-)

Index: ltp-full-20090131/configure.ac
===================================================================
--- ltp-full-20090131.orig/configure.ac
+++ ltp-full-20090131/configure.ac
@@ -7,6 +7,8 @@ AC_CONFIG_FILES([config.mk m4/Makefile])
 AC_CANONICAL_BUILD
 AC_CANONICAL_HOST
 
+AC_SUBST(host_cpu)
+
 AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
 
 AC_PROG_CC
@@ -23,4 +25,8 @@ LTP_CHECK_SYSCALL_EVENTFD
 LTP_CHECK_SYSCALL_MODIFY_LDT
 LTP_CHECK_SYSCALL_SIGNALFD
 
+AC_CONFIG_FILES([
+	testcases/realtime/Makefile
+])
+
 AC_OUTPUT
Index: ltp-full-20090131/testcases/realtime/Makefile.in
===================================================================
--- /dev/null
+++ ltp-full-20090131/testcases/realtime/Makefile.in
@@ -0,0 +1,16 @@
+host_cpu := @host_cpu@
+
+srcdir := .
+include $(srcdir)/config.mk
+
+SUBDIRS = lib func perf stress
+
+all:
+	@set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i; done
+
+install:
+	@set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i install; done
+
+clean:
+	@set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i clean ; done
+	@rm .config
Index: ltp-full-20090131/config.mk.in
===================================================================
--- ltp-full-20090131.orig/config.mk.in
+++ ltp-full-20090131/config.mk.in
@@ -7,3 +7,6 @@ CFLAGS = @CFLAGS@
 LDFLAGS = @LDFLAGS@
 
 AIO_LIBS = @AIO_LIBS@
+
+TARGET_ARCHITECTURE = @host_cpu@
+
Index: ltp-full-20090131/testcases/kernel/sched/hyperthreading/Makefile
===================================================================
--- ltp-full-20090131.orig/testcases/kernel/sched/hyperthreading/Makefile
+++ ltp-full-20090131/testcases/kernel/sched/hyperthreading/Makefile
@@ -1,5 +1,6 @@
+include ../../../../config.mk
 
-OSV := $(shell uname -m|grep i[3-6]86)
+OSV := $(shell echo $(TARGET_ARCHITECTURE) | grep i[3-6]86)
 ifeq (,$(OSV))
 else
 export CFLAGS+= -DARCH_i386
Index: ltp-full-20090131/testcases/kernel/sched/hyperthreading/ht_affinity/Makefile
===================================================================
--- ltp-full-20090131.orig/testcases/kernel/sched/hyperthreading/ht_affinity/Makefile
+++ ltp-full-20090131/testcases/kernel/sched/hyperthreading/ht_affinity/Makefile
@@ -9,7 +9,7 @@ all: $(TARGETS)
 #ht_affinity: HTaffinity.o HTutils.o
 #	gcc -o ht_affinity HTaffinity.o HTutils.o $(CFLAGS) $(LOADLIBES)
 ht_affinity:
-	gcc -o ht_affinity HTaffinity.c HTutils.c $(CFLAGS) $(LOADLIBES)
+	$(CC) -o ht_affinity HTaffinity.c HTutils.c $(CFLAGS) $(LOADLIBES)
 
 install:
 	@set -e; for i in $(TARGETS) ; do ln -f $$i ../../../../bin/$$i ; done
Index: ltp-full-20090131/testcases/kernel/sched/hyperthreading/ht_enabled/Makefile
===================================================================
--- ltp-full-20090131.orig/testcases/kernel/sched/hyperthreading/ht_enabled/Makefile
+++ ltp-full-20090131/testcases/kernel/sched/hyperthreading/ht_enabled/Makefile
@@ -7,7 +7,7 @@ TARGETS  := ht_enabled
 all: $(TARGETS)
 
 ht_enabled:
-	gcc -o ht_enabled HTenabled.c HTutils.c $(CFLAGS) $(LOADLIBES)
+	$(CC) -o ht_enabled HTenabled.c HTutils.c $(CFLAGS) $(LOADLIBES)
 
 install:
 	@set -e; for i in $(TARGETS) ; do ln -f $$i ../../../../bin/$$i ; done
Index: ltp-full-20090131/testcases/kernel/sched/hyperthreading/ht_interrupt/Makefile
===================================================================
--- ltp-full-20090131.orig/testcases/kernel/sched/hyperthreading/ht_interrupt/Makefile
+++ ltp-full-20090131/testcases/kernel/sched/hyperthreading/ht_interrupt/Makefile
@@ -7,7 +7,7 @@ TARGETS = ht_interrupt
 all: $(TARGETS)
 
 ht_interrupt:
-	gcc -o ht_interrupt HTinterrupt.c HTutils.c $(CFLAGS) $(LOADLIBES) 
+	$(CC) -o ht_interrupt HTinterrupt.c HTutils.c $(CFLAGS) $(LOADLIBES)
 
 install:
 	@set -e; for i in $(TARGETS) ; do ln -f $$i ../../../../bin/$$i ; done