Pārlūkot izejas kodu

ZOOKEEPER-421. zkpython run_tests.sh is missing #!

git-svn-id: https://svn.apache.org/repos/asf/hadoop/zookeeper/trunk@780828 13f79535-47bb-0310-9956-ffa450edef68
Patrick D. Hunt 16 gadi atpakaļ
vecāks
revīzija
f30c599844

+ 3 - 0
CHANGES.txt

@@ -108,6 +108,9 @@ BUGFIXES:
   ZOOKEEPER-419. Reference counting bug in Python bindings causes abort errors
   (henry robinson via phunt)
 
+  ZOOKEEPER-421. zkpython run_tests.sh is missing #!
+  (henry robinson via phunt)
+
 IMPROVEMENTS:
   ZOOKEEPER-308. improve the atomic broadcast performance 3x.
   (breed via mahadev)

+ 2 - 0
src/contrib/zkpython/src/test/connection_test.py

@@ -1,3 +1,5 @@
+#!/usr/bin/python
+#
 #  Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information

+ 2 - 0
src/contrib/zkpython/src/test/create_test.py

@@ -1,3 +1,5 @@
+#!/usr/bin/python
+#
 #  Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information

+ 2 - 0
src/contrib/zkpython/src/test/exists_test.py

@@ -1,3 +1,5 @@
+#!/usr/bin/python
+#
 #  Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information

+ 2 - 0
src/contrib/zkpython/src/test/get_set_test.py

@@ -1,3 +1,5 @@
+#!/usr/bin/python
+#
 #  Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information

+ 2 - 0
src/contrib/zkpython/src/test/run_tests.sh

@@ -1,3 +1,5 @@
+#!/bin/sh
+#
 #  Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information

+ 8 - 2
src/contrib/zkpython/src/test/zktestbase.py

@@ -1,3 +1,5 @@
+#!/usr/bin/python
+#
 #  Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
@@ -22,8 +24,12 @@ class TestBase(unittest.TestCase):
         self.host = "localhost:22182"
         self.connected = False
         self.handle = -1
-        f = open("build/test/logs/" + self.__class__.__name__ +".log","w")
-        zookeeper.set_log_stream(f)
+        try:
+            f = open("build/test/logs/" + self.__class__.__name__ +".log","w")
+            zookeeper.set_log_stream(f)
+        except IOError:
+            print "Couldn't open build/test/logs/" + self.__class__.__name__ +".log for writing"
+
     
     def setUp(self):
         self.callback_flag = False