Skip to content

Commit

Permalink
Updated the test script with a lot more work.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Sep 23, 2009
1 parent 2949d57 commit 9711e93
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions test/test.sh
Expand Up @@ -9,6 +9,8 @@ cd cmake-build
cmake ../..
make -j2

# Build some test programs (hello world, hello world with shared library,
# hello world that uses dlopen() on shared library).
gcc -O0 -ggdb3 -o hello.so ../hello-lib.c -shared -fPIC -m32
gcc -O0 -ggdb3 -o hello-x86 ../hello.c hello.so -m32 -Wl,-rpath,.
gcc -O0 -ggdb3 -o hello-dlopen-x86 ../hello-dlopen.c -ldl -m32
Expand All @@ -19,26 +21,44 @@ gcc -O0 -ggdb3 -o hello-amd64 ../hello.c hello.so -m64 -Wl,-rpath,.
gcc -O0 -ggdb3 -o hello-dlopen-amd64 ../hello-dlopen.c -ldl -m64
mv hello.so hello-amd64.so

# Glue them into FatELF binaries.
./fatelf-glue hello hello-x86 hello-amd64
./fatelf-glue hello.so hello-amd64.so hello-x86.so
./fatelf-glue hello-dlopen hello-dlopen-x86 hello-dlopen-amd64

file ./hello
# fatelf-info tests.
./fatelf-info ./hello

file ./hello.so
./fatelf-info ./hello.so
./fatelf-info ./hello-dlopen

# file(1) tests.
file ./hello
file ./hello.so
file ./hello-dlopen
./fatelf-info ./hello-dlopen

# glibc tests.
ldd ./hello
ldd ./hello.so
ldd ./hello-dlopen

# binutils tests.
size ./hello
size ./hello.so
size ./hello-dlopen
nm ./hello
nm ./hello.so
nm ./hello-dlopen
objdump -x ./hello
objdump -x ./hello.so
objdump -x ./hello-dlopen

# Link directly against a FatELF shared library (binutils test).
gcc -O0 -ggdb3 -o hello-fatlink ../hello.c hello.so -Wl,-rpath,.

# and, you know...run the programs themselves (glibc, kernel tests).
./hello
./hello-dlopen
./hello-fatlink

# end of test.sh ...


0 comments on commit 9711e93

Please sign in to comment.