<<: *host_test_template
script:
- cd tools/kconfig_new/test
- - ./test_confserver.py
+ - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./test_confserver.py
test_build_system:
<<: *host_test_template
tools/kconfig/mconf
tools/kconfig/merge_config.sh
tools/kconfig/streamline_config.pl
-tools/kconfig_new/confgen.py
-tools/kconfig_new/confserver.py
-tools/kconfig_new/test/test_confserver.py
tools/mass_mfg/mfg_gen.py
tools/test_idf_monitor/run_test_idf_monitor.py
tools/unit-test-app/unit_test.py
def main():
if sys.version_info[0] != 2 or sys.version_info[1] != 7:
- raise FatalError("ESP-IDF currently only supports Python 2.7, and this is Python %d.%d.%d. Search for 'Setting the Python Interpreter' in the ESP-IDF docs for some tips to handle this." % sys.version_info[:3])
+ print("Note: You are using Python %d.%d.%d. Python 3 support is new, please report any problems "
+ "you encounter. Search for 'Setting the Python Interpreter' in the ESP-IDF docs if you want to use "
+ "Python 2.7." % sys.version_info[:3])
parser = argparse.ArgumentParser(description='ESP-IDF build management tool')
parser.add_argument('-p', '--port', help="Serial port",
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+from __future__ import print_function
import argparse
import sys
import os
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+from __future__ import print_function
import os
import kconfiglib
#!/usr/bin/env python
+from __future__ import print_function
import os
import sys
import threading
import json
import argparse
import shutil
+import tempfile
import pexpect
parser.add_argument('--logfile', type=argparse.FileType('w'), help='Optional session log of the interactions with confserver.py')
args = parser.parse_args()
- # set up temporary file to use as sdkconfig copy
- temp_sdkconfig_path = os.tmpnam()
try:
- with open(temp_sdkconfig_path, "w") as temp_sdkconfig:
+ # set up temporary file to use as sdkconfig copy
+ with tempfile.NamedTemporaryFile(mode="w", delete=False) as temp_sdkconfig:
+ temp_sdkconfig_path = os.path.join(tempfile.gettempdir(), temp_sdkconfig.name)
with open("sdkconfig") as orig:
temp_sdkconfig.write(orig.read())
def expect_json():
# run p.expect() to expect a json object back, and return it as parsed JSON
p.expect("{.+}\r\n")
- return json.loads(p.match.group(0).strip())
+ return json.loads(p.match.group(0).strip().decode())
p.expect("Server running.+\r\n")
initial = expect_json()