THRIFT-4351: use travis build stages to optimize build,
avoiding duplicate rebuilds of the same image, and also
allow personal docker hub repositories for private fork
builds to be optimized. Move ubsan build to artful image
because it catches more stuff and fix what was found.
THRIFT-4345: solidify docker build strategy for maximum
coverage: trusty, xenial, artful as stock as they can be
THRIFT-4344: add top level language summary markdown and
update readme with a new image on the layered architecture
THRIFT-3847: remove VERSION macro from config.h which
was causing a conflict on artful builds.
THRIFT-4359: fix haxe map/set decode when key is binary,
as a missing break statement caused it to use an int
during decode
This closes #1389
diff --git a/test/features/string_limit.py b/test/features/string_limit.py
index 695d965..14f57d0 100644
--- a/test/features/string_limit.py
+++ b/test/features/string_limit.py
@@ -57,5 +57,6 @@
print('[ERROR]: limit + 1')
assert False
+
if __name__ == '__main__':
main(sys.argv[1:])
diff --git a/test/go/Makefile.am b/test/go/Makefile.am
index 1438d44..db27258 100644
--- a/test/go/Makefile.am
+++ b/test/go/Makefile.am
@@ -35,9 +35,11 @@
mkdir -p src/gen
$(THRIFTCMD) ThriftTest.thrift
$(THRIFTCMD) ../StressTest.thrift
- ln -nfs ../../../lib/go/thrift src/thrift
- GOPATH=`pwd` $(GO) get github.com/golang/mock/gomock
GOPATH=`pwd` $(GO) get golang.org/x/net/context
+ GOPATH=`pwd` $(GO) get github.com/golang/mock/gomock || true
+ sed -i 's/\"context\"/\"golang.org\/x\/net\/context\"/g' src/github.com/golang/mock/gomock/controller.go || true
+ GOPATH=`pwd` $(GO) get github.com/golang/mock/gomock
+ ln -nfs ../../../lib/go/thrift src/thrift
touch gopath
bin/testclient: gopath
diff --git a/test/py/FastbinaryTest.py b/test/py/FastbinaryTest.py
index d231abf..05c0bb6 100755
--- a/test/py/FastbinaryTest.py
+++ b/test/py/FastbinaryTest.py
@@ -50,6 +50,7 @@
def isOpen(self):
return True
+
ooe1 = OneOfEach()
ooe1.im_true = True
ooe1.im_false = False
diff --git a/test/py/SerializationTest.py b/test/py/SerializationTest.py
index b080d87..ef79835 100755
--- a/test/py/SerializationTest.py
+++ b/test/py/SerializationTest.py
@@ -452,5 +452,6 @@
suite.addTest(loader.loadTestsFromTestCase(SerializersTest))
return suite
+
if __name__ == "__main__":
unittest.main(defaultTest="suite", testRunner=unittest.TextTestRunner(verbosity=2))
diff --git a/test/py/TestClient.py b/test/py/TestClient.py
index 18ef66b..1ab8e78 100755
--- a/test/py/TestClient.py
+++ b/test/py/TestClient.py
@@ -301,6 +301,7 @@
self.testNames = ([self.defaultTest])
self.createTests()
+
if __name__ == "__main__":
parser = OptionParser()
parser.add_option('--libpydir', type='string', dest='libpydir',
diff --git a/test/py/TestEof.py b/test/py/TestEof.py
index cda1050..0b4a829 100755
--- a/test/py/TestEof.py
+++ b/test/py/TestEof.py
@@ -127,5 +127,6 @@
suite.addTest(loader.loadTestsFromTestCase(TestEof))
return suite
+
if __name__ == "__main__":
unittest.main(defaultTest="suite", testRunner=unittest.TextTestRunner(verbosity=2))
diff --git a/test/py/TestFrozen.py b/test/py/TestFrozen.py
index e568e8c..6d2595c 100755
--- a/test/py/TestFrozen.py
+++ b/test/py/TestFrozen.py
@@ -118,5 +118,6 @@
suite.addTest(loader.loadTestsFromTestCase(TestFrozenAcceleratedCompact))
return suite
+
if __name__ == "__main__":
unittest.main(defaultTest="suite", testRunner=unittest.TextTestRunner(verbosity=2))
diff --git a/test/py/TestServer.py b/test/py/TestServer.py
index 070560c..a7366a8 100755
--- a/test/py/TestServer.py
+++ b/test/py/TestServer.py
@@ -267,6 +267,7 @@
# enter server main loop
server.serve()
+
if __name__ == '__main__':
parser = OptionParser()
parser.add_option('--libpydir', type='string', dest='libpydir',
diff --git a/test/py/TestSocket.py b/test/py/TestSocket.py
index a3c5ff0..ae3160f 100755
--- a/test/py/TestSocket.py
+++ b/test/py/TestSocket.py
@@ -67,6 +67,7 @@
except:
self.assert_(time.time() - starttime < 5.0)
+
if __name__ == '__main__':
suite = unittest.TestSuite()
loader = unittest.TestLoader()
diff --git a/test/test.py b/test/test.py
index 9305967..5a015ea 100755
--- a/test/test.py
+++ b/test/test.py
@@ -166,5 +166,6 @@
res = run_cross_tests(server_match, client_match, options.jobs, options.skip_known_failures, options.retry_count, options.regex)
return 0 if res else 1
+
if __name__ == '__main__':
sys.exit(main(sys.argv[1:]))