mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-04 04:32:24 -05:00 
			
		
		
		
	Suite dependencies handled correctly now
This commit is contained in:
		
							parent
							
								
									33b43f1ec3
								
							
						
					
					
						commit
						b34fef2f3c
					
				@ -65,10 +65,11 @@ $suite_header
 | 
			
		||||
 | 
			
		||||
$test_helpers
 | 
			
		||||
 | 
			
		||||
$suite_pre_code
 | 
			
		||||
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
$test_main =~ s/SUITE_PRE_DEP/$suite_pre_code/;
 | 
			
		||||
$test_main =~ s/SUITE_POST_DEP/$suite_post_code/;
 | 
			
		||||
 | 
			
		||||
while($test_cases =~ /\/\* BEGIN_CASE *([\w:]*) \*\/\n(.*?)\n\/\* END_CASE \*\//msg)
 | 
			
		||||
{
 | 
			
		||||
    my $function_deps = $1;
 | 
			
		||||
@ -219,8 +220,6 @@ $test_main =~ s/DISPATCH_FUNCTION/$dispatch_code/;
 | 
			
		||||
$test_main =~ s/MAPPING_CODE/$mapping_code/;
 | 
			
		||||
 | 
			
		||||
print TEST_FILE << "END";
 | 
			
		||||
$suite_post_code
 | 
			
		||||
 | 
			
		||||
$test_main
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -88,18 +88,27 @@ DEP_CHECK_CODE
 | 
			
		||||
    return( 1 );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
SUITE_PRE_DEP
 | 
			
		||||
#define TEST_SUITE_ACTIVE
 | 
			
		||||
FUNCTION_CODE
 | 
			
		||||
SUITE_POST_DEP
 | 
			
		||||
 | 
			
		||||
int dispatch_test(int cnt, char *params[50])
 | 
			
		||||
{
 | 
			
		||||
    int ret;
 | 
			
		||||
    ((void) cnt);
 | 
			
		||||
    ((void) params);
 | 
			
		||||
 | 
			
		||||
#if defined(TEST_SUITE_ACTIVE)
 | 
			
		||||
DISPATCH_FUNCTION
 | 
			
		||||
    {
 | 
			
		||||
        fprintf( stdout, "FAILED\nSkipping unknown test function '%s'\n", params[0] );
 | 
			
		||||
        fflush( stdout );
 | 
			
		||||
        return( 1 );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
#else
 | 
			
		||||
    return( 3 );
 | 
			
		||||
#endif
 | 
			
		||||
    return( ret );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -239,7 +248,7 @@ int main()
 | 
			
		||||
        if( skip == 1 || ret == 3 )
 | 
			
		||||
        {
 | 
			
		||||
            total_skipped++;
 | 
			
		||||
            fprintf( stdout, "-------\n" );
 | 
			
		||||
            fprintf( stdout, "----\n" );
 | 
			
		||||
            fflush( stdout );
 | 
			
		||||
        }
 | 
			
		||||
        else if( ret == 0 && test_errors == 0 )
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user