19
19
# pylint: disable=invalid-name, missing-docstring, bad-continuation
20
20
21
21
from __future__ import print_function
22
+ from future .builtins .iterators import zip
22
23
from past .builtins import basestring
23
24
24
25
try :
@@ -2476,8 +2477,8 @@ def compile_(toolchain=None, target=None, profile=False, compile_library=False,
2476
2477
# Compile configuration
2477
2478
popen ([python_cmd , os .path .join (tools_dir , 'get_config.py' )]
2478
2479
+ ['-t' , tchain , '-m' , target ]
2479
- + list (chain .from_iterable (list ( zip (repeat ('--profile' ), profile or []) )))
2480
- + list (chain .from_iterable (list ( zip (repeat ('--source' ), source ) )))
2480
+ + list (chain .from_iterable (zip (repeat ('--profile' ), profile or [])))
2481
+ + list (chain .from_iterable (zip (repeat ('--source' ), source )))
2481
2482
+ (['-v' ] if verbose else [])
2482
2483
+ (list (chain .from_iterable (izip (repeat ('--prefix' ), config_prefix ))) if config_prefix else []),
2483
2484
env = env )
@@ -2494,10 +2495,10 @@ def compile_(toolchain=None, target=None, profile=False, compile_library=False,
2494
2495
build_path = os .path .join (os .path .relpath (program .path , orig_path ), program .build_dir , 'libraries' , os .path .basename (orig_path ), target , tchain )
2495
2496
2496
2497
popen ([python_cmd , '-u' , os .path .join (tools_dir , 'build.py' )]
2497
- + list (chain .from_iterable (list ( zip (repeat ('-D' ), macros ) )))
2498
+ + list (chain .from_iterable (zip (repeat ('-D' ), macros )))
2498
2499
+ ['-t' , tchain , '-m' , target ]
2499
- + list (chain .from_iterable (list ( zip (repeat ('--profile' ), profile or []) )))
2500
- + list (chain .from_iterable (list ( zip (repeat ('--source' ), source ) )))
2500
+ + list (chain .from_iterable (zip (repeat ('--profile' ), profile or [])))
2501
+ + list (chain .from_iterable (zip (repeat ('--source' ), source )))
2501
2502
+ ['--build' , build_path ]
2502
2503
+ (['-c' ] if clean else [])
2503
2504
+ (['--artifact-name' , artifact_name ] if artifact_name else [])
@@ -2510,10 +2511,10 @@ def compile_(toolchain=None, target=None, profile=False, compile_library=False,
2510
2511
build_path = os .path .join (os .path .relpath (program .path , orig_path ), program .build_dir , target , tchain )
2511
2512
2512
2513
popen ([python_cmd , '-u' , os .path .join (tools_dir , 'make.py' )]
2513
- + list (chain .from_iterable (list ( zip (repeat ('-D' ), macros ) )))
2514
+ + list (chain .from_iterable (zip (repeat ('-D' ), macros )))
2514
2515
+ ['-t' , tchain , '-m' , target ]
2515
- + list (chain .from_iterable (list ( zip (repeat ('--profile' ), profile or []) )))
2516
- + list (chain .from_iterable (list ( zip (repeat ('--source' ), source ) )))
2516
+ + list (chain .from_iterable (zip (repeat ('--profile' ), profile or [])))
2517
+ + list (chain .from_iterable (zip (repeat ('--source' ), source )))
2517
2518
+ ['--build' , build_path ]
2518
2519
+ (['-c' ] if clean else [])
2519
2520
+ (['--artifact-name' , artifact_name ] if artifact_name else [])
@@ -2602,7 +2603,7 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
2602
2603
popen ([python_cmd , '-u' , os .path .join (tools_dir , 'test.py' ), '--list' ]
2603
2604
+ list (chain .from_iterable (list (izip (repeat ('--profile' ), profile or []))))
2604
2605
+ ['-t' , tchain , '-m' , target ]
2605
- + list (chain .from_iterable (list ( zip (repeat ('--source' ), source ) )))
2606
+ + list (chain .from_iterable (zip (repeat ('--source' ), source )))
2606
2607
+ (['-n' , tests_by_name ] if tests_by_name else [])
2607
2608
+ (['-v' ] if verbose else [])
2608
2609
+ (['--app-config' , app_config ] if app_config else [])
@@ -2616,11 +2617,11 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
2616
2617
program .ignore_build_dir ()
2617
2618
2618
2619
popen ([python_cmd , '-u' , os .path .join (tools_dir , 'test.py' )]
2619
- + list (chain .from_iterable (list ( zip (repeat ('-D' ), macros ) )))
2620
- + list (chain .from_iterable (list ( zip (repeat ('--profile' ), profile or []) )))
2620
+ + list (chain .from_iterable (zip (repeat ('-D' ), macros )))
2621
+ + list (chain .from_iterable (zip (repeat ('--profile' ), profile or [])))
2621
2622
+ ['-t' , tchain , '-m' , target ]
2622
2623
+ (['-c' ] if clean else [])
2623
- + list (chain .from_iterable (list ( zip (repeat ('--source' ), source ) )))
2624
+ + list (chain .from_iterable (zip (repeat ('--source' ), source )))
2624
2625
+ ['--build' , build_path ]
2625
2626
+ ['--test-spec' , test_spec ]
2626
2627
+ (['-n' , tests_by_name ] if tests_by_name else [])
0 commit comments