diff --git a/tests/full/run.js b/tests/full/run.js index 6dca248e..3b7a18e5 100755 --- a/tests/full/run.js +++ b/tests/full/run.js @@ -63,6 +63,18 @@ function screen_to_text(s) return result.join("\n"); } +function send_work_to_worker(worker, message) +{ + if(current_test < tests.length) + { + worker.send(tests[current_test]); + current_test++; + } + else + { + worker.disconnect(); + } +} if(cluster.isMaster) { @@ -191,19 +203,6 @@ if(cluster.isMaster) var current_test = 0; - function send_work_to_worker(worker, message) - { - if(current_test < tests.length) - { - worker.send(tests[current_test]); - current_test++; - } - else - { - worker.disconnect(); - } - } - for(var i = 0; i < nr_of_cpus; i++) { var worker = cluster.fork();