if self.vpp_instance:
return
cls = self.__class__ # Shorthand for setting class fields.
- fail_on_mismatch = Constants.CRC_MISMATCH_FAILS_TEST
- try:
- from robot.libraries.BuiltIn import BuiltIn
- from_robot = BuiltIn().get_variable_value(
- "\${crc_mismatch_fails}", None)
- if from_robot is not None:
- # Robot interprets env vars as strings.
- fail_on_mismatch = not from_robot.lower() in ("false", "n", "0")
- except (ImportError, AttributeError):
- # If robot is not installed or not running, or value is not string,
- # the Constants value applies.
- pass
package_path = None
tmp_dir = tempfile.mkdtemp(dir="/tmp")
try:
api_json_directory = tmp_dir + "/usr/share/vpp/api"
# Perform initial checks before .api.json files are gone,
# by creating the checker instance.
- cls.crc_checker = VppApiCrcChecker(
- api_json_directory, fail_on_mismatch=fail_on_mismatch)
+ cls.crc_checker = VppApiCrcChecker(api_json_directory)
# When present locally, we finally can find the installation path.
package_path = glob.glob(tmp_dir + installed_papi_glob)[0]
# Package path has to be one level above the vpp_papi directory.