[tor-commits] [tor-browser-bundle-testsuite/master] Bug 40018: Add support for test_post option

gk at torproject.org gk at torproject.org
Thu Feb 25 12:42:47 UTC 2021


commit 7775ed32d9f4cab71db978f91b02d37f47aa105f
Author: Nicolas Vigier <boklm at torproject.org>
Date:   Wed Feb 3 17:06:37 2021 +0100

    Bug 40018: Add support for test_post option
    
    If the option test_post is defined and pointing to a subroutine, then
    this subroutine will be run after each test.
    
    We will be using this option to run an rsync after each Tor Browser build.
---
 TBBTestSuite/Tests.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/TBBTestSuite/Tests.pm b/TBBTestSuite/Tests.pm
index 532b31b..1ec15ab 100644
--- a/TBBTestSuite/Tests.pm
+++ b/TBBTestSuite/Tests.pm
@@ -81,6 +81,7 @@ sub run_tests {
         }
         $test->{finish_time} = time;
         $test->{run_time} = $test->{finish_time} - $test->{start_time};
+        $options->{test_post}->($tbbinfos, $test) if ref $options->{test_post} eq 'CODE';
         if ($test->{fail_type} eq 'fatal' && is_test_error($test)) {
             last;
         }





More information about the tor-commits mailing list