Commit 02f309f3 authored by Benjamin Blanc's avatar Benjamin Blanc

testnode: Force git to use master branch

parent 09a020d8
...@@ -97,7 +97,7 @@ class Updater(object): ...@@ -97,7 +97,7 @@ class Updater(object):
return self.spawn(self.git_binary, *args, **kw)['stdout'].strip() return self.spawn(self.git_binary, *args, **kw)['stdout'].strip()
def git_update_server_info(self): def git_update_server_info(self):
return self._git('update-server-info') return self._git('update-server-info', '--force')
def git_create_repository_link(self): def git_create_repository_link(self):
""" Create a link in depository to the ".git" directory. """ Create a link in depository to the ".git" directory.
......
...@@ -189,7 +189,7 @@ branch = %(branch)s ...@@ -189,7 +189,7 @@ branch = %(branch)s
custom_profile.close() custom_profile.close()
sys.path.append(repository_path) sys.path.append(repository_path)
def getAndUpdateFullRevisionList(self, node_test_suite): def getAndUpdateFullRevisionList(self, node_test_suite, my_test_type):
full_revision_list = [] full_revision_list = []
config = self.config config = self.config
log = self.log log = self.log
...@@ -200,7 +200,12 @@ branch = %(branch)s ...@@ -200,7 +200,12 @@ branch = %(branch)s
if not os.path.exists(repository_path): if not os.path.exists(repository_path):
parameter_list = [config['git_binary'], 'clone', parameter_list = [config['git_binary'], 'clone',
vcs_repository['url']] vcs_repository['url']]
if branch is not None: # XXX: In scalability we use revision to update code,
# so accordingly to recipe.slapos.gitclone we need to have
# a master branch.
if my_test_type == 'ScalabilityTest':
parameter_list.extend(['-b', 'master'])
elif branch is not None:
parameter_list.extend(['-b', branch]) parameter_list.extend(['-b', branch])
parameter_list.append(repository_path) parameter_list.append(repository_path)
log(subprocess.check_output(parameter_list, stderr=subprocess.STDOUT)) log(subprocess.check_output(parameter_list, stderr=subprocess.STDOUT))
...@@ -371,7 +376,7 @@ from the distributor.") ...@@ -371,7 +376,7 @@ from the distributor.")
run_software = True run_software = True
# kill processes from previous loop if any # kill processes from previous loop if any
self.process_manager.killPreviousRun() self.process_manager.killPreviousRun()
self.getAndUpdateFullRevisionList(node_test_suite) self.getAndUpdateFullRevisionList(node_test_suite, my_test_type)
# Write our own software.cfg to use the local repository # Write our own software.cfg to use the local repository
self.constructProfile(node_test_suite, my_test_type, runner.getRelativePathUsage()) self.constructProfile(node_test_suite, my_test_type, runner.getRelativePathUsage())
# Make sure we have local repository # Make sure we have local repository
......
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