Skip to content

OpenMPDK/dss-sdk

Repository files navigation

dss-sdk

dss-sdk is a sub-component of the larger project, DSS.

Major components

  • The target component is located under the target directory.
  • The host component is located under the host directory.

Dependencies

Supported operating systems

dss-sdk target and host can be built using one of the following:

  • CentOS 7.8
  • Rockylinux 8
  • Rockylinux 9
  • Ubuntu 22.04

Install build dependencies

sudo ./scripts/dependencies/install.sh

Build dss-sdk

Prior to building dss-sdk, ensure that you have checked-out submodules:

git clone --recurse-submodules https://github.com/OpenMPDK/dss-sdk

Alternatively:

git clone https://github.com/OpenMPDK/dss-sdk
git submodule update --init --recursive

Build dss-sdk target

./scripts/build_target.sh

Build dss-sdk host

note: dss-sdk target must be built prior to building host.

./scripts/build_host.sh kdd-samsung-remote

Build dss-sdk all (target + host)

./scripts/build_all.sh kdd-samsung-remote

Build dss-sdk with docker

Required: Install Docker Engine in your development environment.

dss-sdk can be built with any of the below docker base images:

  • centos:centos7.8.2003
  • rockylinux:8-minimal
  • rockylinux:9-minimal
  • ubuntu:22.04

Build with base image

Example build using Ubuntu 22 base image:

docker run -w /dss-sdk -i -t --rm -v "$(pwd)":/dss-sdk ubuntu:22.04 /bin/bash
./scripts/dependencies/install.sh
./scripts/build_all.sh kdd-samsung-remote

Create a dss-sdk build image from dockerfile

Alternatively, you can build one of the dockerfiles in scripts/docker to create an image with the build dependencies:

docker build -t dss-sdk:ubuntu22-master -f scripts/docker/ubuntu22.DOCKERFILE .

Build dss-sdk from dockerfile image

To build with the dss-sdk:ubuntu22-master image you have built, as described above:

docker run -i -t --rm -v "$(pwd)":/dss-sdk dss-sdk:ubunu22-master ./scripts/build_all.sh kdd-samsung-remote

Contributing

We welcome any contributions to dss-sdk. Please fork the repository and submit a pull request with your proposed changes. Before submitting a pull request, please make sure that your changes pass the existing unit tests and that new unit tests have been added to cover any new functionality.

DSS-SDK Pytest Framework

Unit tests for testing DataMover utility and module code. Leverages pytest-cov to generate a code coverage report

Pytest Requirements

This module requires the following modules:

pytest pytest-mock pytest-cov pytest-gitcov

Also refer to requirements.txt file if you would like to install these packages with pip

Run Pytest

You must be in the dss-sdk directory

Structure: python3 -m pytest <path to test folder or file> -v -rA --cov=<path to root folder of dss-sdk> --cov-report term --color=yes --disable-warnings

Here are some examples run from the dss-ecosystem directory

Run all tests by specifying the test folder python3 -m pytest tests -v -rA --cov=. --cov-report term --color=yes --disable-warnings

Run on a specific test file python3 -m pytest tests/test_dss_host.py -v -rA --cov=. --cov-report term --color=yes --disable-warnings

Run on a specific test class python3 -m pytest tests/test_dss_host.py::TestDSSHost -v -rA --cov=. --cov-report term --color=yes --disable-warnings

Run on a specific unittest python3 -m pytest tests/test_dss_host.py::TestDSSHost::test_is_ipv4 -v -rA --cov=. --cov-report term --color=yes --disable-warnings