Skip to content

Commit 8003f87

Browse files
davidbensamuel40791765
authored andcommitted
Make ninja run_tests output less confusing
We say "all tests passed" but we actually mean only the unit tests. Now the output is: Running Go tests ok boringssl.googlesource.com/boringssl/ssl/test/runner/hpke (cached) ok boringssl.googlesource.com/boringssl/util/ar (cached) ok boringssl.googlesource.com/boringssl/util/fipstools/acvp/acvptool/testmodulewrapper (cached) ok boringssl.googlesource.com/boringssl/util/fipstools/delocate (cached) Running unit tests ssl_test [shard 1/10] ... pki_test [shard 8/10] All unit tests passed! Running SSL tests 0/0/5481/5481/5481 PASS ok boringssl.googlesource.com/boringssl/ssl/test/runner 21.110s all_tests.go really should be called unit_tests.go, but renaming it will probably be too annoying. Change-Id: I7ff6684221930e19152ab3400419f4e5209aaf46 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/67107 Auto-Submit: David Benjamin <[email protected]> Reviewed-by: Bob Beck <[email protected]> Commit-Queue: Bob Beck <[email protected]> (cherry picked from commit c38abd038c6d6f6ebbe200090821e23313c4bd9c)
1 parent 8ca168d commit 8003f87

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

CMakeLists.txt

+11
Original file line numberDiff line numberDiff line change
@@ -1123,6 +1123,8 @@ if(BUILD_TESTING)
11231123

11241124
add_custom_target(
11251125
acvp_tests
1126+
COMMAND ${CMAKE_COMMAND} -E echo
1127+
COMMAND ${CMAKE_COMMAND} -E echo "Running ACVP tests"
11261128
COMMAND ${GO_EXECUTABLE} run check_expected.go
11271129
-tool ${ACVP_TOOL}
11281130
-module-wrappers modulewrapper:$<TARGET_FILE:modulewrapper>,testmodulewrapper:${TEST_WRAPPER}
@@ -1164,6 +1166,7 @@ if(BUILD_TESTING)
11641166
if(BUILD_LIBSSL)
11651167
add_custom_target(
11661168
run_ssl_runner_tests
1169+
COMMAND ${CMAKE_COMMAND} -E echo "Running SSL tests"
11671170
COMMAND cd ssl/test/runner &&
11681171
${GO_EXECUTABLE} test -timeout ${GO_TEST_TIMEOUT} -shim-path $<TARGET_FILE:bssl_shim>
11691172
${HANDSHAKER_ARGS} ${RUNNER_ARGS} ${AWS_LC_SSL_RUNNER_INDEX_FILTER} ${SSL_TRANSFER_ARGS}
@@ -1173,6 +1176,7 @@ if(BUILD_TESTING)
11731176

11741177
add_custom_target(
11751178
run_ssl_runner_tests_valgrind
1179+
COMMAND ${CMAKE_COMMAND} -E echo "Running SSL tests"
11761180
COMMAND cd ssl/test/runner &&
11771181
${GO_EXECUTABLE} test -timeout ${GO_TEST_TIMEOUT} -shim-path $<TARGET_FILE:bssl_shim> -valgrind
11781182
${HANDSHAKER_ARGS} ${RUNNER_ARGS} ${AWS_LC_SSL_RUNNER_INDEX_FILTER} ${SSL_TRANSFER_ARGS}
@@ -1182,7 +1186,11 @@ if(BUILD_TESTING)
11821186

11831187
add_custom_target(
11841188
run_tests
1189+
COMMAND ${CMAKE_COMMAND} -E echo
1190+
COMMAND ${CMAKE_COMMAND} -E echo "Running Go tests"
11851191
COMMAND ${GO_EXECUTABLE} test ${GO_TESTS}
1192+
COMMAND ${CMAKE_COMMAND} -E echo
1193+
COMMAND ${CMAKE_COMMAND} -E echo "Running unit tests"
11861194
COMMAND ${GO_EXECUTABLE} run util/all_tests.go -build-dir
11871195
${PROJECT_BINARY_DIR}
11881196
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
@@ -1191,7 +1199,10 @@ if(BUILD_TESTING)
11911199
else()
11921200
add_custom_target(
11931201
run_tests
1202+
COMMAND ${CMAKE_COMMAND} -E echo "Running Go tests"
11941203
COMMAND ${GO_EXECUTABLE} test ${GO_TESTS}
1204+
COMMAND ${CMAKE_COMMAND} -E echo
1205+
COMMAND ${CMAKE_COMMAND} -E echo "Running unit tests"
11951206
COMMAND ${GO_EXECUTABLE} run util/all_tests.go -build-dir
11961207
${PROJECT_BINARY_DIR} -ssl-tests=false
11971208
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}

util/all_tests.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -483,5 +483,5 @@ func main() {
483483
os.Exit(1)
484484
}
485485

486-
fmt.Printf("\nAll tests passed!\n")
486+
fmt.Printf("All unit tests passed!\n")
487487
}

0 commit comments

Comments
 (0)