idf.py: Add environment variable to enable ccache by default

This commit is contained in:
Angus Gratton
2019-09-02 10:56:56 +10:00
committed by Angus Gratton
parent 9134643807
commit 9a7ab28cc2
4 changed files with 19 additions and 6 deletions

View File

@@ -439,11 +439,11 @@ endmenu\n" >> ${IDF_PATH}/Kconfig;
print_status "Check ccache is used to build"
touch ccache && chmod +x ccache # make sure that ccache is present for this test
(export PATH=$PWD:$PATH && idf.py --ccache reconfigure | grep "ccache will be used for faster builds") || failure "ccache should be used when --cache is specified"
(export PATH=$PWD:$PATH && idf.py --ccache reconfigure | grep "ccache will be used") || failure "ccache should be used when --cache is specified"
idf.py fullclean
(export PATH=$PWD:$PATH && idf.py reconfigure| grep -c "ccache will be used for faster builds" | grep -wq 0) \
(export PATH=$PWD:$PATH && idf.py reconfigure| grep -c "ccache will be used" | grep -wq 0) \
|| failure "ccache should not be used even when present if --ccache is not specified"
(export PATH=$PWD:$PATH && idf.py --no-ccache reconfigure| grep -c "ccache will be used for faster builds" | grep -wq 0) \
(export PATH=$PWD:$PATH && idf.py --no-ccache reconfigure| grep -c "ccache will be used" | grep -wq 0) \
|| failure "--no-ccache causes no issue for backward compatibility"
rm -f ccache