-
Notifications
You must be signed in to change notification settings - Fork 198
Dev p3.0/param testcases #879
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
base: major/P3.0
Are you sure you want to change the base?
Conversation
…into p-org-paramtest
* update assumption * fix: add deps back * refactor: constant -> param * fix * clean the code * unify normal/param/assume tests * clean the code * rename * merging safety test parser rules * clean the code * Update github CI action v2 to v3 * iUpdate github CI action v2 to v3 on ubuntu * rename variable "param" into "parameter" to avoid keyword conflicts
* add twise * clean the code
* Solved Concerns from Lewis: + new allow twise number be 1 + unify twise number valid condition + add unit test * add new test case * unit test for ParamAssignment.IterateAssignments
* Update build system and Java compiler, remove dependency JARs * Update CheckerCore logging and state machine components
…ametric test (#875) Co-authored-by: Christine Zhou <[email protected]>
@@ -24,4 +24,10 @@ jobs: | |||
- name: Build | |||
run: dotnet build --configuration Release | |||
- name: Test | |||
run: dotnet test --configuration Release | |||
run: dotnet test --configuration Release --blame-crash --blame-hang --blame-hang-timeout 300s --logger:"console;verbosity=detailed" |
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.
Can you please explain this change?
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.
This change is to get better logs when the GitHub Action fails. Without it, we just see that something crashed, but not what caused it. With these flags, we get more detailed output and can tell which test hung or crashed, which makes debugging a lot easier.
@@ -190,7 +190,7 @@ public static TestingEngine Create(CheckerConfiguration checkerConfiguration, As | |||
Console.Out.WriteLine($"{mi.DeclaringType.Name}"); | |||
} | |||
|
|||
Environment.Exit(0); |
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.
Why this change?
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.
This is needed because, for parametric tests, we have to fetch all the test case names using this function. The problem is that it calls Environment.Exit(0), which ends the entire regression test run early. So we had to handle it differently to avoid stopping the whole suite.
@@ -21,7 +22,8 @@ public class PCheckerCodeGenerator : ICodeGenerator | |||
/// This compiler has a compilation stage. | |||
/// </summary> | |||
public bool HasCompilationStage => true; | |||
private static List<Variable> _globalParams = []; | |||
[ThreadStatic] | |||
private static List<Variable> _globalParams; |
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.
why this change?
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.
This was causing issues when I ran regression tests in parallel. Since _globalParams was static, all the tests were sharing the same list, which led to conflicts. Adding [ThreadStatic] makes sure each test thread gets its own copy, so they don’t mess with each other.
@@ -102,6 +104,7 @@ private CompiledFile GenerateSource(CompilationContext context, Scope globalScop | |||
// write the top level declarations | |||
foreach (var decl in globalScope.AllDecls) | |||
{ | |||
// Console.WriteLine("top-level decl: " + decl.Name); |
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.
Please make a pass to remove unwanted changes.
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.
will do
Merging param test cases branch into major 3.0