Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run rogue.sh for cvn env. #459

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions os_tests/tests/test_rhel_guest_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,13 +538,22 @@ def test_check_files_controlled_by_rpm(self):
dest_path = '/tmp/' + utils_script
self.SSH.put_file(local_file=src_path, rmt_file=dest_path)
utils_lib.is_pkg_installed(self,"python3")
cmd = "sudo python3 %s" % dest_path
output = utils_lib.run_cmd(self,
cmd = "which python3"
ret = utils_lib.run_cmd(self, cmd, expect_ret=0, msg="Check if python3 exist")
if ret:
cmd = "sudo python3 %s" % dest_path
output = utils_lib.run_cmd(self,
cmd,
expect_ret=0,
timeout=1200,
msg="run rogue.py")

else:
cmd = "sudo sh -c 'chmod 755 %s && %s'" % (dest_path, dest_path)
output = utils_lib.run_cmd(self,
cmd,
expect_ret=0,
timeout=600,
msg="run rogue.sh")
cmd = "test -f /tmp/rogue && echo 'File exists' || echo 'File does not exist'"
output = utils_lib.run_cmd(self, cmd, expect_ret=0, msg="Check if /tmp/rogue exists")
self.assertEqual(output.strip(), 'File exists', "rogue.py failed to create /tmp/rogue")
Expand Down
Loading