From: kanschat Date: Thu, 14 Sep 2006 15:55:49 +0000 (+0000) Subject: first round of regression test tests X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de38b05872f6407a8a870b38bade283b61266a81;p=dealii-svn.git first round of regression test tests git-svn-id: https://svn.dealii.org/trunk@13901 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/test/Makefile b/tests/test/Makefile new file mode 100644 index 0000000000..70d7170ccf --- /dev/null +++ b/tests/test/Makefile @@ -0,0 +1,43 @@ +############################################################ +# $Id: Makefile 13841 2006-09-06 21:04:19Z kanschat $ +# Copyright (C) 2006 by the deal.II authors +############################################################ + +############################################################ +# Test if test suite reports the expected results +# +# This directory contains tests failing at different stages. +# When running all tests, this should be reflected in the results. +# +############################################################ + +include ../Makefile.paths +include $D/common/Make.global_options +debug-mode = on + +default: run-tests + +############################################################ + +tests_x = no_compile_* no_link_* no_run_* no_diff_* ok_* + +# from above list of regular expressions, generate the real set of +# tests +expand = $(shell echo $(addsuffix .cc,$(1)) \ + | $(PERL) -pi -e 's/\.cc//g;') +tests = $(call expand,$(tests_x)) + +############################################################ +# phony header file to force compilation whenever +# make is invoked +############################################################ + +phony.h: + touch phony.h + + +include ../Makefile.rules +include Makefile.depend +include Makefile.tests + +.PHONY: default phony.h diff --git a/tests/test/README b/tests/test/README new file mode 100644 index 0000000000..bf33e41ee5 --- /dev/null +++ b/tests/test/README @@ -0,0 +1 @@ +This directory tests the testsuite, not the deal.II library! \ No newline at end of file diff --git a/tests/test/no_compile_01.cc b/tests/test/no_compile_01.cc new file mode 100644 index 0000000000..513d4610c2 --- /dev/null +++ b/tests/test/no_compile_01.cc @@ -0,0 +1,19 @@ +//---------------------------------------------------------------------- +// $Id: reference.cc 13395 2006-07-19 12:45:54Z kanschat $ +// Version: $Name$ +// +// Copyright (C) 2006 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------------------------------------------------- + +// A test program that won't compile + +int main() +{ + not_declared(); +} diff --git a/tests/test/no_diff_01.cc b/tests/test/no_diff_01.cc new file mode 100644 index 0000000000..ad5012b6a9 --- /dev/null +++ b/tests/test/no_diff_01.cc @@ -0,0 +1,22 @@ +//---------------------------------------------------------------------- +// $Id: reference.cc 13395 2006-07-19 12:45:54Z kanschat $ +// Version: $Name$ +// +// Copyright (C) 2006 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------------------------------------------------- + +// A test program that won't run, but produces results + + +#include +#include + +int main() +{ +} diff --git a/tests/test/no_diff_01/cmp/generic b/tests/test/no_diff_01/cmp/generic new file mode 100644 index 0000000000..e2da0096d9 --- /dev/null +++ b/tests/test/no_diff_01/cmp/generic @@ -0,0 +1 @@ +other results diff --git a/tests/test/no_diff_02/cmp/generic b/tests/test/no_diff_02/cmp/generic new file mode 100644 index 0000000000..e2da0096d9 --- /dev/null +++ b/tests/test/no_diff_02/cmp/generic @@ -0,0 +1 @@ +other results diff --git a/tests/test/no_diff_03.cc b/tests/test/no_diff_03.cc new file mode 100644 index 0000000000..a7e88acb7d --- /dev/null +++ b/tests/test/no_diff_03.cc @@ -0,0 +1,24 @@ +//---------------------------------------------------------------------- +// $Id: reference.cc 13395 2006-07-19 12:45:54Z kanschat $ +// Version: $Name$ +// +// Copyright (C) 2006 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------------------------------------------------- + +// A test program that produces wrong results + + +#include +#include + +int main() +{ + std::ofstream out("no_diff_03/output"); + out << "My output" << std::endl; +} diff --git a/tests/test/no_diff_03/cmp/generic b/tests/test/no_diff_03/cmp/generic new file mode 100644 index 0000000000..e2da0096d9 --- /dev/null +++ b/tests/test/no_diff_03/cmp/generic @@ -0,0 +1 @@ +other results diff --git a/tests/test/no_diff_04/cmp/generic b/tests/test/no_diff_04/cmp/generic new file mode 100644 index 0000000000..e2da0096d9 --- /dev/null +++ b/tests/test/no_diff_04/cmp/generic @@ -0,0 +1 @@ +other results diff --git a/tests/test/no_link_01.cc b/tests/test/no_link_01.cc new file mode 100644 index 0000000000..41e64fb816 --- /dev/null +++ b/tests/test/no_link_01.cc @@ -0,0 +1,21 @@ +//---------------------------------------------------------------------- +// $Id: reference.cc 13395 2006-07-19 12:45:54Z kanschat $ +// Version: $Name$ +// +// Copyright (C) 2006 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------------------------------------------------- + +// A test program that won't link + +void not_implemented(); + +int main() +{ + not_implemented(); +} diff --git a/tests/test/no_run_01.cc b/tests/test/no_run_01.cc new file mode 100644 index 0000000000..a2f89b1641 --- /dev/null +++ b/tests/test/no_run_01.cc @@ -0,0 +1,22 @@ +//---------------------------------------------------------------------- +// $Id: reference.cc 13395 2006-07-19 12:45:54Z kanschat $ +// Version: $Name$ +// +// Copyright (C) 2006 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------------------------------------------------- + +// A test program that won't run and does not produce results + + +#include + +int main() +{ + exit(1); +} diff --git a/tests/test/no_run_03.cc b/tests/test/no_run_03.cc new file mode 100644 index 0000000000..f5f80d4dea --- /dev/null +++ b/tests/test/no_run_03.cc @@ -0,0 +1,26 @@ +//---------------------------------------------------------------------- +// $Id: reference.cc 13395 2006-07-19 12:45:54Z kanschat $ +// Version: $Name$ +// +// Copyright (C) 2006 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------------------------------------------------- + +// A test program that won't run, but produces results + + +#include +#include + +int main() +{ + std::ofstream out("no_run_03/output"); + out << "My output" << std::endl; + + exit(1); +} diff --git a/tests/test/ok_01.cc b/tests/test/ok_01.cc new file mode 100644 index 0000000000..b387bdfc88 --- /dev/null +++ b/tests/test/ok_01.cc @@ -0,0 +1,24 @@ +//---------------------------------------------------------------------- +// $Id: reference.cc 13395 2006-07-19 12:45:54Z kanschat $ +// Version: $Name$ +// +// Copyright (C) 2006 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------------------------------------------------- + +// A test program that produces correct results + + +#include +#include + +int main() +{ + std::ofstream out("ok_01/output"); + out << "My output" << std::endl; +} diff --git a/tests/test/ok_01/cmp/generic b/tests/test/ok_01/cmp/generic new file mode 100644 index 0000000000..09f017120d --- /dev/null +++ b/tests/test/ok_01/cmp/generic @@ -0,0 +1 @@ +My output