[ARVADOS] updated: c950192e08bcfc6e84432359a7128b73b52e8a58

git at public.curoverse.com git at public.curoverse.com
Mon Jun 2 10:54:27 EDT 2014


Summary of changes:
 sdk/python/tests/test_arv_put.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

       via  c950192e08bcfc6e84432359a7128b73b52e8a58 (commit)
       via  8997d50ab1d335120af5965957c4cca9fb2a3b16 (commit)
      from  6029fb64fd6372c577f9f143e6f3dcaded127ac3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit c950192e08bcfc6e84432359a7128b73b52e8a58
Author: Brett Smith <brett at curoverse.com>
Date:   Mon Jun 2 10:55:15 2014 -0400

    2752: Show arv-put output on stdin test failure.

diff --git a/sdk/python/tests/test_arv_put.py b/sdk/python/tests/test_arv_put.py
index e55d97d..b7c6ed6 100644
--- a/sdk/python/tests/test_arv_put.py
+++ b/sdk/python/tests/test_arv_put.py
@@ -364,16 +364,19 @@ class ArvadosPutTest(ArvadosKeepLocalStoreTestCase):
         pipe = subprocess.Popen(
             [sys.executable, arv_put.__file__, '--stream'],
             stdin=subprocess.PIPE, stdout=subprocess.PIPE,
-            stderr=open('/dev/null', 'w'))
+            stderr=subprocess.STDOUT)
         pipe.stdin.write('stdin test\n')
         pipe.stdin.close()
         deadline = time.time() + 5
         while (pipe.poll() is None) and (time.time() < deadline):
             time.sleep(.1)
-        if pipe.returncode is None:
+        returncode = pipe.poll()
+        if returncode is None:
             pipe.terminate()
             self.fail("arv-put did not PUT from stdin within 5 seconds")
-        self.assertEquals(pipe.returncode, 0)
+        elif returncode != 0:
+            sys.stdout.write(pipe.stdout.read())
+            self.fail("arv-put returned exit code {}".format(returncode))
         self.assertIn('4a9c8b735dce4b5fa3acf221a0b13628+11', pipe.stdout.read())
 
 

commit 8997d50ab1d335120af5965957c4cca9fb2a3b16
Author: Brett Smith <brett at curoverse.com>
Date:   Mon Jun 2 10:54:43 2014 -0400

    2755: Adjust arv-put test invocation.
    
    This method works better with the new test layout.

diff --git a/sdk/python/tests/test_arv_put.py b/sdk/python/tests/test_arv_put.py
index bea6220..e55d97d 100644
--- a/sdk/python/tests/test_arv_put.py
+++ b/sdk/python/tests/test_arv_put.py
@@ -422,7 +422,7 @@ class ArvPutIntegrationTest(unittest.TestCase):
         datadir = tempfile.mkdtemp()
         with open(os.path.join(datadir, "foo"), "w") as f:
             f.write("The quick brown fox jumped over the lazy dog")
-        p = subprocess.Popen(["./bin/arv-put", datadir],
+        p = subprocess.Popen([sys.executable, arv_put.__file__, datadir],
                              stdout=subprocess.PIPE)
         (arvout, arverr) = p.communicate()
         self.assertEqual(p.returncode, 0)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list