You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/conftest.py
+23-1
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@
20
20
importsimplejsonasjson
21
21
frominvokeimportLocal
22
22
frominvoke.contextimportContext
23
+
importtempfile
23
24
24
25
from .commonimportBoard
25
26
@@ -31,7 +32,28 @@ def data_dir(tmpdir_factory):
31
32
each test and deleted at the end, this way all the
32
33
tests work in isolation.
33
34
"""
34
-
returnstr(tmpdir_factory.mktemp("ArduinoTest"))
35
+
36
+
# it seems that paths generated by pytest's tmpdir_factory are too
37
+
# long and may lead to arduino-cli compile failures due to the
38
+
# combination of (some or all of) the following reasons:
39
+
# 1) Windows not liking path >260 chars in len
40
+
# 2) arm-gcc not fully optimizing long paths
41
+
# 3) libraries requiring headers deep down the include path
42
+
# for example:
43
+
#
44
+
# from C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\A7\packages\arduino\hardware\mbed\1.1.4\cores\arduino/mbed/rtos/Thread.h:29,
45
+
# from C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\A7\packages\arduino\hardware\mbed\1.1.4\cores\arduino/mbed/rtos/rtos.h:28,
46
+
# from C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\A7\packages\arduino\hardware\mbed\1.1.4\cores\arduino/mbed/mbed.h:23,
47
+
# from C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\A7\packages\arduino\hardware\mbed\1.1.4\cores\arduino/Arduino.h:32,
48
+
# from C:\Users\RUNNER~1\AppData\Local\Temp\arduino-sketch-739B2B6DD21EB014317DA2A46062811B\sketch\magic_wand.ino.cpp:1:
49
+
##[error]c:\users\runneradmin\appdata\local\temp\pytest-of-runneradmin\pytest-0\a7\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\c++\7.2.1\new:39:10: fatal error: bits/c++config.h: No such file or directory
50
+
#
51
+
# due to the above on Windows we cut the tmp path straight to /tmp/xxxxxxxx
0 commit comments