From 88b5a9c4d647e55853de0b5e0e2717d0e6c3a4a7 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Fri, 1 Nov 2019 15:43:21 +0100 Subject: [PATCH] ci: fix regression in build system tests On macOS, rsync --exclude option accepts absolute paths as well as relative ones. On Linux, it doesn't, which results in endless recursive copying of test_build_system directory. --- tools/ci/test_build_system_cmake.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ci/test_build_system_cmake.sh b/tools/ci/test_build_system_cmake.sh index f1386b239..69aa398ca 100755 --- a/tools/ci/test_build_system_cmake.sh +++ b/tools/ci/test_build_system_cmake.sh @@ -159,9 +159,9 @@ function run_tests() # make a copy of esp-idf and CRLFify it CRLF_ESPIDF=${TESTDIR}/esp-idf-crlf mkdir -p ${CRLF_ESPIDF} + TESTDIR_REL=$($REALPATH ${TESTDIR} --relative-to ${IDF_PATH}) # Note: trailing slash after ${IDF_PATH} avoids creating esp-idf directory inside ${CRLF_ESPIDF} - rsync -a --exclude ${TESTDIR} ${IDF_PATH}/ ${CRLF_ESPIDF} - # cp -r ${IDF_PATH}/* ${CRLF_ESPIDF} + rsync -a --exclude ${TESTDIR_REL} ${IDF_PATH}/ ${CRLF_ESPIDF} # don't CRLFify executable files, as Linux will fail to execute them find ${CRLF_ESPIDF} -name .git -prune -name build -prune -type f ! -perm 755 -exec unix2dos {} \; IDF_PATH=${CRLF_ESPIDF} idf.py build || failure "Failed to build with CRLFs in source"