Skip to content

Commit

Permalink
Test Automatus
Browse files Browse the repository at this point in the history
  • Loading branch information
evgenyz committed Feb 7, 2024
1 parent e47ca51 commit bdb79c7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/ssg_test_suite/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,13 @@ def _ensure_package_present_for_all_scenarios(
for rule_test_content in test_content_by_rule_id.values():
for s in rule_test_content.scenarios:
scenario_packages = s.script_params["packages"]
if scenario_packages == 'ntp':
logging.warning("Package 'ntp' required by '%s'" % s.script)
packages_required.update(scenario_packages)
if packages_required:
logging.warning("Packages collected: %s" % repr(packages_required))
packages_to_install = self._replace_platform_specific_packages(packages_required)
logging.warning("Packages to install: %s" % repr(packages_to_install))
common.install_packages(self.test_env, packages_to_install)

def _prepare_environment(self, test_content_by_rule_id):
Expand Down Expand Up @@ -641,8 +645,8 @@ def matches_platform(self, benchmark_cpes):
return True
else:
logging.warning(
"Script %s is not applicable on given platform" %
self.script)
"Script %s is not applicable on given platform '%s'" %
(self.script, self.script_params["platform"]))
return False

def matches_regex_and_platform(self, scenarios_regex, benchmark_cpes):
Expand Down

0 comments on commit bdb79c7

Please sign in to comment.