Fixing wrong license
[nepi.git] / test / util / sshfuncs.py
index 75e5464..99f44b0 100755 (executable)
@@ -4,9 +4,8 @@
 #    Copyright (C) 2013 INRIA
 #
 #    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU General Public License as published by
-#    the Free Software Foundation, either version 3 of the License, or
-#    (at your option) any later version.
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
 #
 #    This program is distributed in the hope that it will be useful,
 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -215,7 +214,7 @@ class SSHfuncsTestCase(unittest.TestCase):
         os.remove(f1.name)
         shutil.rmtree(dirpath)
 
-    def test_rcopy_slist(self):
+    def test_rcopy_list(self):
         env = test_environment()
         user = getpass.getuser()
         host = "localhost"
@@ -229,16 +228,17 @@ class SSHfuncsTestCase(unittest.TestCase):
         f1.close()
         f1.name
 
-        source = "%s;%s" % (dirpath, f1.name)
+        # Copy a list of files
+        source = [dirpath, f1.name]
         destdir = tempfile.mkdtemp()
         dest = "%s@%s:%s" % (user, host, destdir)
-        rcopy(source, dest, port = env.port, agent = True, recursive = True)
+        ((out, err), proc) = rcopy(source, dest, port = env.port, agent = True, recursive = True)
 
         files = []
         def recls(files, dirname, names):
             files.extend(names)
         os.path.walk(destdir, recls, files)
-        
+       
         origfiles = map(lambda s: os.path.basename(s), [dirpath, f.name, f1.name])
 
         self.assertEquals(sorted(origfiles), sorted(files))