]> granicus.if.org Git - esp-idf/commitdiff
ci: check that build uses ccache when present
authorRenz Christian Bagaporo <renz@espressif.com>
Mon, 6 May 2019 11:58:06 +0000 (19:58 +0800)
committerRenz Christian Bagaporo <renz@espressif.com>
Tue, 7 May 2019 04:00:41 +0000 (12:00 +0800)
tools/ci/test_build_system_cmake.sh

index dc5ebe8ed6af09a0c54a3718fbbe957bc457ed91..fa7b60609504713e3a601d006fa95224f115b045 100755 (executable)
@@ -393,7 +393,13 @@ endmenu\n" >> ${IDF_PATH}/Kconfig;
     pushd ${IDF_PATH}
     git checkout -- sdkconfig.rename Kconfig
     popd
-    idf.py build
+
+    print_status "Check ccache is used to build when present"
+    touch ccache && chmod +x ccache  # make sure that ccache is present for this test
+    (export PATH=$PWD:$PATH && idf.py reconfigure | grep "ccache will be used for faster builds") || failure "ccache should be used when present"
+    (export PATH=$PWD:$PATH && idf.py reconfigure --no-ccache | grep -c "ccache will be used for faster builds" | grep -wq 0) \
+        || failure "ccache should not be used even when present if --no-ccache is specified"
+    rm -f ccache
 
     print_status "All tests completed"
     if [ -n "${FAILURES}" ]; then