Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove restriction to run unit test single threaded #597

Merged
merged 1 commit into from Feb 25, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/catkin_make
Expand Up @@ -161,7 +161,7 @@ def main():

# invoke make
cmd = ['make']
cmd.extend(handle_make_arguments(args.make_args, force_single_threaded_when_running_tests=True))
cmd.extend(handle_make_arguments(args.make_args))
try:
if not args.pkg:
make_paths = [build_path]
Expand Down
11 changes: 2 additions & 9 deletions python/catkin/builder.py
Expand Up @@ -250,16 +250,9 @@ def get_python_install_dir():
return python_install_dir


def handle_make_arguments(input_make_args, force_single_threaded_when_running_tests=False):
def handle_make_arguments(input_make_args):
make_args = list(input_make_args)

if force_single_threaded_when_running_tests:
# force single threaded execution when running test since rostest does not support multiple parallel runs
run_tests = [a for a in make_args if a.startswith('run_tests')]
if run_tests:
print('Forcing "-j1" for running unit tests.')
make_args.append('-j1')

# If no -j/--jobs/-l/--load-average flags are in make_args
if not extract_jobs_flags(' '.join(make_args)):
# If -j/--jobs/-l/--load-average are in MAKEFLAGS
Expand Down Expand Up @@ -367,7 +360,7 @@ def build_catkin_package(

# Run make
make_cmd = ['make']
make_cmd.extend(handle_make_arguments(make_args, force_single_threaded_when_running_tests=True))
make_cmd.extend(handle_make_arguments(make_args))
isolation_print_command(' '.join(make_cmd), build_dir)
if last_env is not None:
make_cmd = [last_env] + make_cmd
Expand Down