diff --git a/.github/scripts/test-all-plugins.py b/.github/scripts/test-all-plugins.py index caf27eb4f..365101248 100644 --- a/.github/scripts/test-all-plugins.py +++ b/.github/scripts/test-all-plugins.py @@ -53,7 +53,7 @@ def launch_snmp_sim(): try_command(cmd=snmpsim_cmd, error="can't launch snmp sim daemon.") def refresh_packet_manager(archi): - with open('/var/log/robot-plugins-installation-tests.log', "a") as outfile: + with open('/var/log/robot-tests/robot-plugins-installation-tests.log', "a") as outfile: if archi == "deb": outfile.write("apt-get update\n") output_status = (subprocess.run( @@ -67,7 +67,7 @@ def refresh_packet_manager(archi): return output_status def install_plugin(plugin, archi): - with open('/var/log/installation-' + plugin + '.log', "a") as outfile: + with open('/var/log/robot-tests/installation-' + plugin + '.log', "a") as outfile: if archi == "deb": outfile.write("apt-get install -o 'Binary::apt::APT::Keep-Downloaded-Packages=1;' -y ./" + plugin.lower() + "*.deb\n") output_status = (subprocess.run( @@ -84,7 +84,7 @@ def install_plugin(plugin, archi): def remove_plugin(plugin, archi): - with open('/var/log/uninstallation-' + plugin + '.log', "a") as outfile: + with open('/var/log/robot-tests/uninstallation-' + plugin + '.log', "a") as outfile: if archi == "deb": outfile.write("apt-get -o 'Binary::apt::APT::Keep-Downloaded-Packages=1;' autoremove -y " + plugin.lower() + "\n") output_status = (subprocess.run( @@ -122,6 +122,9 @@ if __name__ == '__main__': archi = sys.argv.pop(1) # expected either deb or rpm. script_name = sys.argv.pop(0) + # Create a directory for logs + os.mkdir("/var/log/robot-tests") + error_install = 0 error_tests = 0 error_purge = 0 diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index c31be04f1..c15bfd902 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -336,7 +336,7 @@ jobs: uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 with: name: plugin-installation-${{ matrix.distrib }} - path: /var/log/robot-plugins-installation-tests.log + path: /var/log/robot-tests retention-days: 1 deliver: