-
Notifications
You must be signed in to change notification settings - Fork 34
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
Refactoring to use test watcher for unit tests as well. #1513
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
e2e9f1a
Refactoring to use test watcher for unit tests as well.
FlorianHuc 490c699
add header
FlorianHuc c31d933
spotless apply
FlorianHuc 40d88d7
Merge remote-tracking branch 'origin/arith-dev' into feat/watch-unit-…
FlorianHuc d21c629
skip refTest because of balance too high
letypequividelespoubelles 86b65fd
skip more huge balance tests
letypequividelespoubelles 4ffb909
Merge branch 'arith-dev' into feat/watch-unit-tests
letypequividelespoubelles 7a2029c
Merge remote-tracking branch 'origin/arith-dev' into feat/watch-unit-…
FlorianHuc ba9edf2
add watcher to all tests.
FlorianHuc 26f56b4
merge
FlorianHuc 05ce87a
fix merge
FlorianHuc e1495c1
fix merge
FlorianHuc 060a1f7
revert due to performance regression
FlorianHuc e5fbebe
skip more test
letypequividelespoubelles 8bed792
one more
letypequividelespoubelles 72beac7
Merge remote-tracking branch 'origin/arith-dev' into feat/watch-unit-…
FlorianHuc f9c02a5
Merge remote-tracking branch 'origin/feat/watch-unit-tests' into feat…
FlorianHuc 4b375a3
Merge branch 'arith-dev' into feat/watch-unit-tests
FlorianHuc e46371c
update linea-constraints
FlorianHuc aeb9779
Merge branch 'arith-dev' into feat/watch-unit-tests
FlorianHuc f8af05b
fix: increment failure counter + shorter error message
OlivierBBB 96aa0be
spotless
OlivierBBB 5e0c27e
Merge branch 'arith-dev' into feat/watch-unit-tests
OlivierBBB ebb23e9
testing mem issue
FlorianHuc 61c2b9a
Merge remote-tracking branch 'origin/feat/watch-unit-tests' into feat…
FlorianHuc dafe2c2
remove tests watcher
FlorianHuc 46a3ddf
spotless
FlorianHuc a4129d3
spotless
FlorianHuc ec73621
Merge branch 'arith-dev' into feat/watch-unit-tests
FlorianHuc 0905873
Merge remote-tracking branch 'origin/arith-dev' into feat/watch-unit-…
FlorianHuc ae697b6
add back deleted test
FlorianHuc 40b16a0
remove double brackets.
FlorianHuc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
arithmetization/src/test/java/net/consensys/linea/UnitTestOutcomeWriter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright Consensys Software Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
package net.consensys.linea; | ||
|
||
import static net.consensys.linea.reporting.TestOutcomeWriterTool.writeToJsonFile; | ||
|
||
import org.junit.platform.launcher.LauncherSession; | ||
import org.junit.platform.launcher.LauncherSessionListener; | ||
|
||
public class UnitTestOutcomeWriter implements LauncherSessionListener { | ||
|
||
public static final String FILE_NAME = "UnitTestsResults.json"; | ||
|
||
@Override | ||
public void launcherSessionClosed(LauncherSession session) { | ||
writeToJsonFile(FILE_NAME); | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
arithmetization/src/test/java/net/consensys/linea/UnitTestWatcher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright Consensys Software Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
package net.consensys.linea; | ||
|
||
import java.util.Optional; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
import net.consensys.linea.reporting.TestOutcomeWriterTool; | ||
import org.junit.jupiter.api.extension.ExtensionContext; | ||
import org.junit.jupiter.api.extension.TestWatcher; | ||
|
||
@Slf4j | ||
public class UnitTestWatcher implements TestWatcher { | ||
|
||
private String FAILED = "FAILED"; | ||
|
||
@Override | ||
public void testFailed(ExtensionContext context, Throwable cause) { | ||
String testName = context.getDisplayName(); | ||
log.info("Adding failure for {}", testName); | ||
TestOutcomeWriterTool.addFailure( | ||
FAILED, cause.getMessage().split(System.lineSeparator(), 2)[0], testName); | ||
log.info("Failure added for {}", testName); | ||
} | ||
|
||
@Override | ||
public void testSuccessful(ExtensionContext context) { | ||
TestOutcomeWriterTool.addSuccess(); | ||
} | ||
|
||
@Override | ||
public void testDisabled(ExtensionContext context, Optional<String> reason) { | ||
TestOutcomeWriterTool.addSkipped(); | ||
} | ||
|
||
@Override | ||
public void testAborted(ExtensionContext context, Throwable cause) { | ||
TestOutcomeWriterTool.addAborted(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagine that the CALL50000 could prove problematic with the MemoryRange implementation we currently have @letypequividelespoubelles ^^ If we have to keep 50k snapshots of memory ^^ I mean, it's not an issue. But I wonder whether the tests that @amkCha was able to run again on that 64GB machine would crash with our current tracer.