From: Tony Mack Date: Mon, 23 Jun 2008 17:21:55 +0000 (+0000) Subject: added download_testscripts method (moved out of tests/node_run_tests) X-Git-Tag: tests-4.3-0~149 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=6e21ec8d0f30b5495aa36aafaae15e93cb877bcd;p=tests.git added download_testscripts method (moved out of tests/node_run_tests) --- diff --git a/qaapi/qa/Nodes.py b/qaapi/qa/Nodes.py index 097e497..ee0cf3a 100644 --- a/qaapi/qa/Nodes.py +++ b/qaapi/qa/Nodes.py @@ -124,7 +124,23 @@ class Node(dict, VRemote): time.sleep(30) return ready - + + def download_testscripts(self): + node_tests_dir = self['tests_dir'] + (archive_filename, archive_path) = self.config.archive_node_tests() + self.scp_to(archive_path, node_tests_dir) + + # Extract tests archive + tarx_cmd = "cd %(tests_dir)s && tar -xzm -f %(archive_filename)s" % locals() + print >> self.logfile, tarx_cmd + self.popen(tarx_cmd) + + # Make tests executable + # XX Should find a better way to do this + chmod_cmd = "cd %s/node && chmod -R 755 * " % (tests_dir ) + print >> self.logfile, chmod_cmd + self.popen(chmod_cmd) + class Nodes(Table): def __init__(self, config, nodes):