Commit 7de14a54 authored by Łukasz Nowak's avatar Łukasz Nowak

testnode: Shorten partition and software path

As testnode is used inside of slapos instance, its path is already long like:
   /srv/slapgrid/slappartXY

Very often partitions are kept in:

  /srv/slapgrid/slappartXY/srv/testnode/ZZZ/inst/test0-0

Shortening it to:

  /srv/slapgrid/slappartXY/srv/testnode/ZZZ/i/t-0

minimises chance to reach limit of maximum path, often hit by sockets.

Software path

  /srv/slapgrid/slappartXY/srv/testnode/ZZZ/soft/

has been shortened to

  /srv/slapgrid/slappartXY/srv/testnode/ZZZ/s/

for consistency.
parent bb4388a5
...@@ -42,8 +42,8 @@ class SlapOSControler(object): ...@@ -42,8 +42,8 @@ class SlapOSControler(object):
def __init__(self, working_directory, config): def __init__(self, working_directory, config):
self.config = config self.config = config
self.software_root = os.path.join(working_directory, 'soft') self.software_root = os.path.join(working_directory, 's')
self.instance_root = os.path.join(working_directory, 'inst') self.instance_root = os.path.join(working_directory, 'i')
self.slapos_config = os.path.join(working_directory, 'slapos.cfg') self.slapos_config = os.path.join(working_directory, 'slapos.cfg')
self.proxy_database = os.path.join(working_directory, 'proxy.db') self.proxy_database = os.path.join(working_directory, 'proxy.db')
self.instance_config = {} self.instance_config = {}
......
...@@ -139,7 +139,7 @@ class UnitTestRunner(object): ...@@ -139,7 +139,7 @@ class UnitTestRunner(object):
'--revision', node_test_suite.revision, '--revision', node_test_suite.revision,
'--test_suite', node_test_suite.test_suite, '--test_suite', node_test_suite.test_suite,
'--test_suite_title', node_test_suite.test_suite_title) '--test_suite_title', node_test_suite.test_suite_title)
soft = config['slapos_directory'] + '/soft/' soft = config['slapos_directory'] + '/s/'
software_list = [soft + md5digest(x) for x in config['software_list']] software_list = [soft + md5digest(x) for x in config['software_list']]
PATH = os.getenv('PATH', '') PATH = os.getenv('PATH', '')
PATH = ':'.join(x + '/bin' for x in software_list) + (PATH and ':' + PATH) PATH = ':'.join(x + '/bin' for x in software_list) + (PATH and ':' + PATH)
......
...@@ -62,7 +62,7 @@ def main(*args): ...@@ -62,7 +62,7 @@ def main(*args):
logger.disable(logging.CRITICAL) logger.disable(logging.CRITICAL)
CONFIG = { CONFIG = {
'partition_reference': 'test0', 'partition_reference': 't0',
} }
config = ConfigParser.SafeConfigParser() config = ConfigParser.SafeConfigParser()
# do not change case of option keys # do not change case of option keys
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment