Author: stsp Date: Tue Mar 17 09:17:47 2015 New Revision: 1667199 URL: http://svn.apache.org/r1667199 Log: Provide a way for C tests to enable sleep for timestamps.
Needed for an upcoming new test. No functional change. * subversion/tests/svn_test.h (svn_test__enable_sleep_for_timestamps, svn_test__disable_sleep_for_timestamps): Declare. * subversion/tests/svn_test_main.c (svn_test__enable_sleep_for_timestamps, svn_test__disable_sleep_for_timestamps): New. (svn_test_main): Use svn_test__disable_sleep_for_timestamps() rather than calling apr_env_set directly. Modified: subversion/trunk/subversion/tests/svn_test.h subversion/trunk/subversion/tests/svn_test_main.c Modified: subversion/trunk/subversion/tests/svn_test.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/svn_test.h?rev=1667199&r1=1667198&r2=1667199&view=diff ============================================================================== --- subversion/trunk/subversion/tests/svn_test.h (original) +++ subversion/trunk/subversion/tests/svn_test.h Tue Mar 17 09:17:47 2015 @@ -355,6 +355,11 @@ svn_test__fs_type_not(const svn_test_opt const char *predicate_value, apr_pool_t *pool); +void +svn_test__enable_sleep_for_timestamps(apr_pool_t *pool); + +void +svn_test__disable_sleep_for_timestamps(apr_pool_t *pool); #ifdef __cplusplus } Modified: subversion/trunk/subversion/tests/svn_test_main.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/svn_test_main.c?rev=1667199&r1=1667198&r2=1667199&view=diff ============================================================================== --- subversion/trunk/subversion/tests/svn_test_main.c (original) +++ subversion/trunk/subversion/tests/svn_test_main.c Tue Mar 17 09:17:47 2015 @@ -973,9 +973,7 @@ svn_test_main(int argc, const char *argv opts.verbose = verbose_mode; /* Disable sleeping for timestamps, to speed up the tests. */ - apr_env_set( - "SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_SLEEP_FOR_TIMESTAMPS", - "yes", pool); + svn_test__disable_sleep_for_timestamps(pool); /* You can't be both quiet and verbose. */ if (quiet_mode && verbose_mode) @@ -1092,3 +1090,19 @@ svn_test__fs_type_not(const svn_test_opt { return (0 != strcmp(predicate_value, opts->fs_type)); } + +void +svn_test__enable_sleep_for_timestamps(apr_pool_t *pool) +{ + apr_env_set( + "SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_SLEEP_FOR_TIMESTAMPS", + "no", pool); +} + +void +svn_test__disable_sleep_for_timestamps(apr_pool_t *pool) +{ + apr_env_set( + "SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_SLEEP_FOR_TIMESTAMPS", + "yes", pool); +}