* [gentoo-commits] proj/elfix:master commit in: /, tests/
@ 2011-05-05 15:19 Anthony G. Basile
0 siblings, 0 replies; only message in thread
From: Anthony G. Basile @ 2011-05-05 15:19 UTC (permalink / raw
To: gentoo-commits
commit: 262d707f2014950979f722f7e79a35904d3b08a4
Author: Anthony G. Basile <basile <AT> opensource <DOT> dyc <DOT> edu>
AuthorDate: Thu May 5 15:19:25 2011 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Thu May 5 15:19:25 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=262d707f
tests: renaming to be more specific
---
Makefile.am | 5 ++---
configure.ac | 5 +++--
tests/Makefile.am | 33 +++++++++++++--------------------
tests/{bad.c => bad-gnustack.c} | 0
tests/{test-bad32.asm => bad32.asm} | 0
tests/{test-bad64.asm => bad64.asm} | 0
tests/good.c | 23 -----------------------
7 files changed, 18 insertions(+), 48 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index afff66d..1027f2e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,4 @@
if TEST
-SUBDIRS = src doc tests
-else
-SUBDIRS = src doc
+SUBDIRS_TESTS = tests
endif
+SUBDIRS = src doc $(SUBDIRS_TESTS)
diff --git a/configure.ac b/configure.ac
index fe326ec..140ae6e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,8 +7,6 @@ AC_CONFIG_SRCDIR([src/fix-gnustack.c])
#AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.11 foreign])
-# Checks for programs.
-AC_PROG_CC
AC_ARG_ENABLE(
[tests],
AS_HELP_STRING(
@@ -27,6 +25,9 @@ AC_ARG_ENABLE(
)
AM_CONDITIONAL([TEST],[test "x$has_yasm" = "xyes"])
+# Checks for programs.
+AC_PROG_CC
+
# Checks for libraries.
AC_CHECK_LIB([elf], [elf_begin])
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a7fafde..ab23520 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,14 +1,13 @@
-noinst_PROGRAMS = good bad
-good_SOURCES = good.c
-bad_SOURCES = bad.c
-bad_DEPENDENCIES = test-bad.o
-bad_LDADD = test-bad.o
+noinst_PROGRAMS = bad-gnustack
+bad_gnustack_SOURCES = bad-gnustack.c
+bad_gnustack_DEPENDENCIES = bad-asm.o
+bad_gnustack_LDADD = bad-asm.o
ARCH = $(shell uname -m | sed -e 's/i./x/')
-test-bad.o: test-bad64.asm test-bad32.asm
- [[ "$(ARCH)" == "x86" ]] && yasm -f elf -m x86 test-bad32.asm && mv test-bad32.o test-bad.o || true
- [[ "$(ARCH)" == "x86_64" ]] && yasm -f elf -m amd64 test-bad64.asm && mv test-bad64.o test-bad.o || true
+bad-asm.o: bad64.asm bad32.asm
+ [[ "$(ARCH)" == "x86" ]] && yasm -f elf -m x86 bad32.asm && mv bad32.o bad-asm.o || true
+ [[ "$(ARCH)" == "x86_64" ]] && yasm -f elf -m amd64 bad64.asm && mv bad64.o bad-asm.o || true
check_SCRIPTS = test.sh
TEST = $(check_SCRIPTS)
@@ -16,19 +15,13 @@ TEST = $(check_SCRIPTS)
test.sh:
@echo "================================================================================"
@echo
- @echo "Good Elf"
- @../src/fix-gnustack good
+ @echo "Fixing Bad GNU_STACK Elf"
+ @../src/fix-gnustack -f bad-gnustack
@echo
- @echo "Bad Elf"
- @../src/fix-gnustack bad
- @echo
- @echo "Fixing Bad Elf"
- @../src/fix-gnustack -f bad
- @echo
- @echo "Fixed Bad Elf"
- @../src/fix-gnustack bad
- @rm -f good bad
+ @echo "Fixed Bad GNU_STACK Elf"
+ @../src/fix-gnustack bad-gnustack
+ @rm -f good
@echo
@echo "================================================================================"
-CLEANFILES = test-bad.o test.sh
+CLEANFILES = bad-asm.o test.sh
diff --git a/tests/bad.c b/tests/bad-gnustack.c
similarity index 100%
rename from tests/bad.c
rename to tests/bad-gnustack.c
diff --git a/tests/test-bad32.asm b/tests/bad32.asm
similarity index 100%
rename from tests/test-bad32.asm
rename to tests/bad32.asm
diff --git a/tests/test-bad64.asm b/tests/bad64.asm
similarity index 100%
rename from tests/test-bad64.asm
rename to tests/bad64.asm
diff --git a/tests/good.c b/tests/good.c
deleted file mode 100644
index ff7700e..0000000
--- a/tests/good.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- good.c: C source for sample elf with no X on GNU_STACK
- Copyright (C) 2011 Anthony G. Basile
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-int main()
-{
- ;
- return 0 ;
-}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-05-05 15:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-05 15:19 [gentoo-commits] proj/elfix:master commit in: /, tests/ Anthony G. Basile
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox