File: run_misc.sh

package info (click to toggle)
netcdf-parallel 1%3A4.9.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 116,192 kB
  • sloc: ansic: 279,265; sh: 14,143; cpp: 5,971; yacc: 2,612; makefile: 2,075; lex: 1,218; javascript: 280; xml: 173; awk: 2
file content (62 lines) | stat: -rwxr-xr-x 1,268 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/sh

if test "x$srcdir" = x ; then srcdir=`pwd`; fi 
. ../test_common.sh

. "$srcdir/test_nczarr.sh"

set -e

s3isolate "testdir_misc"
THISDIR=`pwd`
cd $ISOPATH

# This shell script provides a miscellaneous set of tests

cleanup() {
    resetrc
}

# Setup the .rc files

createrc() {
  RCP="${ISOPATH}/.ncrc"
  echo "Creating rc file $RCP"
  echo "ZARR.DIMENSION_SEPARATOR=/" >>$RCP
}

testcase1() {
zext=$1
echo "*** Test: use '/' as dimension separator for write then read"
fileargs tmp_dimsep "mode=nczarr,$zext"
deletemap $zext $file
cleanup
createrc
${NCGEN} -4 -lb -o $fileurl ${abs_srcdir}/ref_misc1.cdl
${NCDUMP} -n tmp_misc1 $fileurl > tmp_misc1_$zext.cdl
diff -bw ${abs_srcdir}/ref_misc1.cdl tmp_misc1_$zext.cdl
}

testcase2() {
zext=$1
echo "*** Test: '/' as dimension separator creates extra groups"
fileargs tmp_extra "mode=nczarr,$zext"
deletemap $zext $file
cleanup
createrc
${NCGEN} -4 -lb -o "$fileurl" ${abs_srcdir}/ref_misc2.cdl
${NCDUMP} -n tmp_misc2 $fileurl > tmp_misc2_$zext.cdl
diff -wb ${abs_srcdir}/ref_misc2.cdl tmp_misc2_$zext.cdl
}

testcase1 file
testcase2 file
exit 0
if test "x$FEATURE_NCZARR_ZIP" = xyes ; then
    testcase1 zip
    testcase2 zip
fi
if test "x$FEATURE_S3TESTS" = xyes ; then
    testcase1 s3
    testcase2 s3
fi