~ubuntu-branches/ubuntu/trusty/silo-llnl/trusty

« back to all changes in this revision

Viewing changes to tests/testdtypes

  • Committer: Bazaar Package Importer
  • Author(s): Alastair McKinstry
  • Date: 2011-01-02 00:03:01 UTC
  • Revision ID: james.westby@ubuntu.com-20110102000301-9s2hfsjrkguz6h4r
Tags: upstream-4.8
ImportĀ upstreamĀ versionĀ 4.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
 
4
# LLNL-CODE-425250.
 
5
# All rights reserved.
 
6
 
7
# This file is part of Silo. For details, see silo.llnl.gov.
 
8
 
9
# Redistribution and use in source and binary forms, with or without
 
10
# modification, are permitted provided that the following conditions
 
11
# are met:
 
12
 
13
#    * Redistributions of source code must retain the above copyright
 
14
#      notice, this list of conditions and the disclaimer below.
 
15
#    * Redistributions in binary form must reproduce the above copyright
 
16
#      notice, this list of conditions and the disclaimer (as noted
 
17
#      below) in the documentation and/or other materials provided with
 
18
#      the distribution.
 
19
#    * Neither the name of the LLNS/LLNL nor the names of its
 
20
#      contributors may be used to endorse or promote products derived
 
21
#      from this software without specific prior written permission.
 
22
 
23
# THIS SOFTWARE  IS PROVIDED BY  THE COPYRIGHT HOLDERS  AND CONTRIBUTORS
 
24
# "AS  IS" AND  ANY EXPRESS  OR IMPLIED  WARRANTIES, INCLUDING,  BUT NOT
 
25
# LIMITED TO, THE IMPLIED  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 
26
# A  PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN  NO  EVENT SHALL  LAWRENCE
 
27
# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY OR
 
28
# CONTRIBUTORS BE LIABLE FOR  ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 
29
# EXEMPLARY, OR  CONSEQUENTIAL DAMAGES  (INCLUDING, BUT NOT  LIMITED TO,
 
30
# PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS  OF USE,  DATA, OR
 
31
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 
32
# LIABILITY, WHETHER  IN CONTRACT, STRICT LIABILITY,  OR TORT (INCLUDING
 
33
# NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT  OF THE USE  OF THIS
 
34
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
35
 
36
# This work was produced at Lawrence Livermore National Laboratory under
 
37
# Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
 
38
# States Government  nor Lawrence  Livermore National Security,  LLC nor
 
39
# any of  their employees,  makes any warranty,  express or  implied, or
 
40
# assumes   any   liability   or   responsibility  for   the   accuracy,
 
41
# completeness, or usefulness of any information, apparatus, product, or
 
42
# process  disclosed, or  represents  that its  use  would not  infringe
 
43
# privately-owned   rights.  Any  reference   herein  to   any  specific
 
44
# commercial products,  process, or  services by trade  name, trademark,
 
45
# manufacturer or otherwise does not necessarily constitute or imply its
 
46
# endorsement,  recommendation,   or  favoring  by   the  United  States
 
47
# Government or Lawrence Livermore National Security, LLC. The views and
 
48
# opinions  of authors  expressed  herein do  not  necessarily state  or
 
49
# reflect those  of the United  States Government or  Lawrence Livermore
 
50
# National  Security, LLC,  and shall  not  be used  for advertising  or
 
51
# product endorsement purposes.
 
52
 
 
53
result=0
 
54
 
 
55
# -----------------------------------------------------------------------------
 
56
# Test datatype handling with force single on and off 
 
57
#
 
58
# Programmer: Mark C. Miller, Thu Jul 15 18:05:03 PDT 2010
 
59
#
 
60
# Modifications:
 
61
#
 
62
#   Mark C. Miller, Mon Aug  9 16:59:23 PDT 2010
 
63
#   Made it work for any HDF5 driver, not just DB_HDF5.
 
64
# -----------------------------------------------------------------------------
 
65
 
 
66
# Diddle the the directory because Autotest is not at all designed to handle
 
67
# tests the way this one was written
 
68
if test -n "$1"; then
 
69
    topDir=$1
 
70
    if test -e $topDir/../../multi_test; then
 
71
        topDir=$1/../..
 
72
    fi
 
73
else
 
74
    topDir=.
 
75
fi
 
76
 
 
77
smode="pdb"
 
78
if test "${2:0:7}" = "DB_HDF5"; then
 
79
    smode="h5"
 
80
fi
 
81
 
 
82
echo -e "driver\tfsmode\tmesh\tvartyp\tdattyp\tstatus"
 
83
for fsmode in "-s 1" ""; do
 
84
    for mt in "quad" "ucd"; do
 
85
        for v in "n" "z"; do
 
86
            for d in "c" "s" "i" "l" "L" "d"; do
 
87
                diffs=$($topDir/../tools/browser/browser -q ${fsmode} -e "diff f${v}var ${d}${v}var" specmix_$mt.$smode | grep -v 'different data sizes' | grep -v 'byte data' | grep vals | head)
 
88
                if test -n "$diffs"; then
 
89
                    result=1
 
90
                    break 4
 
91
                    echo -e "${smode}\t${fsmode}\t${mt}\t${v}\t${d}\tFAILED"
 
92
                else
 
93
                    echo -e "${smode}\t${fsmode}\t${mt}\t${v}\t${d}\tPASSED"
 
94
                fi
 
95
            done
 
96
        done
 
97
    done
 
98
done
 
99
 
 
100
exit $result