Skip to content

Commit 5ded8b4

Browse files
committed
appveyor: Fix path to micropython executable
1 parent e546318 commit 5ded8b4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.appveyor.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ environment:
44
matrix:
55
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
66
MICROPY_CPYTHON3: c:/python34/python.exe
7-
MICROPYPATH: c:/projects/micropython/ports/windows
87
FullTypeCheck: 0
98
BuildMsys2Version: 1
109
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
1110
MICROPY_CPYTHON3: c:/python34/python.exe
12-
MICROPYPATH: c:/projects/micropython/ports/windows
1311
FullTypeCheck: 1
1412
BuildMsys2Version: 0
1513
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
@@ -83,6 +81,14 @@ for:
8381
8482
test_script:
8583
- ps: |
84+
$env:MICROPY_MICROPYTHON = (msbuild ../micropython/ports/windows/micropython.vcxproj /nologo /v:m "/p:platform=$env:platform;configuration=$env:configuration" /t:ShowTargetPath).Trim()
85+
# Some versions of msbuild output 2 lines, one with only whitespace, in which case we assigned an array
86+
# of strings to $env:MICROPY_MICROPYTHON. And because environment variables must be strings, PS does
87+
# that by concatenating the array elements. So: trim again to leave only the path.
88+
$env:MICROPY_MICROPYTHON = $env:MICROPY_MICROPYTHON.Trim()
89+
# The .pyd is in this directory as well.
90+
$env:MICROPYPATH = Split-Path -Parent $env:MICROPY_MICROPYTHON
91+
8692
& $env:MICROPY_CPYTHON3 ../micropython/tests/run-tests.py --keep-path -d tests/py
8793
8894
if ($env:BuildMsys2Version -eq 1 -and $env:platform -eq 'x64' -and $env:configuration -eq 'Release') {

0 commit comments

Comments
 (0)