X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=test%2Futil%2Fsshfuncs.py;h=99f44b0eb18ed2a11781df1428cd826c7d7ba0f8;hb=e55924b6886bd7382a28e1ae235c4810f852e163;hp=75e54644225377d388f10824864251b62504d4b4;hpb=35af1f1f8393dc9663b2a8be8a4c2b1d78f03bc1;p=nepi.git diff --git a/test/util/sshfuncs.py b/test/util/sshfuncs.py index 75e54644..99f44b0e 100755 --- a/test/util/sshfuncs.py +++ b/test/util/sshfuncs.py @@ -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))