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.
This commit is contained in:
Ivan Grokhotkov 2019-11-01 15:43:21 +01:00
parent 28b10e633d
commit 88b5a9c4d6

View file

@ -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"