| David Reiss | c6fc329 | 2007-08-30 00:58:43 +0000 | [diff] [blame] | 1 | #!/bin/bash | 
|  | 2 |  | 
|  | 3 | rm -rf gen-py | 
|  | 4 | ../../../compiler/cpp/thrift -py test1.thrift || exit 1 | 
|  | 5 | ../../../compiler/cpp/thrift -py test2.thrift || exit 1 | 
|  | 6 | PYTHONPATH=./gen-py python -c 'import foo.bar.baz' || exit 1 | 
|  | 7 | PYTHONPATH=./gen-py python -c 'import test2' || exit 1 | 
|  | 8 | PYTHONPATH=./gen-py python -c 'import test1' &>/dev/null && exit 1  # Should fail. | 
|  | 9 | cp -r gen-py simple | 
|  | 10 | ../../../compiler/cpp/thrift -r -py test2.thrift || exit 1 | 
|  | 11 | PYTHONPATH=./gen-py python -c 'import test2' || exit 1 | 
|  | 12 | diff -ur simple gen-py > thediffs | 
|  | 13 | file thediffs | grep -s -q empty || exit 1 | 
|  | 14 | rm -rf simple thediffs | 
|  | 15 | echo 'All tests pass!' |