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 (35 lines) | stat: -rwxr-xr-x 921 bytes parent folder | download | duplicates (3)
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
PYXB_ARCHIVE_PATH=.
export PYXB_ARCHIVE_PATH

test_name=${0}

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

rm -f *.wxs *.wxs- *.pyc common.py _common.py app.py

pyxbgen \
  --schema-location=common.xsd --module=common \
  --archive-to-file=common.wxs || fail cannot generate common schema

#pyxbdump common.wxs

python tst-common.py || fail common binding test

echo '**************************'

pyxbgen \
  --schema-location=app.xsd --module=app > bad.log 2>&1 \
  && fail unexpected success processing unaugmented import
grep -q 'Unable to locate element referenced by {urn:common}app' bad.log || fail missing diagnostic for bad unaugmented import

pyxbgen \
  --import-augmentable-namespace=urn:common \
  --schema-location=app.xsd --module=app > bad.log 2>&1 \
  || fail unable to generate app-augmented bindings

python tst-app.py || fail app-augmented bindings test

echo "nsaugment TESTS PASSED"