diff --git a/autospec/build.py b/autospec/build.py index 67db5aa..6ca5e16 100644 --- a/autospec/build.py +++ b/autospec/build.py @@ -285,7 +285,7 @@ class Build(object): mockopts, ] - if not cleanup and self.must_restart == 0 and self.file_restart > 0 and set(filemanager.excludes) == set(filemanager.manual_excludes): + if config.config_opts.get('avoid_rebuild') and not cleanup and self.must_restart == 0 and self.file_restart > 0 and set(filemanager.excludes) == set(filemanager.manual_excludes): cmd_args.append("--no-clean") cmd_args.append("--short-circuit=binary") diff --git a/autospec/config.py b/autospec/config.py index ad86eda..2962c47 100644 --- a/autospec/config.py +++ b/autospec/config.py @@ -157,6 +157,7 @@ class Config(object): } self.config_opts = {} self.config_options = { + "avoid_rebuild": "Try to use mock short circuit to avoid full rebuilds", "broken_c++": "extend flags with '-std=gnu++98", "cargo_vendor": "create vendor archive with cargo", "use_lto": "configure build for lto",