Unit tests cannot access the Pandoc executable

Zev Spitz's Avatar

Zev Spitz

30 Dec, 2020 07:18 PM

During the course of the build, I install Pandoc using the Chocolatey bundle. The installation completes successfully, installing the 64-bit version, and I can even run the executable from a pre-test script, using both the absolute path, and relying on the PATH environment variable:

before_test:
- cmd: pandoc -v
- cmd: "\"c:\program files\pandoc\pandoc.exe\" -v"
However, when I try to run the executable within my unit tests (using Process.Start all the tests fail with a System.ComponentModel.Win32Exception : The system cannot find the file specified.

I've tried moving the Pandoc installation to the before_test section, without success.

The tests run on my machine without a problem.

How can I fix this?

Note that the issue has not been resolved; latest commits simply don't run the tests as part of the build.

  1. 1 Posted by Zev Spitz on 05 Jan, 2021 08:52 PM

    Zev Spitz's Avatar

    This is still an issue in the current builds.

  2. Support Staff 2 Posted by Feodor Fitsner on 05 Jan, 2021 09:09 PM

    Feodor Fitsner's Avatar

    I don't see before_test in the recent builds, but if you are saying you are able to run "\"c:\program files\pandoc\pandoc.exe\" -v" then I believe there is an issue within your tests then.

    For example, this line looks weird. Why not to try just FileName = pandocPath,? I see only tests using GetAst and GetJson are using pandoc - check if they are successful or point me to their result.

    Also, it looks like most of those The system cannot find the file specified. errors are not related to pandoc executable. For example, this test fails to find some {filterName}.exe.

  3. 3 Posted by Zev Spitz on 05 Jan, 2021 11:01 PM

    Zev Spitz's Avatar

    Thank you again, for your time and patience, especially since this wasn't an AppVeyor issue, but rather as you noted an issue in my tests.

    The current build is successful.

  4. Zev Spitz closed this discussion on 05 Jan, 2021 11:01 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac