question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotty.tools.scripting.BashScriptsTests are not running properly, but tests are succeeding

See original GitHub issue
[info] Test run started
[info] Test dotty.tools.scripting.BashScriptsTests.verifyScalaArgs started
osname[linux]
bashExe: [/bin/bash]

/bin/bash: /home/vagrant/dotty/compiler/target/scala-3.0.0/test-classes/scripting/showArgs.sc: Permission denied
[info] Test dotty.tools.scripting.BashScriptsTests.verifyScalacArgs started
osname[linux]
bashExe: [/bin/bash]

/bin/bash: -script: command not found
[info] Test run finished: 0 failed, 0 ignored, 2 total, 0.061s

BashScriptsTests uses the which function provided by ClasspathTests to get the path of scala and scalac commands, but this function depends on the environment variable PATH, so it cannot get the path of the built binary.

As a result, the which function returns an empty string, and BashScriptsTests interprets the following first argument as a command and tries to execute it.

39   val scalacPath = which("scalac")
40   val scalaPath = which("scala")

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:32 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
philwalkcommented, Jun 30, 2021

I’ll look at today, it sounds like an easy fix.

2reactions
dwijnandcommented, Jul 7, 2021

That would ensure that the test passes. What I meant is the fact that with the previous PR the test was still silently failing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tests not running in Test Explorer - visual studio
All tests are running, all tests are showing the right test outcome. However, the tests are not running when using the Visual Studio...
Read more >
JEST tests complete successfully but returns exit status 1 #9324
I run JEST tests using npm run test:jest and the corresponding entry in package.json is "test:jest": "jest --config=.
Read more >
dotnet test command - .NET CLI | Microsoft Learn
The dotnet test command is used to execute unit tests in a given project.
Read more >
Django Tutorial Part 10: Testing a Django web application
Each test is initially run to verify that the bug has been fixed, and then re-run to ensure that it has not been...
Read more >
unittest — Unit testing framework — Python 3.11.1 ...
The script Tools/unittestgui/unittestgui.py in the Python source ... The unittest module can be used from the command line to run tests from modules, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found