From ed9e6a586d3076711f16ae1a764da5bfedacd4ea Mon Sep 17 00:00:00 2001 From: kanschat Date: Thu, 14 Sep 2006 16:15:40 +0000 Subject: [PATCH] second round of regression test tests git-svn-id: https://svn.dealii.org/trunk@13902 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/test/Makefile | 4 ++++ tests/test/README | 16 +++++++++++++++- tests/test/no_compile_02.cc | 21 +++++++++++++++++++++ tests/test/no_diff_01.cc | 2 +- tests/test/no_link_02.cc | 23 +++++++++++++++++++++++ tests/test/no_run_02.cc | 24 ++++++++++++++++++++++++ tests/test/no_run_03/cmp/generic | 1 + tests/test/no_run_04.cc | 28 ++++++++++++++++++++++++++++ tests/test/no_run_04/cmp/generic | 1 + 9 files changed, 118 insertions(+), 2 deletions(-) create mode 100644 tests/test/no_compile_02.cc create mode 100644 tests/test/no_link_02.cc create mode 100644 tests/test/no_run_02.cc create mode 100644 tests/test/no_run_03/cmp/generic create mode 100644 tests/test/no_run_04.cc create mode 100644 tests/test/no_run_04/cmp/generic diff --git a/tests/test/Makefile b/tests/test/Makefile index 70d7170ccf..a0d3e9b740 100644 --- a/tests/test/Makefile +++ b/tests/test/Makefile @@ -35,6 +35,10 @@ tests = $(call expand,$(tests_x)) phony.h: touch phony.h +### Make sure even numbers are are always recompiled + +no_*_?[02468]/obj.g.o: phony.h + include ../Makefile.rules include Makefile.depend diff --git a/tests/test/README b/tests/test/README index bf33e41ee5..61da174e97 100644 --- a/tests/test/README +++ b/tests/test/README @@ -1 +1,15 @@ -This directory tests the testsuite, not the deal.II library! \ No newline at end of file +This directory tests the testsuite, not the deal.II library! + +Things that should be checked for when changing the implementation of +the test suite: + +1. After make clean, first and second run should produce same results +2. Tests with even number should produce same results as previous odd number +3. Tests should produce results as indicated by their name + + + +Remarks on the implementation + +The file phony.h is used to make sure compilation is started in EVERY +run of make for targets with even numbers. diff --git a/tests/test/no_compile_02.cc b/tests/test/no_compile_02.cc new file mode 100644 index 0000000000..3f0db50506 --- /dev/null +++ b/tests/test/no_compile_02.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 compile + +#include "phony.h" + +int main() +{ + not_declared(); +} diff --git a/tests/test/no_diff_01.cc b/tests/test/no_diff_01.cc index ad5012b6a9..2179f84a71 100644 --- a/tests/test/no_diff_01.cc +++ b/tests/test/no_diff_01.cc @@ -11,7 +11,7 @@ // //---------------------------------------------------------------------- -// A test program that won't run, but produces results +// A test program runs, but won't produce results #include diff --git a/tests/test/no_link_02.cc b/tests/test/no_link_02.cc new file mode 100644 index 0000000000..c8d0074010 --- /dev/null +++ b/tests/test/no_link_02.cc @@ -0,0 +1,23 @@ +//---------------------------------------------------------------------- +// $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 + +#include "phony.h" + +void not_implemented(); + +int main() +{ + not_implemented(); +} diff --git a/tests/test/no_run_02.cc b/tests/test/no_run_02.cc new file mode 100644 index 0000000000..f2a1721068 --- /dev/null +++ b/tests/test/no_run_02.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 won't run and does not produce results + + +#include + +#include "phony.h" + +int main() +{ + exit(1); +} diff --git a/tests/test/no_run_03/cmp/generic b/tests/test/no_run_03/cmp/generic new file mode 100644 index 0000000000..09f017120d --- /dev/null +++ b/tests/test/no_run_03/cmp/generic @@ -0,0 +1 @@ +My output diff --git a/tests/test/no_run_04.cc b/tests/test/no_run_04.cc new file mode 100644 index 0000000000..fadf723da4 --- /dev/null +++ b/tests/test/no_run_04.cc @@ -0,0 +1,28 @@ +//---------------------------------------------------------------------- +// $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 + +#include "phony.h" + +int main() +{ + std::ofstream out("no_run_04/output"); + out << "My output" << std::endl; + + exit(1); +} diff --git a/tests/test/no_run_04/cmp/generic b/tests/test/no_run_04/cmp/generic new file mode 100644 index 0000000000..09f017120d --- /dev/null +++ b/tests/test/no_run_04/cmp/generic @@ -0,0 +1 @@ +My output -- 2.39.5