[rtems commit] libtest: Report target hash

Sebastian Huber sebh at rtems.org
Fri Feb 26 08:25:54 UTC 2021


Module:    rtems
Branch:    master
Commit:    74eff26c1dd57579ec7fec95aff4627dfa0daf42
Changeset: http://git.rtems.org/rtems/commit/?id=74eff26c1dd57579ec7fec95aff4627dfa0daf42

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Feb 23 19:47:02 2021 +0100

libtest: Report target hash

Update #4267.

---

 cpukit/libtest/t-test.c                       | 2 ++
 spec/build/bsps/m68k/mcf52235/tstmcf52235.yml | 1 +
 testsuites/libtests/ttest01/init.c            | 8 ++++++--
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/cpukit/libtest/t-test.c b/cpukit/libtest/t-test.c
index fa7c198..910d965 100644
--- a/cpukit/libtest/t-test.c
+++ b/cpukit/libtest/t-test.c
@@ -841,6 +841,8 @@ T_system(T_context *ctx)
 	T_do_log(ctx, T_QUIET, "S:Version:%s\n", rtems_version());
 	T_do_log(ctx, T_QUIET, "S:BSP:%s\n", rtems_board_support_package());
 	T_do_log(ctx, T_QUIET, "S:BuildLabel:%s\n", rtems_get_build_label());
+	T_do_log(ctx, T_QUIET, "S:TargetHash:SHA256:%s\n",
+	    rtems_get_target_hash());
 #if RTEMS_DEBUG
 	T_do_log(ctx, T_QUIET, "S:RTEMS_DEBUG:1\n");
 #else
diff --git a/spec/build/bsps/m68k/mcf52235/tstmcf52235.yml b/spec/build/bsps/m68k/mcf52235/tstmcf52235.yml
index 4fab309..a9cd2b2 100644
--- a/spec/build/bsps/m68k/mcf52235/tstmcf52235.yml
+++ b/spec/build/bsps/m68k/mcf52235/tstmcf52235.yml
@@ -21,6 +21,7 @@ actions:
     tmcontext01: exclude
     tmfine01: exclude
     top: exclude
+    ttest01: exclude
     utf8proc01: exclude
 build-type: option
 copyrights:
diff --git a/testsuites/libtests/ttest01/init.c b/testsuites/libtests/ttest01/init.c
index f540520..3e3242a 100644
--- a/testsuites/libtests/ttest01/init.c
+++ b/testsuites/libtests/ttest01/init.c
@@ -130,6 +130,8 @@ static const char censored_init[] = "A:ttest01\n"
 "S:Compiler:*"
 "S:Version:*"
 "S:BSP:*"
+"S:BuildLabel:*"
+"S:TargetHash:SHA256:*"
 "S:RTEMS_DEBUG:*"
 "S:RTEMS_MULTIPROCESSING:*"
 "S:RTEMS_POSIX_API:*"
@@ -161,7 +163,9 @@ censor_putchar(int c, void *arg)
 		} else if (c == *ctx->censor_c) {
 			(*ctx->putchar)(c, ctx->putchar_arg);
 			++ctx->censor_c;
-		}
+		} else {
+	                test_assert(0);
+                }
 		break;
 	case CENSOR_DISCARD:
 		if (c == '\n') {
@@ -184,7 +188,7 @@ run_initialize(void)
 }
 
 static const char expected_final[] = "Z:ttest01:C:344:N:1339:F:795:D:0.691999\n"
-"Y:ReportHash:SHA256:23dd328162c564ada3c4de97446801018ade051aaec3308bb9a7ef8f98041d67\n";
+"Y:ReportHash:SHA256:2e044b038565203cde1ff74b3e28403a3a96f0802e8d3f82a37170065a17a0a1\n";
 
 static void
 run_finalize(void)



More information about the vc mailing list