Slightly modify hackbench and fsx tests to achieve cross compiling goal.
The existing users for these tests should not be affected at all.
Index: client/tests/fsx/fsx.py
===================================================================
--- client/tests/fsx/fsx.py (revision 4488)
+++ client/tests/fsx/fsx.py (working copy)
@@ -28,6 +28,7 @@
os.chdir(self.srcdir)
utils.system('patch -p1 < ../fsx-linux.diff')
+ utils.system('patch -p1 < ../Makefile.patch')
utils.system(self.make_flags + ' make fsx-linux')
Index: client/tests/fsx/Makefile.patch
===================================================================
--- client/tests/fsx/Makefile.patch (revision 0)
+++ client/tests/fsx/Makefile.patch (revision 0)
@@ -0,0 +1,11 @@
+diff -ur src/Makefile src.new/Makefile
+--- src/Makefile 2006-03-28 21:23:21.000000000 -0800
++++ src.new/Makefile 2010-05-14 11:40:14.000000000 -0700
+@@ -1,5 +1,5 @@
+
+-CC = gcc
++CC ?= gcc
+ CFLAGS += -O -Wall -g -DAIO
+ CXXFLAGS+= -O -Wall -g
+
+Only in src: Makefile.rej
Index: client/tests/hackbench/hackbench.py
===================================================================
--- client/tests/hackbench/hackbench.py (revision 4488)
+++ client/tests/hackbench/hackbench.py (working copy)
@@ -17,7 +17,11 @@
def setup(self):
os.chdir(self.srcdir)
- utils.system('cc -lpthread hackbench.c -o hackbench')
+ if 'CC' in os.environ:
+ cc = '$CC'
+ else:
+ cc = 'cc'
+ utils.system('%s -lpthread hackbench.c -o hackbench' % cc)
def initialize(self):
--
Eric Li
李咏竹
Google Kirkland
Index: client/tests/fsx/fsx.py
===================================================================
--- client/tests/fsx/fsx.py (revision 4488)
+++ client/tests/fsx/fsx.py (working copy)
@@ -28,6 +28,7 @@
os.chdir(self.srcdir)
utils.system('patch -p1 < ../fsx-linux.diff')
+ utils.system('patch -p1 < ../Makefile.patch')
utils.system(self.make_flags + ' make fsx-linux')
Index: client/tests/fsx/Makefile.patch
===================================================================
--- client/tests/fsx/Makefile.patch (revision 0)
+++ client/tests/fsx/Makefile.patch (revision 0)
@@ -0,0 +1,11 @@
+diff -ur src/Makefile src.new/Makefile
+--- src/Makefile 2006-03-28 21:23:21.000000000 -0800
++++ src.new/Makefile 2010-05-14 11:40:14.000000000 -0700
+@@ -1,5 +1,5 @@
+
+-CC = gcc
++CC ?= gcc
+ CFLAGS += -O -Wall -g -DAIO
+ CXXFLAGS+= -O -Wall -g
+
+Only in src: Makefile.rej
Index: client/tests/hackbench/hackbench.py
===================================================================
--- client/tests/hackbench/hackbench.py (revision 4488)
+++ client/tests/hackbench/hackbench.py (working copy)
@@ -17,7 +17,11 @@
def setup(self):
os.chdir(self.srcdir)
- utils.system('cc -lpthread hackbench.c -o hackbench')
+ if 'CC' in os.environ:
+ cc = '$CC'
+ else:
+ cc = 'cc'
+ utils.system('%s -lpthread hackbench.c -o hackbench' % cc)
def initialize(self):
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest