Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] test: win: enable remaining functional tests #8378

Merged
merged 8 commits into from Nov 1, 2018

Conversation

janlazo
Copy link
Contributor

@janlazo janlazo commented May 12, 2018

#I'm using this PR to test assumptions for my vimrc and Appveyor environment. This will be similar to #7412 so expect frequent rebasing. I don't expect this to be merged for the 0.3 release.

Enable the following:

  • tests that use shelltemp, shellpipe, and related autocmd events and features (ie +quickfix).
  • tests disabled in 438f2b6
    • requires Ninja for Cmake Generator so that gzip (git-for-windows) is available

Thoughts/Wishlist for future releases (not included in this PR):

  • backward-compatible shellescape that supports powershell

@marvim marvim added the WIP label May 12, 2018
@janlazo janlazo force-pushed the win_functional_tests branch 2 times, most recently from 5bf35f1 to 2ecade9 Compare June 3, 2018 03:11
@janlazo janlazo force-pushed the win_functional_tests branch 3 times, most recently from 1482047 to 6d1ff98 Compare August 12, 2018 04:52
@janlazo
Copy link
Contributor Author

janlazo commented Aug 12, 2018

I can't switch out cmake generators without deleting .deps/ and build/. Using cache invalidation on Appveyor instead of updating ci/build.ps1 affected Travis builds. Deleting CMakeCache.txt didn't work.

@justinmk
Copy link
Member

To clear .deps on appveyor requires a change to third-party\** (see appveyor.yml).

The travis builds were failing because gnu.org is down, ff19f08 should fix it.

@janlazo janlazo force-pushed the win_functional_tests branch 2 times, most recently from 7b42b75 to 304c16d Compare October 19, 2018 02:05
appveyor.yml Outdated
@@ -18,6 +18,7 @@ build_script:
- powershell ci\build.ps1
cache:
- C:\msys64\var\cache\pacman\pkg -> ci\build.ps1
- .deps -> ci\build.ps1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to invalidate .deps/ to change the CMake generator

@janlazo
Copy link
Contributor Author

janlazo commented Oct 19, 2018

[00:10:33] [ SKIPPED  ] 56 tests, listed below:
[00:10:33] [ SKIPPED  ] ...jects/neovim/test/functional\api\buffer_updates_spec.lua @ 540: API: buffer events: works with :diffput and :diffget
[00:10:33] ...jects/neovim/test/functional\api\buffer_updates_spec.lua:542: Fails on appveyor for some reason.
[00:10:33] [ SKIPPED  ] ...ects/neovim/test/functional\api\server_requests_spec.lua @ 149: server -> client requests and notifications interleaved will close connection if not properly synchronized
[00:10:33] [ SKIPPED  ] test\functional\helpers.lua @ 567: server -> client jobstart() FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\api\vim_spec.lua @ 843: API nvim_list_chans and nvim_get_chan_info works for job channel
[00:10:33] C:/projects/neovim/test/functional\api\vim_spec.lua:845: jobstart(['cat']) unreliable on appveyor
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\core\channels_spec.lua @ 30: channels can connect to socket
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\core\channels_spec.lua @ 109: channels can use stdio channel with pty
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\core\channels_spec.lua @ 162: channels stdio channel can use rpc and stderr simultaneously
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\core\channels_spec.lua @ 194: channels can use buffered output mode
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\core\channels_spec.lua @ 227: channels can use buffered output mode with no stream callback
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\core\job_spec.lua @ 177: jobs preserves NULs
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\core\job_spec.lua @ 196: jobs will not buffer data if it doesn't end in newlines
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\core\job_spec.lua @ 213: jobs preserves newlines
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\core\job_spec.lua @ 221: jobs preserves NULs
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\core\job_spec.lua @ 232: jobs avoids sending final newline
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\core\job_spec.lua @ 612: jobs jobwait can be called recursively
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\core\job_spec.lua @ 687: jobs will only emit the "exit" event after "stdout" and "stderr"
[00:10:33] [ SKIPPED  ] test\functional\helpers.lua @ 567: jobs running tty-test program FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\core\job_spec.lua @ 850: pty process teardown does not prevent/delay exit. #4798 #4900
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\core\main_spec.lua @ 61: Command-line option -s does not crash after reading from stdin in non-headless mode
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] .../neovim/test/functional\eval\backtick_expansion_spec.lua @ 39: backtick expansion with shell=fish
[00:10:33] .../neovim/test/functional\eval\backtick_expansion_spec.lua:41: missing "fish" command
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\eval\interrupt_spec.lua @ 16: List support code does not actually allows interrupting with just got_int
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\eval\system_spec.lua @ 380: system() with a program that doesn't close stdout missing `xclip`
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\eval\system_spec.lua @ 564: systemlist() with a program that doesn't close stdout missing `xclip`
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\ex_cmds\ctrl_c_spec.lua @ 11: CTRL-C (mapped) interrupts :global
[00:10:33] test\functional\helpers.lua:582: skipped (test is fragile on this system)
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\ex_cmds\write_spec.lua @ 75: :write appends FIFO file
[00:10:33] C:/projects/neovim/test/functional\ex_cmds\write_spec.lua:78: missing "mkfifo" command
[00:10:33] [ SKIPPED  ] .../neovim/test/functional\legacy\011_autocommands_spec.lua @ 145: file reading, writing and bufnew and filter autocommands FilterReadPre, FilterReadPost
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\normal\langmap_spec.lua @ 243: 'langmap' Translates modified keys correctly
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\normal\langmap_spec.lua @ 249: 'langmap' handles multi-byte characters
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\normal\langmap_spec.lua @ 259: 'langmap' handles multibyte mappings
[00:10:33] [ SKIPPED  ] test\functional\helpers.lua @ 567: XDG-based defaults FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\options\keymap_spec.lua @ 190: 'keymap' / :lmap mappings not applied to macro replay of :lnoremap
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\plugin\shada_spec.lua @ 2303: plugin/shada.vim event FileWriteCmd works
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\shada\shada_spec.lua @ 242: ShaDa support code does not crash when ShaDa file directory is not writable
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] test\functional\helpers.lua @ 567: FIXME: Windows
[00:10:33] [ SKIPPED  ] test\functional\helpers.lua @ 567: FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\terminal\buffer_spec.lua @ 160: terminal buffer handles loss of focus gracefully
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] ...cts/neovim/test/functional\terminal\ex_terminal_spec.lua @ 50: :terminal reads output buffer on terminal reporting #4151
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] ...jects/neovim/test/functional\terminal\highlight_spec.lua @ 68: terminal window highlighting foreground will pass the corresponding attributes
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] ...jects/neovim/test/functional\terminal\highlight_spec.lua @ 70: terminal window highlighting foreground will pass the corresponding attributes on scrollback
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] ...jects/neovim/test/functional\terminal\highlight_spec.lua @ 68: terminal window highlighting background will pass the corresponding attributes
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] ...jects/neovim/test/functional\terminal\highlight_spec.lua @ 70: terminal window highlighting background will pass the corresponding attributes on scrollback
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] ...jects/neovim/test/functional\terminal\highlight_spec.lua @ 68: terminal window highlighting foreground and background will pass the corresponding attributes
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] ...jects/neovim/test/functional\terminal\highlight_spec.lua @ 70: terminal window highlighting foreground and background will pass the corresponding attributes on scrollback
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] ...jects/neovim/test/functional\terminal\highlight_spec.lua @ 68: terminal window highlighting bold, italics and underline will pass the corresponding attributes
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] ...jects/neovim/test/functional\terminal\highlight_spec.lua @ 70: terminal window highlighting bold, italics and underline will pass the corresponding attributes on scrollback
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] ...jects/neovim/test/functional\terminal\highlight_spec.lua @ 147: terminal window highlighting with custom palette will use the custom color
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\terminal\mouse_spec.lua @ 67: terminal mouse when the terminal has focus with mouse events enabled by the program will forward mouse clicks to the program
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\terminal\mouse_spec.lua @ 81: terminal mouse when the terminal has focus with mouse events enabled by the program will forward mouse scroll to the program
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] test\functional\helpers.lua @ 567: terminal mouse when the terminal has focus with a split window and other buffer FIXME: Windows
[00:10:33] [ SKIPPED  ] test\functional\helpers.lua @ 567: terminal scrollback with cursor at last row and height decreased by 1 FIXME: Windows
[00:10:33] [ SKIPPED  ] test\functional\helpers.lua @ 567: terminal scrollback with empty lines after the cursor FIXME: Windows
[00:10:33] [ SKIPPED  ] test\functional\helpers.lua @ 567: terminal scrollback with 4 lines hidden in the scrollback and the height is increased by 1 FIXME: Windows
[00:10:33] [ SKIPPED  ] test\functional\helpers.lua @ 567: FIXME: Windows
[00:10:33] [ SKIPPED  ] ...eovim/test/functional\terminal\window_split_tab_spec.lua @ 37: terminal does not change size on WinEnter
[00:10:33] test\functional\helpers.lua:567: FIXME: Windows
[00:10:33] [ SKIPPED  ] test\functional\helpers.lua @ 567: shell command :! FIXME: Windows
[00:10:33] [ SKIPPED  ] C:/projects/neovim/test/functional\ui\output_spec.lua @ 90: shell command :! handles control codes
[00:10:33] C:/projects/neovim/test/functional\ui\output_spec.lua:92: missing printf
[00:10:33] [  ERROR   ] 2 errors, listed below:
[00:10:33] [  ERROR   ] test\functional\helpers.lua @ 100: suite C:/projects/neovim/test/functional\provider\nodejs_spec.lua
[00:10:33] test\functional\helpers.lua:100: Vim(let):E903: Process failed to start: no such file or directory: "yarn"
[00:10:33] 
[00:10:33] stack traceback:
[00:10:33] 	test\functional\helpers.lua:100: in function <test\functional\helpers.lua:93>
[00:10:33] 	test\functional\helpers.lua:642: in function 'missing_provider'
[00:10:33] 	C:/projects/neovim/test/functional\provider\nodejs_spec.lua:11: in main chunk
[00:10:33] 
[00:10:33] [  ERROR   ] ...ects/neovim/test/functional\terminal\scrollback_spec.lua @ 417: 'scrollback' option deletes lines (only) if necessary
[00:10:33] test\functional\ui\screen.lua:529: Failed to match any screen lines.
[00:10:33] Expected (anywhere): "%$"
[00:10:33] Actual:
[00:10:33]   |{1: }                             |
[00:10:33]   |                              |
[00:10:33]   |                              |
[00:10:33]   |                              |
[00:10:33]   |                              |
[00:10:33]   |                              |
[00:10:33]   |{3:-- TERMINAL --}                |
[00:10:33] 
[00:10:33] 
[00:10:33] 
[00:10:33] stack traceback:
[00:10:33] 	test\functional\ui\screen.lua:529: in function '_wait'
[00:10:33] 	test\functional\ui\screen.lua:331: in function 'expect'
[00:10:33] 	...ects/neovim/test/functional\terminal\scrollback_spec.lua:429: in function <...ects/neovim/test/functional\terminal\scrollback_spec.lua:417>
[00:10:33] 
[00:10:33] 
[00:10:33]  56 SKIPPED TESTS
[00:10:33]  2 ERRORS
[00:10:33] -- Output to stderr:
[00:10:33] 

" XXX: The following code is not portable
" https://github.com/yarnpkg/yarn/issues/2049#issuecomment-263183768
if has('unix')
let yarn_default_path = $HOME . '/.config/yarn/global/' . yarn_opts.entry_point
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't use yarn so I won't fix this for Windows. I'm interested only in missing_provider for the nodejs functional tests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw it's technically not non-portable code, as it'll still run without erroring on non-unix but not wind up taking the fast path.

return yarn_default_path
endif
endif
let yarn_opts.job_id = jobstart('yarn global dir', yarn_opts)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yarn uses shims so revert to the string format.

if executable('npm')
let npm_opts = deepcopy(s:NodeHandler)
let npm_opts.entry_point = '/neovim/bin/cli.js'
let npm_opts.job_id = jobstart('npm --loglevel silent root -g', npm_opts)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm uses shims so revert to the string format.

@justinmk
Copy link
Member

If this fixes a bug for nodejs on Windows let's merge it quickly. @mqudsi can you review the changes?

@mqudsi
Copy link
Contributor

mqudsi commented Oct 19, 2018

lgtm

@janlazo
Copy link
Contributor Author

janlazo commented Oct 20, 2018

This fails the build on mingw. msvc build ignores this and runs the oldtests anyway. Why?
Git's bin/ dir is kept in PATH for both builds.

[  ERROR   ] 1 error, listed below:
[  ERROR   ] ...ects/neovim/test/functional\terminal\scrollback_spec.lua @ 417: 'scrollback' option deletes lines (only) if necessary
test\functional\ui\screen.lua:529: Failed to match any screen lines.
Expected (anywhere): "%$"
Actual:
  |{1: }                             |
  |                              |
  |                              |
  |                              |
  |                              |
  |                              |
  |{3:-- TERMINAL --}                |
stack traceback:
	test\functional\ui\screen.lua:529: in function '_wait'
	test\functional\ui\screen.lua:331: in function 'expect'
	...ects/neovim/test/functional\terminal\scrollback_spec.lua:429: in function <...ects/neovim/test/functional\terminal\scrollback_spec.lua:417>

@janlazo
Copy link
Contributor Author

janlazo commented Oct 20, 2018

@justinmk You can cherry-pick 0923443 for npm/yarn fix if it must be merged ASAP.

@@ -1,4 +1,5 @@
Set-PSDebug -Trace 1
$ErrorActionPreference = 'stop'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This caught the cmake error for mingw build but not MSVC build.
When does 'Running functional tests failed with error' appear in a failed MSVC build for nvim functional tests?

@janlazo
Copy link
Contributor Author

janlazo commented Oct 20, 2018

f95e0ae from #9087 broke the MSVC hack.
cc @justinmk

Is there a cmake variable to modify MSBuild behavior and set IgnoreStandardErrorWarningFormat similar to CMAKE_SH and CMAKE_MAKE_PROGRAM (and used in 3a91617) for Mingw Makefiles generator?

@@ -429,7 +429,7 @@ describe("'scrollback' option", function()
screen:expect{any='%$'}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the expected startup time for this pass?

Copy link
Member

@justinmk justinmk Oct 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The retry() should not be needed, that was the purpose of screen:expect{any='%$'}. (retry() is like screen:expect() for non-screen tests).

If it was taking 13672 ms to complete, that implies that we might need the new unchanged option of screen:expect() added in #6930.

screen:expect{any='%$', unchanged=true}

But that seems wrong--there was no screen:expect() before this line, so it is not "unchanged" ...

@janlazo
Copy link
Contributor Author

janlazo commented Oct 21, 2018

@erw7 It worked. Why did the test take 13s?

[00:21:45]   [ RUN      ] 'scrollback' option deletes lines (only) if necessary: 
[00:21:45] CUSTOMBUILD : warning : Screen changes were received after the expected state. This indicates [C:\projects\neovim\build\functionaltest.vcxproj]
[00:21:45]   indeterminism in the test. Try adding screen:expect(...) (or wait()) between
[00:21:45]   asynchronous (feed(), nvim_input()) and synchronous API calls.
[00:21:45]     - Use Screen:redraw_debug() to investigate the problem. It might find
[00:21:45]       relevant intermediate states that should be added to the test to make it
[00:21:45]       more robust.
[00:21:45]     - If the point of the test is to assert the state after some user input
[00:21:45]       sent with feed(...), also adding an screen:expect(...) before the feed(...)
[00:21:45]       will help ensure the input is sent to nvim when nvim is in a predictable
[00:21:45]       state. This is preferable to using wait(), as it is more closely emulates
[00:21:45]       real user interaction.
[00:21:45]     - wait() can trigger redraws and consequently generate more indeterminism.
[00:21:45]       In that case try removing every wait().
[00:21:45]         
[00:21:45]   
[00:21:45] CUSTOMBUILD : warning : A screen test has immediate success. Try to avoid this unless the [C:\projects\neovim\build\functionaltest.vcxproj]
[00:21:45]   purpose of the test really requires it.
[00:21:45]   If necessary, silence this warning by
[00:21:45]   supplying the 'unchanged' argument to screen:expect.
[00:21:45]   stack traceback:
[00:21:45]   	test\functional\ui\screen.lua:531: in function '_wait'
[00:21:45]   	test\functional\ui\screen.lua:331: in function 'expect'
[00:21:45]   	...ects/neovim/test/functional\terminal\scrollback_spec.lua:429: in function <...ects/neovim/test/functional\terminal\scrollback_spec.lua:416>
[00:21:45]   
[00:21:45]   13672.00 ms OK

@janlazo janlazo force-pushed the win_functional_tests branch 3 times, most recently from dce344d to db9b690 Compare October 23, 2018 00:36
@@ -538,10 +538,6 @@ describe('API: buffer events:', function()
end)

it('works with :diffput and :diffget', function()
if os.getenv("APPVEYOR") then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passes on MSVC build. Why was it disabled on Appveyor?

@janlazo janlazo force-pushed the win_functional_tests branch 4 times, most recently from 96be38a to e973049 Compare October 26, 2018 11:06
@janlazo janlazo changed the title [WIP] test: win: enable remaining functional tests [RFC] test: win: enable remaining functional tests Oct 26, 2018
@marvim marvim added RFC and removed WIP labels Oct 27, 2018
@janlazo
Copy link
Contributor Author

janlazo commented Oct 27, 2018

I'm done with the functional tests so I'm porting the remaining adjustments from #8405 for build.ps1.

@justinmk
Copy link
Member

Passes on MSVC build. Why was it disabled on Appveyor?

@janlazo see #8005 (#8156 may also be related). Did that somehow get fixed?

I'm done with the functional tests so I'm porting the remaining adjustments from #8405 for build.ps1.

Is this PR in a "ready" state? Let's merge it before the big build.ps1 changes ...

@janlazo
Copy link
Contributor Author

janlazo commented Oct 30, 2018

@janlazo see #8005 (#8156 may also be related). Did that somehow get fixed?

@justinmk Git's bin/ is in PATH but that shouldn't affect :diff tests. Maybe a recent :diff vim-patch?

Is this PR in a "ready" state? Let's merge it before the big build.ps1 changes ...

It's "ready" but it has to be merged to master to test if it works with the cache and $ErrorActionPreference = 'stop'.

$cmakeGeneratorArgs = '-v'
$mingwPackages = @('ninja', 'gcc', 'make', 'cmake', 'perl', 'diffutils', 'unibilium').ForEach({
"mingw-w64-$arch-$_"
})
Copy link
Member

@justinmk justinmk Oct 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you add gcc to upgrade gcc? If possible we should use whatever appveyor already has, otherwise it adds variability to the builds. Same with make. Also saves time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it in the event I run this script on Windows like #8405 but it's better to update Makefile for Windows.


# Add MinGW to the PATH
$env:PATH = "C:\msys64\mingw$bits\bin;$env:PATH"

# Build third-party dependencies
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Su" ; exitIfFailed
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S mingw-w64-$arch-cmake mingw-w64-$arch-perl mingw-w64-$arch-diffutils mingw-w64-$arch-unibilium" ; exitIfFailed
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S $mingwPackages" ; exitIfFailed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if the build logs would be much shorter without --verbose ...

cmd /c npm link neovim
npm.cmd install -g neovim ; exitIfFailed
Get-Command -CommandType Application neovim-node-host.cmd
npm.cmd link neovim
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need ; exitIfFailed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. Keeping exitIfFailed stops the script at the npm.cmd command but the build will stop at Get-Command.

Close gzip file handles.
Give variables a default value to pass strict mode.
$ErrorActionPreference defines the default behavior
if a powershell command fails.
If it's set to 'stop', then it aborts the script
on the first unresolved error.
This behavior extends to native programs like cmake
but do not depend on it.

PowerShell/PowerShell#3996
@justinmk justinmk merged commit 11b438e into neovim:master Nov 1, 2018
@justinmk justinmk removed the RFC label Nov 1, 2018
@janlazo janlazo deleted the win_functional_tests branch November 1, 2018 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants