From 9a8a000f7f1520161d5d2be71de9fe952ac6e08b Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 9 Nov 2005 23:04:35 +0000 Subject: [PATCH] A way to generate chains of test result files. git-svn-id: https://svn.dealii.org/trunk@11755 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/hierarchy.pl | 67 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 tests/hierarchy.pl diff --git a/tests/hierarchy.pl b/tests/hierarchy.pl new file mode 100644 index 0000000000..2c3c43ae3b --- /dev/null +++ b/tests/hierarchy.pl @@ -0,0 +1,67 @@ +# Given the name of a configuration (i.e. system-name+compiler-name), this script +# generates a list of files that might contain the stored output of a test. The +# purpose is so that we don't have to store the output of each test for each +# configuration: if the output for a given configuration is equal to that of +# a related configuration, then we fall back to the latter, whereas we use +# the former if it is really different. This way we get a chain of +# possible files. +# +# For example, for a test named "check_me", if we run on a linux x86 system with +# compiler gcc3.4, we may have a file with output stored as +# check_me/cmp/i686-pc-linux-gnu+gcc3.4 +# However, if it is the same as what we would have gotten with gcc3.3, there would +# be no point in storing it and we should fall back to the output of gcc3.3. If +# that output would have been the same as that for a generic compiler (which we +# take as gcc3.2 on a x86 box), then the file +# check_me/cmp/i686-pc-linux-gnu+gcc3.3 +# may not exist either. +# +# When we want to compare generated output against stored output, we should therefore +# first compare against +# check_me/cmp/i686-pc-linux-gnu+gcc3.4 +# and if that doesn't exist against +# check_me/cmp/i686-pc-linux-gnu+gcc3.3 +# and if that doesn't exist again +# check_me/cmp/generic +# (this latter file should always exist). +# +# This program generates this chain of files to check against, for any given input +# configuration. +# +# Author: Wolfgang Bangerth, 2005 + + +$hierarchy{"i686-pc-linux-gnu+gcc3.3"} = "generic"; +$hierarchy{"i686-pc-linux-gnu+gcc3.4"} = "i686-pc-linux-gnu+gcc3.3"; +$hierarchy{"i686-pc-linux-gnu+gcc4.0"} = "i686-pc-linux-gnu+gcc3.4"; +$hierarchy{"i686-pc-linux-gnu+gcc4.1"} = "i686-pc-linux-gnu+gcc4.0"; + +$hierarchy{"i686-pc-linux-gnu+icc7"} = "generic"; +$hierarchy{"i686-pc-linux-gnu+icc7.1"} = "i686-pc-linux-gnu+icc7"; + +$hierarchy{"mips-sgi-irix6.5+MIPSpro7.4"} = "generic"; + +$hierarchy{"x86_64-unknown-linux-gnu+gcc3.3"} = "generic"; +$hierarchy{"x86_64-unknown-linux-gnu+gcc3.4"} = "x86_64-unknown-linux-gnu+gcc3.3"; +$hierarchy{"x86_64-unknown-linux-gnu+gcc4.0"} = "x86_64-unknown-linux-gnu+gcc3.4"; +$hierarchy{"x86_64-unknown-linux-gnu+gcc4.1"} = "x86_64-unknown-linux-gnu+gcc4.0"; + + +$configuration = $ARGV[0]; + +# first check whether the given configuration is known at all. if not, +# we can only resort to the generic files +if (! defined $hierarchy{$configuration}) { + print "generic\n"; + exit; +} + +# so the configuration is known. now output a list of files that we +# will have to check for results: +$name_list = "$configuration"; +while (defined $hierarchy{$configuration}) { + $name_list = "$name_list $hierarchy{$configuration}"; + $configuration = $hierarchy{$configuration}; +} +print "$name_list\n"; + -- 2.39.5