Skip to content

Commit

Permalink
Fix CI issues on Develop
Browse files Browse the repository at this point in the history
  • Loading branch information
taliaga committed Jul 5, 2022
1 parent 9aafb25 commit f93813b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
8 changes: 5 additions & 3 deletions CI/src/integration_tests/test_command_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
# Please, refer to the LICENSE file in the root directory.
# SPDX-License-Identifier: BSD-3-Clause

import unittest

import common.util as util

import pytest
import unittest

class TestCommandRun(unittest.TestCase):
"""
Expand Down Expand Up @@ -55,11 +54,13 @@ def test_entrypoint_with_option_arguments(self):
options_of_run_command=["--entrypoint=echo"])
self.assertEqual(out, ["--option arg"])

@pytest.mark.xfail(reason="CONTAINER-666")
def test_private_pid_namespace(self):
processes = self._run_ps_in_container(with_private_pid_namespace=True, with_init_process=False)
self.assertEqual(len(processes), 1)
self.assertEqual(processes[0], {"pid": 1, "comm": "ps"})

@pytest.mark.xfail(reason="CONTAINER-666")
def test_init_process(self):
processes = self._run_ps_in_container(with_private_pid_namespace=True, with_init_process=True)
self.assertEqual(len(processes), 2)
Expand All @@ -79,6 +80,7 @@ def _test_command_run(self, is_centralized_repository):
util.pull_image_if_necessary(is_centralized_repository, reference)
assert util.run_image_and_get_prettyname(is_centralized_repository, reference).startswith(prettyname)


def _run_ps_in_container(self, with_private_pid_namespace, with_init_process):
util.pull_image_if_necessary(is_centralized_repository=False, image=self.default_image)
options = []
Expand Down
5 changes: 3 additions & 2 deletions CI/src/integration_tests/test_command_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ def _test_command_version(self, command):
version_obtained = lines[0]

# This test is intended to test either an official release or a development version, both of which are always git describable.
# The git working directory (/sarus-source) is set in CI scripts.
try:
out = subprocess.check_output(["git", "-C", "/sarus-source", "describe", "--tags", "--dirty", "--always"]).decode()
# See scripts in CI folder
sarus_source_location = "/sarus-source"
out = subprocess.check_output(["git", "describe", "--tags", "--dirty", "--always"], cwd=sarus_source_location).decode()
version_expected = util.command_output_without_trailing_new_lines(out)[0]
except Exception as e:
assert False, f"failed to get sarus version from git. {e}"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![License: BSD 3-Clause](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![Documentation](https://readthedocs.org/projects/sarus/badge/?version=latest)](https://sarus.readthedocs.io/en/latest/?badge=latest)
[![Integration](https://github.com/eth-cscs/sarus/actions/workflows/integration.yml/badge.svg)](https://github.com/eth-cscs/sarus/actions/workflows/integration.yml)
[![Integration](https://github.com/eth-cscs/sarus/actions/workflows/integration.yml/badge.svg?event=push)](https://github.com/eth-cscs/sarus/actions/workflows/integration.yml)

Sarus is a software to run Linux containers on High Performance Computing
environments. Its development has been driven by the specific requirements of
Expand Down

0 comments on commit f93813b

Please sign in to comment.