Generate text file to save build path depth in coverage build (#3651)
author오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Tue, 20 Nov 2018 10:09:36 +0000 (19:09 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Tue, 20 Nov 2018 10:09:36 +0000 (19:09 +0900)
Generate text file tools/test_driver/build_path_depth.txt to save build path depth.
gcov for cross build need directory strip to match build host directory and target directory.
Build path depth will be used to set GCOV_PREFIX_STRIP environment variable on target.

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
Makefile

index 59fa357..d063f2b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -218,8 +218,9 @@ build_coverage_suite: install_internal
        @echo "packaging test-coverage suite"
        @rm -rf $(INSTALL_ROOT)/coverage-suite.tar.gz
        @find Product -name "*.gcno" > include_lists.txt
+       @pwd | grep -o '/' | wc -l > tools/test_driver/build_path_depth.txt
        @tar -zcf coverage-suite.tar.gz tests/ tools/test_driver $(INSTALL_ALIAS) --dereference -T include_lists.txt
-       @rm -rf include_lists.txt
+       @rm -rf include_lists.txt tools/test_driver/build_path_depth.txt
        @mv coverage-suite.tar.gz $(INSTALL_ROOT)/.
 
 runtime_build_internal: $(BUILD_ROOT)