From 992fdbb76c52df80b6cc4654ef5fc8476dd8faeb Mon Sep 17 00:00:00 2001 From: Thomas Thomassen Date: Thu, 4 Apr 2024 16:34:15 +0200 Subject: [PATCH] Propagate the random seed in the runner. --- src/testup/ui/runner.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/testup/ui/runner.rb b/src/testup/ui/runner.rb index f506d5d..d960ffd 100644 --- a/src/testup/ui/runner.rb +++ b/src/testup/ui/runner.rb @@ -119,6 +119,9 @@ def event_run_tests(test_suite_json) options = { ui: TestUp.settings[:run_in_gui], } + if TestUp.settings[:seed] && TestUp.settings[:seed] >= 0 + options[:seed] = TestUp.settings[:seed] + end test_suite = Report::TestSuite.from_hash(test_suite_json) TestUp::API.run_test_suite(test_suite, options: options) { |results| test_suite.merge_results(results)