Tattoo - System for automating the Gentoo arch testing process

Related tags

Testingtattoo
Overview

Naming origin

Well, naming things is very hard. Thankfully we have an excellent team at Gentoo capable of naming things - The Infra team. Alec Warner (antarus) was kind enough to decide on the name "tattoo", which came from combining "tatt" (package testing tool used here) and "Gentoo".

Setup

Developer's own machine

  1. Install the following dependencies:
    • app-portage/nattka
    • net-misc/openssh
  2. Select the directory from which we will work. Always run and set files inside this directory. It can be the source files directory.
  3. Create a ssh_config file using the ssh_config.in template. Fill your username, select the wanted path for socket on every host, and define the various hosts and theirs hostname.
  4. Add an environment variable (for example into .bashrc) named ARCHTESTER_BUGZILLA_APIKEY which equals to an API key from bugzilla.

Remote machine - machine manager

  1. Install the following dependencies:
    • dev-lang/python[sqlite(+)] (tested on >=3.9)
    • app-portage/nattka
  2. Select the directory from which we will work. Always run and set files inside this directory. It can be the source files directory. It must be the same directory as set in the ssh_config directory (by default ~/tattoo)

Remote machine - testing container

  1. Install the following dependencies:
    • app-portage/nattka
    • app-portage/tatt
  2. Make sure the working directory of the machine manager is mount bound into the container. The mount destination inside the container would be the working directory for the testing container.
  3. Create a corresponding ~/.tatt file inside container, for example (IMPORTANT: replace ARCH)
    arch=arm64
    emergeopts="--autounmask --autounmask-continue --autounmask-write"
    repodir="/var/db/repos/gentoo/"
    ignoreprefix="elibc_","video_cards_","linguas_","python_targets_","python_single_target_","kdeenablefinal","test","debug","qemu_user_","qemu_softmmu_","libressl","static-libs","systemd","sdjournal","eloginid","doc","ruby_targets_"
    buildlogdir=/root/logs
    rdeps=0
    usecombis=1
    

Running and using

Load all remote machines

  1. Run in selected directory (for example ~/tattoo) the command ./manager.py.
    • Inside this directory a file named tattoo.socket will be created. Through this socket all communication will occur.
    • A SQLite DB named tattoo.db will hold all successes and failures of test runs.
  2. In every container on that machine, run the command ./tester.py -n [NAME] -a [ARCH] -j [JOBS] where NAME is just a nice textual name to know which container did what, ARCH is the arch to test, with amd64 for stable bugs, and ~arm for keyword bugs. JOBS is the maximal concurrent testing jobs.
    • This command must be ran in the mount bound dir from manager, where the tattoo.socket is created (so it can communicate).
  3. Check that the manager logs all containers connecting to it.

Control from developer's own machine

  1. Connect to remote servers listed in ssh_config using ./controller.py -c. Various sockets are created inside /tmp/tattoo/ directory
  2. Send specific bugs using ./controller.py -b {NUM} {NUM} ... or initiate full scan for open bugs per arch using ./controller.py -s
  3. You can use "follower" mode to get live logs from all machines and testers using ./controller.py follower
  4. When bugs are ready, use ./controller.py fetch -n to view all done bugs, but in dry-run mode (no update for bugzilla, and no update last-seen bugs). Btw, the output corresponds to sam's at-commit script.
  5. When ready to apply, run ./controller.py fetch -ar -d [REPO] where REPO is the ::gentoo repo to apply on it the commits. This command also un-CC and closes bugs for what passed. After success, it saves in small file the last seen bugs, so you don't try to reapply them.
  6. From REPO push the commits (if you are unlucky, git pull --rebase before)
  7. Send, fetch, apply how much you want
  8. Disconnect from all using ./controller.py -d
Owner
Arthur Zamarin
Arthur Zamarin
Language-agnostic HTTP API Testing Tool

Dredd — HTTP API Testing Framework Dredd is a language-agnostic command-line tool for validating API description document against backend implementati

Apiary 4k Jan 05, 2023
Automating the process of sorting files in my downloads folder by file type.

downloads-folder-automation Automating the process of sorting files in a user's downloads folder on Windows by file type. This script iterates through

Eric Mahasi 27 Jan 07, 2023
The definitive testing tool for Python. Born under the banner of Behavior Driven Development (BDD).

mamba: the definitive test runner for Python mamba is the definitive test runner for Python. Born under the banner of behavior-driven development. Ins

Néstor Salceda 502 Dec 30, 2022
API mocking with Python.

apyr apyr (all lowercase) is a simple & easy to use mock API server. It's great for front-end development when your API is not ready, or when you are

Umut Seven 55 Nov 25, 2022
Photostudio是一款能进行自动化检测网页存活并实时给网页拍照的工具,通过调用Fofa/Zoomeye/360qua/shodan等 Api快速准确查询资产并进行网页截图,从而实施进一步的信息筛查。

Photostudio-红队快速爬取网页快照工具 一、简介: 正如其名:这是一款能进行自动化检测,实时给网页拍照的工具 信息收集要求所收集到的信息要真实可靠。 当然,这个原则是信息收集工作的最基本的要求。为达到这样的要求,信息收集者就必须对收集到的信息反复核实,不断检验,力求把误差减少到最低限度。我

s7ck Team 41 Dec 11, 2022
Faker is a Python package that generates fake data for you.

Faker is a Python package that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in yo

Daniele Faraglia 15.2k Jan 01, 2023
A collection of testing examples using pytest and many other libreris

Effective testing with Python This project was created for PyConEs 2021 Check out the test samples at tests Check out the slides at slides (markdown o

Héctor Canto 10 Oct 23, 2022
Python scripts for a generic performance testing infrastructure using Locust.

TODOs Reference to published paper or online version of it loadtest_plotter.py: Cleanup and reading data from files ARS_simulation.py: Cleanup, docume

Juri Tomak 3 Dec 15, 2022
🎓 Stepik Academy Автоматизация тестирования на Python

🎓 Stepik Academy Автоматизация тестирования на Python Запуск тестов выполняется в командной строке: pytest -v --tb=line --language=en --alluredir=all

Sergey 1 Dec 03, 2021
Bayesian A/B testing

bayesian_testing is a small package for a quick evaluation of A/B (or A/B/C/...) tests using Bayesian approach.

Matus Baniar 35 Dec 15, 2022
Test for generating stylized circuit traces from images

I test of an image processing idea to take an image and make neat circuit board art automatically. Inspired by this twitter post by @JackRhysider

Miller Hooks 3 Dec 12, 2022
Plugin for generating HTML reports for pytest results

pytest-html pytest-html is a plugin for pytest that generates a HTML report for test results. Resources Documentation Release Notes Issue Tracker Code

pytest-dev 548 Dec 28, 2022
The source code and slide for my talk about the subject: unittesing in python

PyTest Talk This talk give you some ideals about the purpose of unittest? how to write good unittest? how to use pytest framework? and show you the ba

nguyenlm 3 Jan 18, 2022
Testinfra test your infrastructures

Testinfra test your infrastructure Latest documentation: https://testinfra.readthedocs.io/en/latest About With Testinfra you can write unit tests in P

pytest-dev 2.1k Jan 07, 2023
HTTP client mocking tool for Python - inspired by Fakeweb for Ruby

HTTPretty 1.0.5 HTTP Client mocking tool for Python created by Gabriel Falcão . It provides a full fake TCP socket module. Inspired by FakeWeb Github

Gabriel Falcão 2k Jan 06, 2023
This file will contain a series of Python functions that use the Selenium library to search for elements in a web page while logging everything into a file

element_search with Selenium (Now With docstrings 😎 ) Just to mention, I'm a beginner to all this, so it it's very possible to make some mistakes The

2 Aug 12, 2021
🏃💨 For when you need to fill out feedback in the last minute.

BMSCE Auto Feedback For when you need to fill out feedback in the last minute. 🏃 💨 Setup Clone the repository Run pip install selenium Set the RATIN

Shaan Subbaiah 10 May 23, 2022
Android automation project with pytest+appium

Android automation project with pytest+appium

1 Oct 28, 2021
Object factory for Django

Model Bakery: Smart fixtures for better tests Model Bakery offers you a smart way to create fixtures for testing in Django. With a simple and powerful

Model Bakers 632 Jan 08, 2023
pytest plugin to test mypy static type analysis

pytest-mypy-testing — Plugin to test mypy output with pytest pytest-mypy-testing provides a pytest plugin to test that mypy produces a given output. A

David Fritzsche 21 Dec 21, 2022