Adds functional tests for the following functionalities:
Analysis: tests triggering, starting and completing the analysis with appropriate messages shown to the user if the analysis succeeds or fails, as well as the functionality of aborting the previous analysis when a new one is started;
GobPie configuration: tests reading and processing all GobPie configurations correctly with appropriate messages shown to the user if reading configuration fails;
Goblint configuration: tests if refreshing Goblint configuration works as intended and if the user is notified with appropriate messages if the refreshing process fails;
Goblint messages: tests if the messages received by Goblint are correctly processed, converted and passed to the MagpieBridge server;
Goblint server: tests that Goblint is run correctly;
Bug fixes:
The process listener intended only for the Goblint process was also added to the preAnalyze process;
The user was not notified if there was an unknown configuration present in the GobPie configuration file (added GobPieValidatorAdapter)`;
The explodeGroupWarnings setting was not only applied for the data race warnings but also exploded the group warnings that communicate the statistics of dead code and accesses;
Refactorings:
Some of the logic of pre-analysis was handled in the getter method that is now moved to the preAnalyse method;
Added a new class, GoblintConfWatcher, that is passed to the GoblintAnalysis constructor as an argument instead of initializing goblintConfWatcher field with a new FileWatcher inside the constructor; The functionalities concerning refreshing the Goblint configuration were also moved to this class instead of being in the GoblintAnalysis class that should be only responsible for the functionalities concerning the analysis itself;
The runCommand, preAnalyse and abortAnalysis methods were moved from the GoblintAnalysis class to GoblintServer;
Added a Builder for GobPieConfiguration to ease testing;
Some classes, where the fields were initialized only once (mainly the classes corresponding to the Goblint server responses) were converted to records;
Added equals methods for many of the classes for testing purposes;
Some methods were made public for being able to call them in the tests;
Some restructuring of the classes into different packages based on their main functionality:
Classes GoblintSocketMessageConsumer.java and GoblintSocketMessageProducer.java were moved from src/main/java/api/json to src/main/java/api/jsonrpc, so that in the json package, there are only JSON handlers and adapters;
Classes that override specific MagpieBridge functionalities were moved to a separate package src/main/java/magpiebridge
Adds functional tests for the following functionalities:
Bug fixes:
preAnalyze
process;GobPieValidatorAdapter
)`;explodeGroupWarnings
setting was not only applied for the data race warnings but also exploded the group warnings that communicate the statistics of dead code and accesses;Refactorings:
getter
method that is now moved to thepreAnalyse
method;GoblintConfWatcher
, that is passed to theGoblintAnalysis
constructor as an argument instead of initializinggoblintConfWatcher
field with a newFileWatcher
inside the constructor; The functionalities concerning refreshing the Goblint configuration were also moved to this class instead of being in theGoblintAnalysis
class that should be only responsible for the functionalities concerning the analysis itself;runCommand
,preAnalyse
andabortAnalysis
methods were moved from theGoblintAnalysis
class toGoblintServer
;Builder
forGobPieConfiguration
to ease testing;equals
methods for many of the classes for testing purposes;GoblintSocketMessageConsumer.java
andGoblintSocketMessageProducer.java
were moved fromsrc/main/java/api/json
tosrc/main/java/api/jsonrpc
, so that in thejson
package, there are only JSON handlers and adapters;MagpieBridge
functionalities were moved to a separate packagesrc/main/java/magpiebridge
Coverage: