File: common.py

package info (click to toggle)
ros-bloom 0.13.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,212 kB
  • sloc: python: 8,113; makefile: 322; xml: 19
file content (24 lines) | stat: -rw-r--r-- 687 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""
Common tools for system tests
"""

from __future__ import print_function

import os

from ..utils.common import bloom_answer
from ..utils.common import change_directory
from ..utils.common import user


def create_release_repo(upstream_url, upstream_type, upstream_branch='',
                        rosdistro='indigo'):
    user('mkdir foo_release')
    with change_directory('foo_release'):
        user('git init .')
        answers = ['y', 'foo', upstream_url, upstream_type,
                   '', '', upstream_branch, rosdistro]
        with bloom_answer(answers):
            user('git-bloom-config new ' + str(rosdistro))
        url = 'file://' + os.getcwd()
    return url