Index: Makefile.am
===================================================================
--- Makefile.am	(revision 15e1978cca9c4568b8ac921a0fee1cac72517d81)
+++ Makefile.am	(revision 0f0407ad8f57ba8adda5a1059fe7125b8aaa5b92)
@@ -23,4 +23,6 @@
 	cd doc && $(MAKE) doxygen-doc
 
+guicheck:
+	cd tests && $(MAKE) guicheck
 extracheck:
 	cd tests && $(MAKE) extracheck
Index: configure.ac
===================================================================
--- configure.ac	(revision 15e1978cca9c4568b8ac921a0fee1cac72517d81)
+++ configure.ac	(revision 0f0407ad8f57ba8adda5a1059fe7125b8aaa5b92)
@@ -427,4 +427,11 @@
 AC_CONFIG_FILES([tests/Fragmentations/molecuilder], [chmod +x tests/Fragmentations/molecuilder])
 
+AC_CONFIG_TESTDIR(tests/GuiChecks)
+AC_CONFIG_FILES([
+	tests/GuiChecks/atlocal 
+	tests/GuiChecks/Makefile])
+AC_CONFIG_FILES([tests/GuiChecks/molecuilder], [chmod +x tests/GuiChecks/molecuilder])
+AC_CONFIG_FILES([tests/GuiChecks/molecuilderguitest], [chmod +x tests/GuiChecks/molecuilderguitest])
+
 AC_CONFIG_TESTDIR(tests/JobMarket)
 AC_CONFIG_FILES([
Index: tests/GuiChecks/Makefile.am
===================================================================
--- tests/GuiChecks/Makefile.am	(revision 0f0407ad8f57ba8adda5a1059fe7125b8aaa5b92)
+++ tests/GuiChecks/Makefile.am	(revision 0f0407ad8f57ba8adda5a1059fe7125b8aaa5b92)
@@ -0,0 +1,60 @@
+AUTOM4TE = autom4te
+
+TESTSUITE = $(srcdir)/testsuite
+
+TESTSCRIPTS = \
+	Testlauncher/testsuite-testlauncher-works.at
+
+DISTCLEANFILES = atconfig
+
+EXTRA_DIST = \
+	atlocal.in \
+	molecuilder.in \
+	molecuilderguitest.in \
+	package.m4 \
+	testsuite.at \
+	$(TESTSUITE) \
+	$(TESTSCRIPTS) \
+	Testlauncher/
+
+max_jobs = 4
+ 
+guicheck: atlocal package.m4 $(TESTSUITE)
+	nrjobs=; \
+	for flag in $$MAKEFLAGS; do \
+		case $$flag in \
+		--* | =*=) ;; \
+		*j*) nrjobs="-j$(max_jobs)" ;; \
+		esac; \
+	done; \
+	$(SHELL) '$(TESTSUITE)' $$nrjobs AUTOTEST_PATH='$(abs_top_builddir)/src' $(TESTSUITEFLAGS)
+
+installguicheck: atconfig atlocal $(TESTSUITE)
+	nrjobs=; \
+	for flag in $$MAKEFLAGS; do \
+		case $$flag in \
+		--* | =*=) ;; \
+		*j*) nrjobs="-j$(max_jobs)" ;; \
+		esac; \
+	done; \
+	$(SHELL) '$(TESTSUITE)' $$nrjobs AUTOTEST_PATH='$(bindir)' $(TESTSUITEFLAGS)
+
+clean-local:
+	test ! -f '$(TESTSUITE)' || \
+	$(SHELL) '$(TESTSUITE)' --clean
+
+AUTOTEST = $(AUTOM4TE) --language=autotest
+$(TESTSUITE): $(srcdir)/testsuite.at package.m4 $(TESTSCRIPTS)
+	$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
+	mv $@.tmp $@
+
+# The `:;' works around a Bash 3.2 bug when the output is not writeable.
+package.m4: $(top_srcdir)/configure.ac
+	:;{ \
+		echo '# Signature of the current package.' && \
+		echo 'm4_define([AT_PACKAGE_NAME],      [@PACKAGE_NAME@])' && \
+		echo 'm4_define([AT_PACKAGE_TARNAME],   [@PACKAGE_TARNAME@])' && \
+		echo 'm4_define([AT_PACKAGE_VERSION],   [@PACKAGE_VERSION@])' && \
+		echo 'm4_define([AT_PACKAGE_STRING],    [@PACKAGE_STRING@])' && \
+		echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+	} >'package.m4'
Index: tests/GuiChecks/Testlauncher/pre/testscript.py
===================================================================
--- tests/GuiChecks/Testlauncher/pre/testscript.py	(revision 0f0407ad8f57ba8adda5a1059fe7125b8aaa5b92)
+++ tests/GuiChecks/Testlauncher/pre/testscript.py	(revision 0f0407ad8f57ba8adda5a1059fe7125b8aaa5b92)
@@ -0,0 +1,1 @@
+pyMoleCuilder.CommandVersion()
Index: tests/GuiChecks/Testlauncher/pre/testscript_multiple.py
===================================================================
--- tests/GuiChecks/Testlauncher/pre/testscript_multiple.py	(revision 0f0407ad8f57ba8adda5a1059fe7125b8aaa5b92)
+++ tests/GuiChecks/Testlauncher/pre/testscript_multiple.py	(revision 0f0407ad8f57ba8adda5a1059fe7125b8aaa5b92)
@@ -0,0 +1,1 @@
+pyMoleCuilder.CommandHelp()
Index: tests/GuiChecks/Testlauncher/testsuite-testlauncher-works.at
===================================================================
--- tests/GuiChecks/Testlauncher/testsuite-testlauncher-works.at	(revision 0f0407ad8f57ba8adda5a1059fe7125b8aaa5b92)
+++ tests/GuiChecks/Testlauncher/testsuite-testlauncher-works.at	(revision 0f0407ad8f57ba8adda5a1059fe7125b8aaa5b92)
@@ -0,0 +1,38 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2015 Frederik Heber
+#
+#    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/>.
+#
+AT_SETUP([Checking that Testlauncher does something])
+AT_KEYWORDS([GuiCheck Testlauncher])
+
+AT_CHECK([../../molecuildergui --test ${abs_top_srcdir}/tests/GuiChecks/Testlauncher/pre/testscript.py], 0, [stdout], [stderr])
+AT_CHECK([grep "TESTLAUNCHER" stdout], 0, [ignore], [ignore])
+AT_CHECK([grep "Version of the program" stderr], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+AT_SETUP([Checking that Testlauncher works on multiple scripts])
+AT_KEYWORDS([GuiCheck Testlauncher])
+
+AT_CHECK([../../molecuildergui \
+	--test \
+		${abs_top_srcdir}/tests/GuiChecks/Testlauncher/pre/testscript.py \
+		${abs_top_srcdir}/tests/GuiChecks/Testlauncher/pre/testscript_multiple.py], 0, [stdout], [stderr])
+AT_CHECK([grep "TESTLAUNCHER" stdout], 0, [ignore], [ignore])
+AT_CHECK([grep "Version of the program" stderr], 0, [ignore], [ignore])
+AT_CHECK([grep "Here is a list of all available" stderr], 0, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/GuiChecks/atlocal.in
===================================================================
--- tests/GuiChecks/atlocal.in	(revision 0f0407ad8f57ba8adda5a1059fe7125b8aaa5b92)
+++ tests/GuiChecks/atlocal.in	(revision 0f0407ad8f57ba8adda5a1059fe7125b8aaa5b92)
@@ -0,0 +1,1 @@
+abs_top_srcdir='@abs_top_srcdir@'
Index: tests/GuiChecks/molecuilder.in
===================================================================
--- tests/GuiChecks/molecuilder.in	(revision 0f0407ad8f57ba8adda5a1059fe7125b8aaa5b92)
+++ tests/GuiChecks/molecuilder.in	(revision 0f0407ad8f57ba8adda5a1059fe7125b8aaa5b92)
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# wrapper for testing molecuilder
+
+. ../../atlocal
+
+if test ! -z ${valgrind}
+then
+G_SLICE=always-malloc G_DEBUG=gc-friendly \
+libtool --mode=execute \
+${valgrind} -v \
+--log-file=valgrind.log \
+--xml=yes \
+--xml-file=valgrind.err \
+--time-stamp=yes \
+--error-exitcode=255 \
+--leak-check=full \
+--leak-resolution=high \
+--num-callers=20 \
+--track-origins=yes \
+--show-reachable=yes \
+"${AUTOTEST_PATH}/molecuilder" \
+${1+"$@"}
+else
+"${AUTOTEST_PATH}/molecuilder" \
+${1+"$@"}
+fi
+
+status=$?
+
+exit $status
Index: tests/GuiChecks/molecuilderguitest.in
===================================================================
--- tests/GuiChecks/molecuilderguitest.in	(revision 0f0407ad8f57ba8adda5a1059fe7125b8aaa5b92)
+++ tests/GuiChecks/molecuilderguitest.in	(revision 0f0407ad8f57ba8adda5a1059fe7125b8aaa5b92)
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# wrapper for testing molecuildergui
+
+. ../../atlocal
+
+if test ! -z ${valgrind}
+then
+G_SLICE=always-malloc G_DEBUG=gc-friendly \
+libtool --mode=execute \
+${valgrind} -v \
+--log-file=valgrind.log \
+--xml=yes \
+--xml-file=valgrind.err \
+--time-stamp=yes \
+--error-exitcode=255 \
+--leak-check=full \
+--leak-resolution=high \
+--num-callers=20 \
+--track-origins=yes \
+--show-reachable=yes \
+"${AUTOTEST_PATH}/molecuildergui" --test-single \
+${1+"$@"}
+else
+"${AUTOTEST_PATH}/molecuildergui" --test-single \
+${1+"$@"}
+fi
+
+status=$?
+
+exit $status
Index: tests/GuiChecks/testsuite.at
===================================================================
--- tests/GuiChecks/testsuite.at	(revision 0f0407ad8f57ba8adda5a1059fe7125b8aaa5b92)
+++ tests/GuiChecks/testsuite.at	(revision 0f0407ad8f57ba8adda5a1059fe7125b8aaa5b92)
@@ -0,0 +1,32 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2015 Frederik Heber
+#
+#    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/>.
+#
+# Process with autom4te to create an -*- Autotest -*- test suite.
+#
+# see regression/... subdirs wherein for each of the cases and each check (enumerated) is a pre and post dir. 
+# In pre initial files are placed, in post results can be found to be checked by diff in this testsuite.
+
+AT_INIT([Molecular Builder])
+AT_TESTED(basename egrep find grep sed)
+
+# Use colored output with new-enough Autotest.
+m4_ifdef([AT_COLOR_TESTS], [AT_COLOR_TESTS])
+
+AT_BANNER([MoleCuilder - Code Checks])
+m4_include(atlocal)
+
+m4_include(Testlauncher/testsuite-testlauncher-works.at)
Index: tests/Makefile.am
===================================================================
--- tests/Makefile.am	(revision 15e1978cca9c4568b8ac921a0fee1cac72517d81)
+++ tests/Makefile.am	(revision 0f0407ad8f57ba8adda5a1059fe7125b8aaa5b92)
@@ -4,4 +4,5 @@
 	Calculations \
 	CodeChecks \
+	GuiChecks \
 	regression \
 	Fragmentations \
@@ -12,4 +13,6 @@
 .PHONY: extracheck installextracheck
 
+guicheck:
+	cd GuiChecks && $(MAKE) guicheck
 extracheck:
 	cd Calculations && $(MAKE) extracheck
