blob: a2b07d29fe9379f1a246c7abc0ac760238977c38 [file] [log] [blame]
David Reissc6fc3292007-08-30 00:58:43 +00001#!/bin/bash
2
3rm -rf gen-py
David Reiss0c87ad42008-12-02 02:11:13 +00004../../../compiler/cpp/thrift --gen py test1.thrift || exit 1
5../../../compiler/cpp/thrift --gen py test2.thrift || exit 1
David Reissc6fc3292007-08-30 00:58:43 +00006PYTHONPATH=./gen-py python -c 'import foo.bar.baz' || exit 1
7PYTHONPATH=./gen-py python -c 'import test2' || exit 1
8PYTHONPATH=./gen-py python -c 'import test1' &>/dev/null && exit 1 # Should fail.
9cp -r gen-py simple
David Reiss0c87ad42008-12-02 02:11:13 +000010../../../compiler/cpp/thrift -r --gen py test2.thrift || exit 1
David Reissc6fc3292007-08-30 00:58:43 +000011PYTHONPATH=./gen-py python -c 'import test2' || exit 1
12diff -ur simple gen-py > thediffs
13file thediffs | grep -s -q empty || exit 1
14rm -rf simple thediffs
15echo 'All tests pass!'