Created
June 8, 2013 14:14
-
-
Save azu/5735299 to your computer and use it in GitHub Desktop.
xctool test GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YESでビルドした、gcovのディレクトリを取得する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
trim() | |
{ | |
trimmed=$1 | |
trimmed=${trimmed%% } | |
trimmed=${trimmed## } | |
echo $trimmed | |
} | |
xctoolVars=$(xctool -showBuildSettings | egrep '(BUILT_PRODUCTS_DIR)|(CURRENT_ARCH)|(OBJECT_FILE_DIR_normal)|(SRCROOT)|(OBJROOT)' | egrep -v 'Pods') | |
while read line; do | |
declare key=$(echo "${line}" | cut -d "=" -f1) | |
declare value=$(echo "${line}" | cut -d "=" -f2) | |
printf -v "`trim ${key}`" "`trim ${value}`" | |
done < <( echo "${xctoolVars}" ) | |
declare gcov_dir="${OBJECT_FILE_DIR_normal}/${CURRENT_ARCH}" | |
echo $gcov_dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment