From 8890627f6dd067a14c300d17ff7b4716d35e7211 Mon Sep 17 00:00:00 2001
From: Angus Gratton <angus@espressif.com>
Date: Mon, 18 Mar 2019 17:53:17 +1100
Subject: [PATCH] ci: Fix build system CMake test for v3.1

Fix regression in !4365
---
 tools/ci/test_build_system_cmake.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/ci/test_build_system_cmake.sh b/tools/ci/test_build_system_cmake.sh
index 4dda504c4e..0e73339e01 100755
--- a/tools/ci/test_build_system_cmake.sh
+++ b/tools/ci/test_build_system_cmake.sh
@@ -213,15 +213,15 @@ function run_tests()
     assert_built ${APP_BINS} ${BOOTLOADER_BINS} ${PARTITION_BIN}
 
     print_status "Building a project with CMake and PSRAM workaround, all files compile with workaround"
-    cp sdkconfig sdkconfig.psram
+    cp sdkconfig sdkconfig.bak
     rm -rf build
-    echo "CONFIG_SPIRAM_SUPPORT=y" >> sdkconfig.psram
-    echo "CONFIG_SPIRAM_CACHE_WORKAROUND=y" >> sdkconfig.psram
+    echo "CONFIG_SPIRAM_SUPPORT=y" >> sdkconfig
+    echo "CONFIG_SPIRAM_CACHE_WORKAROUND=y" >> sdkconfig
     # note: we do 'reconfigure' here, as we just need to run cmake
-    idf.py reconfigure -D SDKCONFIG="`pwd`/sdkconfig.psram"
+    idf.py reconfigure
     grep -q '"command"' build/compile_commands.json || failure "compile_commands.json missing or has no no 'commands' in it"
     (grep '"command"' build/compile_commands.json | grep -v mfix-esp32-psram-cache-issue) && failure "All commands in compile_commands.json should use PSRAM cache workaround"
-    rm sdkconfig.psram
+    mv sdkconfig.bak sdkconfig
 
     print_status "All tests completed"
     if [ -n "${FAILURES}" ]; then
-- 
2.40.0