A platform for community discussion. Free, open, simple.
DEV: Optionally allow autospec without auto-running the whole suite (#8321)
David Taylorda50cd554ac9
diff --git a/lib/autospec/manager.rb b/lib/autospec/manager.rbindex 6c3e88a9510..75ea4412a35 100644--- a/lib/autospec/manager.rb+++ b/lib/autospec/manager.rb@@ -18,6 +18,7 @@ class Autospec::Managerdef initialize(opts = {})@opts = opts@debug = opts[:debug]+ @auto_run_all = ENV["AUTO_RUN_ALL"] != "0"@queue = []@mutex = Mutex.new@signal = ConditionVariable.new@@ -42,12 +43,13 @@ class Autospec::Managerexitend- ensure_all_specs_will_run+ ensure_all_specs_will_run if @auto_run_allstart_runnersstart_service_queuelisten_for_changesputs "Press [ENTER] to stop the current run"+ puts "Press [ENTER] while stopped to run all specs" unless @auto_run_allwhile @runners.any?(&:running?)STDIN.getsprocess_queue@@ -138,7 +140,7 @@ class Autospec::Managerhas_failed = trueif result > 0focus_on_failed_tests(current)- ensure_all_specs_will_run(runner)+ ensure_all_specs_will_run(runner) if @auto_run_allendend@@ -343,7 +345,7 @@ class Autospec::Managerend# push run all specs to end of queue in correct order- ensure_all_specs_will_run(runner)+ ensure_all_specs_will_run(runner) if @auto_run_allendputs "@@@@@@@@@@@@ specs queued" if @debugputs "@@@@@@@@@@@@ #{@queue}" if @debug