mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 10:48:51 +00:00
16 lines
595 B
Bash
16 lines
595 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
rm -rf gen-py
|
||
|
../../../compiler/cpp/thrift -py test1.thrift || exit 1
|
||
|
../../../compiler/cpp/thrift -py test2.thrift || exit 1
|
||
|
PYTHONPATH=./gen-py python -c 'import foo.bar.baz' || exit 1
|
||
|
PYTHONPATH=./gen-py python -c 'import test2' || exit 1
|
||
|
PYTHONPATH=./gen-py python -c 'import test1' &>/dev/null && exit 1 # Should fail.
|
||
|
cp -r gen-py simple
|
||
|
../../../compiler/cpp/thrift -r -py test2.thrift || exit 1
|
||
|
PYTHONPATH=./gen-py python -c 'import test2' || exit 1
|
||
|
diff -ur simple gen-py > thediffs
|
||
|
file thediffs | grep -s -q empty || exit 1
|
||
|
rm -rf simple thediffs
|
||
|
echo 'All tests pass!'
|