Skip to content
Snippets Groups Projects
Verified Commit 22753316 authored by Nicolas KAROLAK's avatar Nicolas KAROLAK
Browse files

move utility packages installation & add some packages

parent 60799fe2
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,7 @@ packages = [
"pciutils",
"pwgen",
"python3-openssl",
"python3-psutil",
"python3-requests",
"python3-spf",
"smartmontools",
......
#!/usr/bin/env python3
from subprocess import call, DEVNULL
PACKAGES = [
"python3-openssl",
"python3-psutil",
"python3-requests",
"python3-spf",
]
def main():
for pkg in PACKAGES:
if call(["/usr/bin/dpkg", "-s", pkg], shell=False, stdout=DEVNULL, stderr=DEVNULL):
result = call(["/usr/bin/apt", "install", pkg], shell=False, stdout=DEVNULL, stderr=DEVNULL)
if not result:
print("{} install succeeded".format(pkg))
else:
print("{} install failed".format(pkg))
else:
print("{} already installed".format(pkg))
if __name__ == "__main__":
main()
......@@ -78,6 +78,7 @@ class Tester:
-f: send email with report only if at least one test failed.
-b: run only basic tests (exclude mediaserver tests).
-n: do not update envsetup repository.
-p: do not install packages.
-d: debug mode (can be started with non root users).
-h: show this message."""
% __file__
......@@ -132,6 +133,9 @@ class Tester:
log("The script has changed, restarting it...")
os.execl("/usr/bin/python3", "python3", tester_path, "-n", *args)
sys.exit(1) # not reachable
# Install utilities packages
if "-p" not in args:
subprocess.call(["python3", "pkgs_envsetup.py"])
# Load conf
conf = utils.load_conf()
if not conf:
......@@ -182,7 +186,7 @@ class Tester:
description = description.strip()
if description.startswith("Criticality:"):
criticality, *description = description.split("\n")
criticality = criticality[len("Criticality:"):].strip()
criticality = criticality[len("Criticality:") :].strip()
description = "\n".join(description)
else:
criticality = "not specified"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment