mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 02:45:41 +01:00
Fixes to style following review
Made code spacing consistent with guidelines, and corrected the misnamed test steps in basic-build-test.sh
This commit is contained in:
parent
ab0c51d782
commit
f1547632dc
@ -99,7 +99,7 @@ static int run_test_snprintf( void )
|
|||||||
|
|
||||||
int main( int argc, char *argv[] )
|
int main( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
int ret = 0, v, suites_tested = 0, suites_failed =0,
|
int ret = 0, v, suites_tested = 0, suites_failed = 0,
|
||||||
exitcode = EXIT_SUCCESS;
|
exitcode = EXIT_SUCCESS;
|
||||||
#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C)
|
#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C)
|
||||||
unsigned char buf[1000000];
|
unsigned char buf[1000000];
|
||||||
@ -376,7 +376,7 @@ int main( int argc, char *argv[] )
|
|||||||
|
|
||||||
if( v != 0 )
|
if( v != 0 )
|
||||||
{
|
{
|
||||||
mbedtls_printf( " Executed %d test suites\n\n", suites_tested);
|
mbedtls_printf( " Executed %d test suites\n\n", suites_tested );
|
||||||
|
|
||||||
if( suites_failed > 0)
|
if( suites_failed > 0)
|
||||||
{
|
{
|
||||||
@ -395,6 +395,6 @@ int main( int argc, char *argv[] )
|
|||||||
if( suites_failed > 0)
|
if( suites_failed > 0)
|
||||||
exitcode = EXIT_FAILURE;
|
exitcode = EXIT_FAILURE;
|
||||||
|
|
||||||
exit(exitcode);
|
exit( exitcode );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ TOTAL_AVAIL=$(($PASSED_TESTS + $FAILED_TESTS))
|
|||||||
TOTAL_EXED=$(($PASSED_TESTS + $FAILED_TESTS))
|
TOTAL_EXED=$(($PASSED_TESTS + $FAILED_TESTS))
|
||||||
|
|
||||||
|
|
||||||
# Step 3b - Unit tests
|
# Step 4b - Unit tests
|
||||||
echo "Unit tests - tests/scripts/run-test-suites.pl"
|
echo "Unit tests - tests/scripts/run-test-suites.pl"
|
||||||
|
|
||||||
PASSED_TESTS=$(tail -n6 unit-test-$TEST_OUTPUT|sed -n -e 's/test cases passed :[\t]*\([0-9]*\)/\1/p'| tr -d ' ')
|
PASSED_TESTS=$(tail -n6 unit-test-$TEST_OUTPUT|sed -n -e 's/test cases passed :[\t]*\([0-9]*\)/\1/p'| tr -d ' ')
|
||||||
@ -117,7 +117,7 @@ TOTAL_AVAIL=$(($TOTAL_AVAIL + $PASSED_TESTS + $FAILED_TESTS + $SKIPPED_TESTS))
|
|||||||
TOTAL_EXED=$(($TOTAL_EXED + $PASSED_TESTS + $FAILED_TESTS))
|
TOTAL_EXED=$(($TOTAL_EXED + $PASSED_TESTS + $FAILED_TESTS))
|
||||||
|
|
||||||
|
|
||||||
# Step 3c - TLS Options tests
|
# Step 4c - TLS Options tests
|
||||||
echo "TLS Options tests - tests/ssl-opt.sh"
|
echo "TLS Options tests - tests/ssl-opt.sh"
|
||||||
|
|
||||||
PASSED_TESTS=$(tail -n5 sys-test-$TEST_OUTPUT|sed -n -e 's/.* (\([0-9]*\) \/ [0-9]* tests ([0-9]* skipped))$/\1/p')
|
PASSED_TESTS=$(tail -n5 sys-test-$TEST_OUTPUT|sed -n -e 's/.* (\([0-9]*\) \/ [0-9]* tests ([0-9]* skipped))$/\1/p')
|
||||||
@ -139,7 +139,7 @@ TOTAL_AVAIL=$(($TOTAL_AVAIL + $TOTAL_TESTS + $SKIPPED_TESTS))
|
|||||||
TOTAL_EXED=$(($TOTAL_EXED + $TOTAL_TESTS))
|
TOTAL_EXED=$(($TOTAL_EXED + $TOTAL_TESTS))
|
||||||
|
|
||||||
|
|
||||||
# Step 3d - System Compatibility tests
|
# Step 4d - System Compatibility tests
|
||||||
echo "System/Compatibility tests - tests/compat.sh"
|
echo "System/Compatibility tests - tests/compat.sh"
|
||||||
|
|
||||||
PASSED_TESTS=$(tail -n5 compat-test-$TEST_OUTPUT|sed -n -e 's/.* (\([0-9]*\) \/ [0-9]* tests ([0-9]* skipped))$/\1/p')
|
PASSED_TESTS=$(tail -n5 compat-test-$TEST_OUTPUT|sed -n -e 's/.* (\([0-9]*\) \/ [0-9]* tests ([0-9]* skipped))$/\1/p')
|
||||||
@ -161,7 +161,7 @@ TOTAL_AVAIL=$(($TOTAL_AVAIL + $EXED_TESTS + $SKIPPED_TESTS))
|
|||||||
TOTAL_EXED=$(($TOTAL_EXED + $EXED_TESTS))
|
TOTAL_EXED=$(($TOTAL_EXED + $EXED_TESTS))
|
||||||
|
|
||||||
|
|
||||||
# Step 3e - Grand totals
|
# Step 4e - Grand totals
|
||||||
echo "-------------------------------------------------------------------------"
|
echo "-------------------------------------------------------------------------"
|
||||||
echo "Total tests"
|
echo "Total tests"
|
||||||
|
|
||||||
@ -173,7 +173,7 @@ echo "Total avail tests : $TOTAL_AVAIL"
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
||||||
# Step 3f - Coverage
|
# Step 4f - Coverage
|
||||||
echo "Coverage"
|
echo "Coverage"
|
||||||
|
|
||||||
LINES_TESTED=$(tail -n3 cov-$TEST_OUTPUT|sed -n -e 's/ lines......: [0-9]*.[0-9]% (\([0-9]*\) of [0-9]* lines)/\1/p')
|
LINES_TESTED=$(tail -n3 cov-$TEST_OUTPUT|sed -n -e 's/ lines......: [0-9]*.[0-9]% (\([0-9]*\) of [0-9]* lines)/\1/p')
|
||||||
|
Loading…
Reference in New Issue
Block a user