Git Product home page Git Product logo

tests-beaker's Introduction

Beaker tasks used with skt runner

How to run tests

Here is a list of common prerequisites for all beaker tests. Test-specific dependencies and steps can be found in the README.md within each test's directory.

$ sudo wget -O /etc/yum.repos.d/beaker-client.repo https://beaker-project.org/yum/beaker-client-Fedora.repo
$ sudo wget -O /etc/yum.repos.d/beaker-harness.repo https://beaker-project.org/yum/beaker-harness-Fedora.repo
$ sudo dnf install -y beaker-client beakerlib restraint-rhts

Test onboarding

Currently, all onboarded tests must use the following combinations of result/status fields:

  • SKIP/COMPLETED if the test requirements aren't fulfilled (eg. test is running on incompatible architecture/hardware)
  • PASS/COMPLETED if the test finished successfully
  • WARN/ABORTED in case of infrastructure issues or other errors (eg. the test checks out a git repo and the git server is unavailable)
  • WARN/COMPLETED or FAIL/COMPLETED in case of any test failures, based on how serious they are (left to decide by test authors)

See examples below to properly abort or skip in beaker:

Abort task if infrastructure failure is task only related

if [ $? -ne 0 ]; then
    rlLog "Aborting test because $reason"
    rstrnt-abort --server $RSTRNT_RECIPE_URL/tasks/$TASKID/status
fi

Abort recipe if infrastructure failure affects the entire recipe

if [ $? -ne 0 ]; then
    rlLog "Aborting recipe because $reason"
    rstrnt-abort recipe
fi

Skip the task (e.g. testing with unsupported hardware)

if [ $? -ne 0 ]; then
    rlLog "Skipping test because $reason"
    rstrnt-report-result $TEST SKIP
    exit 0
fi

When onboarding a test, please check especially the point about infrastructure issues: a lot of tests simply report a warning if eg. external server can’t be reached and then continue. This kind of situation falls under infrastructure issues and the test must use the WARN/ABORTED combination, otherwise the infrastructure problem is reported to people as a bug in their code!

The order of Beaker tasks in the XML determines if the task is a preparation for the testing or a test. Anything after kpkginstall task is treated as a test and must follow the rules above. Anything except PASS before kpkginstall is treated as infrastructure issue. Machineinfo (to get HW specification) is ran before kpkginstall, so the same logic applies there. PANIC during kpkginstall means the kernel is bad (can't boot).

tests-beaker's People

Contributors

chunyu-hu avatar ckalina avatar darcari avatar dzickusrh avatar emanchado avatar emmawu avatar frozenstein avatar fsuba avatar ftjahjad avatar idorax avatar jbastian avatar jencce avatar jkysela-rh avatar lilinredhat avatar linup2011 avatar liuhangbin avatar major avatar mpatalan avatar rasibley avatar spbnick avatar sztsian avatar tcler avatar the-mule avatar veruu avatar wangli5665 avatar wizardofoz123 avatar wonder93 avatar xmmu avatar yizhanglinux avatar zhongchanghui avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.