Commit 57189fad 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):
def __init__(self, working_directory, config):
self.config = config
self.software_root = os.path.join(working_directory, 'soft')
self.instance_root = os.path.join(working_directory, 'inst')
self.software_root = os.path.join(working_directory, 's')
self.instance_root = os.path.join(working_directory, 'i')
self.slapos_config = os.path.join(working_directory, 'slapos.cfg')
self.proxy_database = os.path.join(working_directory, 'proxy.db')
self.instance_config = {}
......@@ -359,4 +359,4 @@ class SlapOSControler(object):
# codes, but depending on slapos versions, we have inconsistent status
if status_dict['status_code'] in (1,2):
status_dict['status_code'] = 0
return status_dict
\ No newline at end of file
return status_dict
......@@ -139,7 +139,7 @@ class UnitTestRunner(object):
'--revision', node_test_suite.revision,
'--test_suite', node_test_suite.test_suite,
'--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']]
PATH = os.getenv('PATH', '')
PATH = ':'.join(x + '/bin' for x in software_list) + (PATH and ':' + PATH)
......@@ -179,4 +179,4 @@ class UnitTestRunner(object):
Used by the method testnode.constructProfile() to know
if the software.cfg have to use relative path or not.
"""
return False
\ No newline at end of file
return False
......@@ -62,7 +62,7 @@ def main(*args):
logger.disable(logging.CRITICAL)
CONFIG = {
'partition_reference': 'test0',
'partition_reference': 't0',
}
config = ConfigParser.SafeConfigParser()
# 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