mirror of
				https://github.com/Mbed-TLS/mbedtls.git
				synced 2025-11-03 20:33:16 +03:00 
			
		
		
		
	Explain the final error checking
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
		@@ -285,10 +285,15 @@ fi
 | 
				
			|||||||
# If the coverage summary doesn't end with the expected last two lines
 | 
					# If the coverage summary doesn't end with the expected last two lines
 | 
				
			||||||
# ("Branches Tested" and a blank line), either there was an error while
 | 
					# ("Branches Tested" and a blank line), either there was an error while
 | 
				
			||||||
# creating the coverage summary or the coverage summary reported failures.
 | 
					# creating the coverage summary or the coverage summary reported failures.
 | 
				
			||||||
 | 
					# The script runs under `set -e`, so most failures cause it to abort,
 | 
				
			||||||
 | 
					# but failures on the left-hand side of a pipe are not detected (this is
 | 
				
			||||||
 | 
					# a limitation of sh), so we check that the left-hand side of the pipe
 | 
				
			||||||
 | 
					# succeeded by checking that it took the last action that it was expected
 | 
				
			||||||
 | 
					# to take.
 | 
				
			||||||
newline='
 | 
					newline='
 | 
				
			||||||
'
 | 
					'
 | 
				
			||||||
case "$(tail -n2 coverage-summary.txt)" in
 | 
					case "$(tail -n2 coverage-summary.txt)" in
 | 
				
			||||||
    *"$newline"*) exit 1;;
 | 
					    *"$newline"*) exit 1;; # last line was not blank
 | 
				
			||||||
    "Branches Tested"*) :;;
 | 
					    "Branches Tested"*) :;; # looks good
 | 
				
			||||||
    *) exit 1;;
 | 
					    *) exit 1;; # next-to-last line had unexpected content
 | 
				
			||||||
esac
 | 
					esac
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user