summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLogan Chien <loganchien@google.com>2011-11-22 12:35:12 +0800
committerLogan Chien <loganchien@google.com>2011-11-22 12:48:43 +0800
commit2132882bcef9027e7ca16d4bc3cfea095695ac9f (patch)
tree2b4c8e5d3d773b7e5e0662605b64ad23aa7863db
parentf0923605d5a436951478453ee6d2c428bc637dad (diff)
downloadlinkloader-2132882bcef9027e7ca16d4bc3cfea095695ac9f.tar.gz
Remove the generated binary.
You can generate the test case object files by running gen-testcases.sh. Change-Id: Ib8b3ffd4a522447e06098f564d720e5af5c3b13a
-rw-r--r--.gitignore2
-rwxr-xr-xtests/images/clean-testcases.sh18
-rwxr-xr-xtests/images/gen-test-elf.sh31
-rwxr-xr-xtests/images/gen-testcases.sh38
-rw-r--r--tests/images/rodata-test-arm.obin1452 -> 0 bytes
-rw-r--r--tests/images/rodata-test-tegra2.obin1432 -> 0 bytes
-rw-r--r--tests/images/rodata-test-x86_32.obin1256 -> 0 bytes
-rw-r--r--tests/images/rodata-test-x86_64.obin2160 -> 0 bytes
-rw-r--r--tests/images/simple-test-arm.obin1472 -> 0 bytes
-rw-r--r--tests/images/simple-test-x86_32.obin1328 -> 0 bytes
-rw-r--r--tests/images/simple-test-x86_64.obin2104 -> 0 bytes
-rw-r--r--tests/images/test-arm.obin2580 -> 0 bytes
-rw-r--r--tests/images/test-tegra2.obin2568 -> 0 bytes
-rw-r--r--tests/images/test-x86_32.obin2496 -> 0 bytes
-rw-r--r--tests/images/test-x86_64.obin4136 -> 0 bytes
15 files changed, 58 insertions, 31 deletions
diff --git a/.gitignore b/.gitignore
index 5b2d462..050fe5e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
.sconsign.dblite
+tests/images/*.o
+tests/images/*.bc
diff --git a/tests/images/clean-testcases.sh b/tests/images/clean-testcases.sh
new file mode 100755
index 0000000..1c2d0be
--- /dev/null
+++ b/tests/images/clean-testcases.sh
@@ -0,0 +1,18 @@
+#!/bin/bash -e
+
+
+# Copyright (C) 2011 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+rm -rf *.o *.bc
diff --git a/tests/images/gen-test-elf.sh b/tests/images/gen-test-elf.sh
deleted file mode 100755
index b006ac6..0000000
--- a/tests/images/gen-test-elf.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (C) 2011 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-#!/bin/bash
-
-clang -integrated-as -std=c89 -c test.c -o test-tegra2.o -ccc-host-triple armv7-none-linux-gnueabi -mcpu=cortex-a9 -mfpu=vfp
-clang -integrated-as -std=c89 -c test.c -o test-arm.o -ccc-host-triple armv7-none-linux-gnueabi
-clang -integrated-as -std=c89 -c test.c -o test-x86_32.o -ccc-host-triple i686-none-linux
-clang -integrated-as -std=c89 -c test.c -o test-x86_64.o -ccc-host-triple x86_64-none-linux
-
-clang -integrated-as -std=c89 -c simple-test.c -o simple-test-arm.o -ccc-host-triple armv7-none-linux-gnueabi
-clang -integrated-as -std=c89 -c simple-test.c -o simple-test-x86_32.o -ccc-host-triple i686-none-linux
-clang -integrated-as -std=c89 -c simple-test.c -o simple-test-x86_64.o -ccc-host-triple x86_64-none-linux
-
-clang -integrated-as -std=c89 -c rodata-test.c -o rodata-test-tegra2.o -ccc-host-triple armv7-none-linux-gnueabi -mcpu=cortex-a9 -mfpu=vfp
-clang -integrated-as -std=c89 -c rodata-test.c -o rodata-test-arm.o -ccc-host-triple armv7-none-linux-gnueabi
-clang -integrated-as -std=c89 -c rodata-test.c -o rodata-test-x86_32.o -ccc-host-triple i686-none-linux
-clang -integrated-as -std=c89 -c rodata-test.c -o rodata-test-x86_64.o -ccc-host-triple x86_64-none-linux
diff --git a/tests/images/gen-testcases.sh b/tests/images/gen-testcases.sh
new file mode 100755
index 0000000..b9f41ab
--- /dev/null
+++ b/tests/images/gen-testcases.sh
@@ -0,0 +1,38 @@
+#!/bin/bash -e
+
+
+# Copyright (C) 2011 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+CYAN='\033[1;36m'
+RESET='\033[m'
+
+echo -e "${CYAN}Generating bitcode ...${RESET}"
+clang -emit-llvm -std=c89 -Wall -c test.c -o test.bc
+clang -emit-llvm -std=c89 -Wall -c simple-test.c -o simple-test.bc
+clang -emit-llvm -std=c89 -Wall -c rodata-test.c -o rodata-test.bc
+
+function gen_test_cases {
+ echo -e "${CYAN}Generating for $1 ...${RESET}"
+ llc -filetype=obj -mtriple $2 $3 test.bc -o test-$1.o
+ llc -filetype=obj -mtriple $2 $3 simple-test.bc -o simple-test-$1.o
+ llc -filetype=obj -mtriple $2 $3 rodata-test.bc -o rodata-test-$1.o
+}
+
+gen_test_cases arm armv7-none-linux-gnueabi
+gen_test_cases tegra2 armv7-none-linux-gnueabi '-mcpu=cortex-a9 -mattr=+vfp3'
+gen_test_cases x86_32 i686-none-linux
+gen_test_cases x86_64 x86_64-none-linux
+gen_test_cases mipsel mipsel-none-linux-gnueabi
diff --git a/tests/images/rodata-test-arm.o b/tests/images/rodata-test-arm.o
deleted file mode 100644
index 7e8cea5..0000000
--- a/tests/images/rodata-test-arm.o
+++ /dev/null
Binary files differ
diff --git a/tests/images/rodata-test-tegra2.o b/tests/images/rodata-test-tegra2.o
deleted file mode 100644
index f51cc7a..0000000
--- a/tests/images/rodata-test-tegra2.o
+++ /dev/null
Binary files differ
diff --git a/tests/images/rodata-test-x86_32.o b/tests/images/rodata-test-x86_32.o
deleted file mode 100644
index 6fa9c1c..0000000
--- a/tests/images/rodata-test-x86_32.o
+++ /dev/null
Binary files differ
diff --git a/tests/images/rodata-test-x86_64.o b/tests/images/rodata-test-x86_64.o
deleted file mode 100644
index 0749002..0000000
--- a/tests/images/rodata-test-x86_64.o
+++ /dev/null
Binary files differ
diff --git a/tests/images/simple-test-arm.o b/tests/images/simple-test-arm.o
deleted file mode 100644
index 476c328..0000000
--- a/tests/images/simple-test-arm.o
+++ /dev/null
Binary files differ
diff --git a/tests/images/simple-test-x86_32.o b/tests/images/simple-test-x86_32.o
deleted file mode 100644
index 80f7ead..0000000
--- a/tests/images/simple-test-x86_32.o
+++ /dev/null
Binary files differ
diff --git a/tests/images/simple-test-x86_64.o b/tests/images/simple-test-x86_64.o
deleted file mode 100644
index 46ff958..0000000
--- a/tests/images/simple-test-x86_64.o
+++ /dev/null
Binary files differ
diff --git a/tests/images/test-arm.o b/tests/images/test-arm.o
deleted file mode 100644
index 6c4f4cb..0000000
--- a/tests/images/test-arm.o
+++ /dev/null
Binary files differ
diff --git a/tests/images/test-tegra2.o b/tests/images/test-tegra2.o
deleted file mode 100644
index 66c56d6..0000000
--- a/tests/images/test-tegra2.o
+++ /dev/null
Binary files differ
diff --git a/tests/images/test-x86_32.o b/tests/images/test-x86_32.o
deleted file mode 100644
index 18452da..0000000
--- a/tests/images/test-x86_32.o
+++ /dev/null
Binary files differ
diff --git a/tests/images/test-x86_64.o b/tests/images/test-x86_64.o
deleted file mode 100644
index 83e7b8c..0000000
--- a/tests/images/test-x86_64.o
+++ /dev/null
Binary files differ