Fresco/Fresco-Test/scripts Makefile.in,NONE,1.1 run_tests.sh,NONE,1.1

Tobias Hunger <[email protected]>
Newsgroups gmane.comp.video.fresco.cvs
Message-ID <[email protected]>
Update of /cvs/fresco/Fresco/Fresco-Test/scripts
In directory purcel:/tmp/cvs-serv20721/Fresco-Test/scripts

Added Files:
	Makefile.in run_tests.sh 
Log Message:
Try "make build-tests && make run-tests" in Fresco-Test and Babylon :-)


--- NEW FILE: Makefile.in ---
# $Id: Makefile.in,v 1.1 2003/04/05 22:37:35 tobias Exp $
#
# This source file is a part of the Fresco Project.
# Copyright (C) 2003 Stefan Seefeld <[email protected]> 
# http://www.fresco.org
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
# MA 02139, USA.

SHELL		:= /bin/sh

top_srcdir	:= @top_srcdir@
top_builddir	:= @top_builddir@
srcdir		:= @srcdir@
cdir		:= $(top_builddir)/config
hdir		:= $(top_srcdir)/syunit-c++/include
docdir		:= $(top_builddir)/share/doc/Fresco-Test
build_bindir	:= $(top_builddir)/bin

include $(cdir)/local.mk

SCRIPTS		:= run_tests.sh
SCRIPT_TARGETS	:= $(patsubst %, $(build_bindir)/%, $(SCRIPTS))

.FORCE:

.PHONY: all doc install install-doc clean distclean maintainer-clean dist

all:	$(SCRIPT_TARGETS)

$(SCRIPT_TARGETS):
	@echo copying $(@F).
	cp $(patsubst $(build_bindir)%, $(srcdir)%, $@) $@

build-tests:

run-tests:

clean:
	@echo removing all copied files
	rm -rf $(SCRIPT_TARGETS)

distclean: clean

maintainer-clean: distclean

dist:

--- NEW FILE: run_tests.sh ---
#!/bin/sh

# This script runs all tests given on the commandline and returns an
# exitcode of 0 if all tests passed or 1 if or more tests failed.
#
# It is meant as a quick and dirty way to run our tests from a Makefile
# without needing to register all tests with qmtest manually.

ALL_PASSED=1

function run_test()
{
    TESTPROG="$1"
    for TEST in `$TESTPROG list` ; do
        if ! $TESTPROG run $TEST | grep -q 'Result: PASS'; then
            echo "Test $TEST in $TESTPROG did not pass!"
            ALL_PASSED=0;
	else
	    echo "Test $TEST in $TESTPROG passed."
        fi
    done
}

for CURRENT in $* ; do
    run_test "$CURRENT"
done

if [ ALL_PASSED == 0 ]; then
    exit 1
fi

exit 0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.