@@ -77,6 +77,7 @@ int test_rusage = 0; /**< Check resource usage */
7777 * <1.0: CPU is faster than base line system. */
7878double test_rusage_cpu_calibration = 1.0 ;
7979static const char * tests_to_run = NULL ; /* all */
80+ static const char * skip_tests_till = NULL ; /* all */
8081static const char * subtests_to_run = NULL ; /* all */
8182static const char * tests_to_skip = NULL ; /* none */
8283int test_write_report = 0 ; /**< Write test report file */
@@ -1341,6 +1342,13 @@ static void run_tests(int argc, char **argv) {
13411342 skip_silent = rd_true ;
13421343 } else if (tests_to_skip && strstr (tests_to_skip , testnum ))
13431344 skip_reason = "included in TESTS_SKIP list" ;
1345+ else if (skip_tests_till ) {
1346+ if (!strcmp (skip_tests_till , testnum ))
1347+ skip_tests_till = NULL ;
1348+ else
1349+ skip_reason =
1350+ "ignoring test before TESTS_SKIP_BEFORE" ;
1351+ }
13441352
13451353 if (!skip_reason ) {
13461354 run_test (test , argc , argv );
@@ -1666,6 +1674,8 @@ int main(int argc, char **argv) {
16661674 subtests_to_run = test_getenv ("SUBTESTS" , NULL );
16671675 tests_to_skip = test_getenv ("TESTS_SKIP" , NULL );
16681676 tmpver = test_getenv ("TEST_KAFKA_VERSION" , NULL );
1677+ skip_tests_till = test_getenv ("TESTS_SKIP_BEFORE" , NULL );
1678+
16691679 if (!tmpver )
16701680 tmpver = test_getenv ("KAFKA_VERSION" , test_broker_version_str );
16711681 test_broker_version_str = tmpver ;
@@ -1840,11 +1850,14 @@ int main(int argc, char **argv) {
18401850 if (test_concurrent_max > 1 )
18411851 test_timeout_multiplier += (double )test_concurrent_max / 3 ;
18421852
1843- TEST_SAY ("Tests to run : %s\n" , tests_to_run ? tests_to_run : "all" );
1853+ TEST_SAY ("Tests to run : %s\n" ,
1854+ tests_to_run ? tests_to_run : "all" );
18441855 if (subtests_to_run )
1845- TEST_SAY ("Sub tests : %s\n" , subtests_to_run );
1856+ TEST_SAY ("Sub tests : %s\n" , subtests_to_run );
18461857 if (tests_to_skip )
1847- TEST_SAY ("Skip tests : %s\n" , tests_to_skip );
1858+ TEST_SAY ("Skip tests : %s\n" , tests_to_skip );
1859+ if (skip_tests_till )
1860+ TEST_SAY ("Skip tests before: %s\n" , skip_tests_till );
18481861 TEST_SAY ("Test mode : %s%s%s\n" , test_quick ? "quick, " : "" ,
18491862 test_mode , test_on_ci ? ", CI" : "" );
18501863 TEST_SAY ("Test scenario: %s\n" , test_scenario );
0 commit comments