Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/PPublic

Commit44c806c

Browse files
Merge pull request#828 from p-org/fix/console_output_log_path
Fix logs path missing in console output
2 parents10dd56e +5e682cd commit44c806c

File tree

6 files changed

+26
-12
lines changed

6 files changed

+26
-12
lines changed

‎Src/PChecker/CheckerCore/SystematicTesting/TestReport.cs‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,13 @@ public string GetText(CheckerConfiguration checkerConfiguration, string prefix =
241241
totalExploredSchedules,
242242
totalExploredSchedules==1?string.Empty:"s");
243243

244-
report.AppendLine();
245-
report.AppendFormat(
246-
"{0} Explored {1} timeline{2}",
247-
prefix.Equals("...")?".....":prefix,
248-
ExploredTimelines.Count,
249-
ExploredTimelines.Count==1?string.Empty:"s");
244+
// Comment out this part until feedback strategy error is fixed
245+
// report.AppendLine();
246+
// report.AppendFormat(
247+
// "{0} Explored {1} timeline{2}",
248+
// prefix.Equals("...") ? "....." : prefix,
249+
// ExploredTimelines.Count,
250+
// ExploredTimelines.Count == 1 ? string.Empty : "s");
250251

251252
if(totalExploredSchedules>0&&
252253
NumOfFoundBugs>0)

‎Src/PChecker/CheckerCore/SystematicTesting/TestingEngine.cs‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -629,10 +629,6 @@ private void RunNextIteration(int schedule)
629629
}
630630

631631
ConstructReproducableTrace(runtime);
632-
if(_checkerConfiguration.OutputDirectory!=null)
633-
{
634-
TryEmitTraces(_checkerConfiguration.OutputDirectory,"trace_0");
635-
}
636632
}
637633
}
638634
finally

‎Src/PChecker/CheckerCore/Testing/TestingProcess.cs‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ private async Task RunAsync()
8787
Console.WriteLine($"Checker found a bug.");
8888
}
8989

90+
if((!_checkerConfiguration.PerformFullExploration&&TestingEngine.TestReport.NumOfFoundBugs>0))
91+
{
92+
awaitEmitTraces();
93+
}
94+
9095
// Closes the remote notification listener.
9196
if(_checkerConfiguration.IsVerbose)
9297
{
@@ -115,6 +120,19 @@ private TestingProcess(CheckerConfiguration checkerConfiguration)
115120
IsProcessCanceled=false;
116121
}
117122

123+
/// <summary>
124+
/// Emits the testing traces.
125+
/// </summary>
126+
privateTaskEmitTraces()
127+
{
128+
varfile=Path.GetFileNameWithoutExtension(_checkerConfiguration.AssemblyToBeAnalyzed);
129+
file+="_"+_checkerConfiguration.TestingProcessId;
130+
131+
Console.WriteLine($"... Emitting traces:");
132+
TestingEngine.TryEmitTraces(_checkerConfiguration.OutputDirectory,file);
133+
returnTask.CompletedTask;
134+
}
135+
118136
/// <summary>
119137
/// Emits the test report.
120138
/// </summary>

‎Tst/CorrectLogs/bugs2/trace_0_0.txt‎renamed to ‎Tst/CorrectLogs/bugs2/Main_0_0.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@
1212
<StrategyLog> Found 1 bug.
1313
<StrategyLog> Scheduling statistics:
1414
<StrategyLog> Explored 1 schedule
15-
<StrategyLog> Explored 1 timeline
1615
<StrategyLog> Found 100.00% buggy schedules.
1716
<StrategyLog> Number of scheduling points in terminating schedules: 2 (min), 2 (avg), 2 (max).

‎Tst/UnitTests/PCheckerLogGeneratorTests.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private void AssertLog(string generatedDir, string expectedDir)
4747
stringgeneratedFilePath=Path.Combine(generatedDir,fileName);
4848
stringexpectedFilePath=Path.Combine(expectedDir,fileName);
4949

50-
if(fileName=="trace_0_0.trace.json")
50+
if(fileName=="Main_0_0.trace.json")
5151
{
5252
// Perform "Is JSON Included" check for this specific file
5353
if(!IsJsonContentIncluded(generatedFilePath,expectedFilePath))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp