Skip to content

A post boot configuration checker using pytest-testinfra to validate whether required packages, files and services are configured properly on a Linux-kuiper deployment (https://wiki.analog.com/resources/tools-software/linux-software/adi-kuiper_images)

Notifications You must be signed in to change notification settings

sdgtt/kuiper-post-build-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kuiper-post-build-checker

A post boot configuration checker using pytest-testinfra to validate wether required packages, files and services are configured properly.

It automatically clones/pull ADI KUIPER GEN repo and checks needed files to counter check with target configurations.**

This is work-in-progress, current supported checking:

  1. Files
    • passwd
      • root (checks if root is present)
      • analog (checks if analog is present)
    • bashrc (checks if PYTHONPATH was set)
  2. apt packages
    • stage4/00-install-packages/00-packages
    • stage4/00-install-packages/00-packages-nr
    • stage4/00-install-packages/01-packages
    • stage4/00-install-packages/02-packages
    • stage6/01-install-packages/00-packages
  3. services (Services for now are specified manually in config.yaml)
    • iiod
    • sshd

**Please check config.yaml for details.

Installation

$ git clone https://gitlab.analog.com/KPaller/sqa_post_boot_checker.git

Pre-requisites

$pip install -r requirements.txt

Configuration

Modify config.yaml

  1. Set host (multiple host allowed)
    # format: "paramiko://username:password@target_ip"
    testinfra:
      hosts:
        - "paramiko://analog:[email protected]"
        - "paramiko://pi:[email protected]"
  1. Define files that contains packages list (currently supported format). Check https://github.com/analogdevicesinc/adi-kuiper-gen for directory structure.
    packages:
      paths:
        files:
          - stage4/00-install-packages/00-packages
          - stage4/00-install-packages/00-packages-nr
          - stage4/00-install-packages/01-packages
          - stage4/00-install-packages/02-packages
          - stage6/01-install-packages/00-packages
  1. Define services that needs to be checked.
    services:
      default:
        - iiod
        - sshd

Usage

$cd <working_path>

( Clones/Pull Kuiper Gen and execute all test in test/*)

$invoke test

( Clones/Pull Kuiper Gen and checkout to specified tree (branch or commit) and execute all test in test/*)

$invoke test -t <branch/commit hash>

( Clones/Pull Kuiper Gen and execute test spicifed by test file)

$invoke test -f <test file>

( Clones/Pull Kuiper Gen and checkout to tree (branch or commit) specified )

$invoke fetchkuipergen -t <branch/commit hash

Additional Notes

Current functionality is tested using RPI running Kuiper RC5.

About

A post boot configuration checker using pytest-testinfra to validate whether required packages, files and services are configured properly on a Linux-kuiper deployment (https://wiki.analog.com/resources/tools-software/linux-software/adi-kuiper_images)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages