~sylvain-pineau/checkbox/add_xenial_to_test_in_lxc

« back to all changes in this revision

Viewing changes to checkbox-touch/build-me

"automatic merge of lp:~kissiel/checkbox/support-standalone-converged/ by tarmac [r=pwlars][bug=][author=kissiel]"

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
sys.path.append('./py')
23
23
 
24
24
 
25
 
# DEFAULT_PROVIDERS is a list of providers directory names as listed in
26
 
# ../providers. NOTE: those are directory names, not provider names as reported
27
 
# by manage.py info
28
 
 
29
 
DEFAULT_PROVIDERS = [
30
 
    "plainbox-provider-ubuntu-touch",
31
 
]
32
 
 
33
 
 
34
25
@contextmanager
35
26
def chdir(path):
36
27
    previous_path = os.getcwd()
182
173
            target_base_name = os.path.basename(os.path.normpath(path))
183
174
            rsync_tree(path, os.path.join('providers', target_base_name))
184
175
 
185
 
    if args.provider is None and args.embedded_providers_path is None:
186
 
        # no user specified providers
187
 
        if not os.path.exists('providers') or os.listdir('providers') == []:
188
 
            print("No providers specified; using default providers")
189
 
            for provider in DEFAULT_PROVIDERS:
190
 
                path = os.path.join(os.getcwd(), '..', 'providers', provider)
191
 
                target_base_name = os.path.basename(os.path.normpath(path))
192
 
                rsync_tree(path, os.path.join(
193
 
                    'providers', target_base_name))
 
176
    if not os.path.exists('providers'):
 
177
        sys.exit('No providers available. Exiting!')
194
178
 
195
179
    if not validate_providers():
196
180
        sys.exit('Provider validation failed.')