From af36675afd4300387390ceaba35a81994751cb75 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 17 Dec 2021 13:30:39 +0100 Subject: [PATCH] CMake: Fix exit code to be shown properly on test failure The result variable was expanded at configure time rather than at script execution time due to missing escaping. A tidbit of information, the result variable can contain not only an exit code, but a string as well. For example on arm macOS with a crashed test it contains 'SIGTRAP'. Curiously if the crashing executable is executed directly without CMake, 'Trace/BPT trap: 5' is shown instead, perhaps because of the shell. Amends 3ef6af024be43bc18352796df61542a241192583 Pick-to: 6.2 6.3 Change-Id: I50e57922abfc6eccde205c6252eebfda510bad41 Reviewed-by: Fabian Kosmale