screen-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[screen-devel] [PATCH] skeletal test suite


From: William Pursell
Subject: [screen-devel] [PATCH] skeletal test suite
Date: Thu, 09 Oct 2008 21:29:38 +0100
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)


Here is a set of patches that introduces a skeletal
test suite.  patch #11 is too large to post to the
list and is the result of moving configure.ac,
autogen.sh, and acconfig.h to the top-level
directory.  For clarification, applying the
first 10 patches and merging with d128abd
should yield c8e16b66, and applying these
patches yields 6830af40e9.


--
William Pursell
>From 90970ff2f7c4ac8bf39a59dfa9b7a449f2689c9c Mon Sep 17 00:00:00 2001
From: William Pursell <address@hidden>
Date: Thu, 9 Oct 2008 16:26:10 +0100
Subject: [PATCH] Added top-level Makefile.am

---
 Makefile.am |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 Makefile.am

diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..a459377
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = src tests
-- 
1.6.0.2.GIT

>From 05b8125d133b938f65fb9be321ee6e5b687888d9 Mon Sep 17 00:00:00 2001
From: William Pursell <address@hidden>
Date: Thu, 9 Oct 2008 16:28:07 +0100
Subject: [PATCH] Added top-level .gitignore.

---
 .gitignore     |   18 ++++++++++++++++++
 src/.gitignore |   15 ---------------
 2 files changed, 18 insertions(+), 15 deletions(-)
 create mode 100644 .gitignore

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..130e761
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,18 @@
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache/
+configure
+config.h
+config.h.in
+config.log
+config.status
+depcomp
+install-sh
+missing
+stamp-h1
+configure
+screen*.tar.gz
+.deps/
+install-sh
+stamp-h1
diff --git a/src/.gitignore b/src/.gitignore
index 581cebd..b8ea8ba 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -2,29 +2,14 @@
 .*.swp
 \#*\#
 *~
-Makefile
-Makefile.in
-aclocal.m4
-autom4te.cache
 cscope.out
 TAGS
 tags
 comm.h
-config.h
-config.h.in
-config.log
-config.status
-configure
 kmapdef.c
 osdef.h
 term.h
 screen
 stamp-h.in
 tty.c
-screen*.tar.gz
-.deps/
-depcomp
-install-sh
-missing
-stamp-h1
 texinfo.tex
-- 
1.6.0.2.GIT

>From e77e398852e43ed141716e969dada2f2c0df803e Mon Sep 17 00:00:00 2001
From: William Pursell <address@hidden>
Date: Thu, 9 Oct 2008 16:31:23 +0100
Subject: [PATCH] Changed paths in configure.ac and src/Makefile.am to reflect 
new structure.

---
 configure.ac    |    4 ++--
 src/Makefile.am |   14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index dac1d33..f2fcdbd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,7 +7,7 @@ dnl providing a sample configure.in file for screen.
 dnl
 
 AC_INIT([screen], [4.1.0], address@hidden)
-AC_CONFIG_SRCDIR([screen.c])
+AC_CONFIG_SRCDIR([src/screen.c])
 AC_CONFIG_HEADER([config.h])
 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
 
@@ -1276,7 +1276,7 @@ test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet 
-lnsl -lsec -lseq"
 
 AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal 
error. Sorry.))
 
-AC_CONFIG_FILES([ Makefile doc/Makefile])
+AC_CONFIG_FILES([ Makefile src/Makefile src/doc/Makefile])
 AC_OUTPUT
 
 for i in term.sh tty.sh comm.sh osdef.sh; do
diff --git a/src/Makefile.am b/src/Makefile.am
index 9b1e67d..1fd931e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -29,7 +29,7 @@ screen_SOURCES = screen.c ansi.c fileio.c mark.c misc.c 
resize.c socket.c \
        termcap.c input.c attacher.c pty.c process.c display.c comm.c \
        kmapdef.c acls.c braille.c braille_tsi.c logfile.c layer.c \
        sched.c teln.c nethack.c encoding.c \
-       acconfig.h acls.h ansi.h braille.h display.h extern.h \
+       ../acconfig.h acls.h ansi.h braille.h display.h extern.h \
        image.h layer.h logfile.h mark.h os.h patchlevel.h \
        sched.h screen.h window.h
 
@@ -62,11 +62,11 @@ kmapdef.c: term.h
 tty.c: tty.sh 
        sh $(srcdir)/tty.sh tty.c
 
-comm.h: comm.c comm.sh config.h
-       AWK=$(AWK) CC="$(CC) $(CFLAGS)" srcdir=${srcdir} sh $(srcdir)/comm.sh
+comm.h: comm.c comm.sh ../config.h
+       AWK=$(AWK) CC="$(CC) $(CFLAGS) -I.." srcdir=${srcdir} sh 
$(srcdir)/comm.sh
 
-osdef.h: osdef.sh config.h osdef.h.in
-       CPP="$(CPP) $(AM_CPPFLAGS)" srcdir=${srcdir} sh $(srcdir)/osdef.sh
+osdef.h: osdef.sh ../config.h osdef.h.in
+       CPP="$(CPP) $(AM_CPPFLAGS) -I.." srcdir=${srcdir} sh $(srcdir)/osdef.sh
 
 docs:
        cd doc; $(MAKE) dvi screen.info
@@ -75,8 +75,8 @@ dvi info screen.info:
        -cd doc; $(MAKE) $@
 
 EXTRA_DIST = term.sh tty.sh comm.sh osdef.sh osdef.h.in
-CLEANFILES = screen osdef0.c osdef1.sed osdef2.sed core
-DISTCLEANFILES = tty.c term.h comm.h osdef.h kmapdef.c
+CLEANFILES = screen osdef0.c osdef1.sed osdef2.sed core comm.h osdef.h term.h
+DISTCLEANFILES = tty.c kmapdef.c
 
 utfdir = $(datarootdir)/screen/utf8encodings
 dist_utf_DATA = $(srcdir)/utf8encodings/??
-- 
1.6.0.2.GIT

>From 6830af40e90b4c2383995c317439103e5c5ccd95 Mon Sep 17 00:00:00 2001
From: William Pursell <address@hidden>
Date: Thu, 9 Oct 2008 21:16:45 +0100
Subject: [PATCH] Added skeletal test suite.

---
 configure.ac        |    2 +-
 tests/Makefile.am   |    3 +++
 tests/screen-test.c |   14 ++++++++++++++
 3 files changed, 18 insertions(+), 1 deletions(-)
 create mode 100644 tests/Makefile.am
 create mode 100644 tests/screen-test.c

diff --git a/configure.ac b/configure.ac
index f2fcdbd..270251a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1276,7 +1276,7 @@ test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet 
-lnsl -lsec -lseq"
 
 AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal 
error. Sorry.))
 
-AC_CONFIG_FILES([ Makefile src/Makefile src/doc/Makefile])
+AC_CONFIG_FILES([ Makefile tests/Makefile src/Makefile src/doc/Makefile])
 AC_OUTPUT
 
 for i in term.sh tty.sh comm.sh osdef.sh; do
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..8fb3644
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,3 @@
+
+TESTS = screen-test
+check_PROGRAMS = screen-test
diff --git a/tests/screen-test.c b/tests/screen-test.c
new file mode 100644
index 0000000..66cd396
--- /dev/null
+++ b/tests/screen-test.c
@@ -0,0 +1,14 @@
+
+#include <stdio.h>
+
+int
+main( void )
+{
+       puts( "No unit tests have been written!" );
+
+       /*
+        * Automake interprets a return of 77 to mean
+        * that the test was skipped.
+        */
+       return 77;
+}
-- 
1.6.0.2.GIT


reply via email to

[Prev in Thread] Current Thread [Next in Thread]