File: test.sh

package info (click to toggle)
pyxb 1.2.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 63,792 kB
  • ctags: 48,994
  • sloc: python: 235,928; sh: 803; xml: 657; makefile: 57
file content (40 lines) | stat: -rwxr-xr-x 1,254 bytes parent folder | download
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
#!/bin/sh

fail () {
  echo 1>&2 "${test_name} FAILED: ${@}"
  exit 1
}

# Because this is an OpenGIS application, the OpenGIS bundle must be
# made available during binding generation.  OpenGIS also depends
# on XLink which is in the common bundle.
export PYXB_ARCHIVE_PATH='&pyxb/bundles/opengis//:&pyxb/bundles/common//:+'

# Attempt to get romkan.py if not already available
[ -f romkan.py ] || wget http://mhagiwara.googlecode.com/svn/trunk/nltk/jpbook/romkan.py

python -c 'import drv_libxml2' || fail python-libxml2 not installed

if python -c 'import pyxb.bundles.opengis.gml_3_2' ; then
  echo 1>&2 "OpenGIS bundle present and will be used"
else
  cat 1>&2 <<EOText

Warning: The PyXB OpenGIS bundle is not available.  PyXB will attempt to
dynamically retrieve the referenced schemas and build them, but if you
intend to work with this example, please follow the directions in the
opengis bundle directory.
EOText
fi

# This allows this script to run under the autotest environment, where
# output is sent to a file.
export PYTHONIOENCODING='utf-8'

rm fgd_gml.*
# A customized pyxbgen is required to do the translation
./pyxbgen_jp \
   --schema-location=data/shift_jis/FGD_GMLSchema.xsd --module=fgd_gml

# Make sure it worked
python check.py