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

Run integration tests in single process #3715

Merged

Conversation

keyboardDrummer
Copy link
Member

@keyboardDrummer keyboardDrummer commented Mar 8, 2023

Changes

  • dafny run --target=cs now uses a separate process to run, so the statics of the compiled source code, such as Console, are not shared with the Dafny Compiler
  • Uses of Console. are replaced with non-static references.
  • Move DafnyFile class into its own file
  • Remove ThreadTaskScheduler which creates one-shot threads, and instead use a thread pool. Also consistently use large threads for resolution, translation to Boogie, printing and compilation.
  • Made counter example IDE support thread-safe
  • The TestDafny project now uses the new CLI UI

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@keyboardDrummer keyboardDrummer requested a review from robin-aws May 8, 2023 10:32
Comment on lines +97 to +101
if (compiler.TargetId == "lib") {
// Some tests still fail when using the lib back-end, for example due to disallowed assumptions being present in the test,
// Such as empty constructors with ensures clauses, generated from iterators
continue;
}
Copy link
Member

Choose a reason for hiding this comment

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

Ah this is how you kept it all green :) This is reasonable for now, but it'll be good to dig into those tests to see if the other backends are too permissive about this.

Copy link
Member

@robin-aws robin-aws left a comment

Choose a reason for hiding this comment

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

LGTM, but FYI I turned off the auto-merge just to make @fabiomadge's life easier as he's trying to release 4.1. If he's fine releasing from a branch go ahead and merge!

@keyboardDrummer keyboardDrummer enabled auto-merge (squash) May 11, 2023 09:24
@keyboardDrummer keyboardDrummer merged commit 47056fd into dafny-lang:master May 11, 2023
@keyboardDrummer keyboardDrummer deleted the directIntegrationTests branch May 11, 2023 10:55
fabiomadge added a commit to fabiomadge/dafny that referenced this pull request May 11, 2023
robin-aws added a commit to robin-aws/dafny that referenced this pull request May 11, 2023
fabiomadge added a commit that referenced this pull request May 11, 2023
keyboardDrummer added a commit to keyboardDrummer/dafny that referenced this pull request May 12, 2023
keyboardDrummer added a commit that referenced this pull request May 12, 2023
This reverts commit 87300f2.

That revert was done because the commit caused this nightly build
failure:
https://github.com/dafny-lang/dafny/actions/runs/4949075745/jobs/8850690455

Some of the failures related to the libraries submodule which is removed
now, but other like this one also didn't:
```
[xUnit.net 00:14:07.36]       System.Exception : Command returned non-zero exit code (255): dotnet /home/runner/work/dafny/dafny/dafny/Source/IntegrationTests/bin/Debug/net6.0/TestDafny.dll for-each-compiler --dafny /home/runner/work/dafny/dafny/unzippedRelease/dafny/dafny TestFiles/LitTests/LitTest/unicodechars/comp/Arrays.dfy -- --unicode-char
[xUnit.net 00:14:07.36]       Output:
[xUnit.net 00:14:07.36]       
[xUnit.net 00:14:07.36]       Error:
[xUnit.net 00:14:07.36]       TestDafny 4.1.0
[xUnit.net 00:14:07.36]       Copyright (C) 2023 TestDafny
[xUnit.net 00:14:07.36]       
[xUnit.net 00:14:07.36]       ERROR(S):
[xUnit.net 00:14:07.36]         Option 'dafny' is unknown.
```

From the code I don't see where the `--dafny` option could be coming
from

<small>By submitting this pull request, I confirm that my contribution
is made under the terms of the [MIT
license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
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.

2 participants