GithubHelp home page GithubHelp logo

sntree / sel4test Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sel4/sel4test

0.0 2.0 0.0 1.04 MB

Test suite for seL4.

Home Page: http://sel4.systems

License: Other

CMake 1.61% C 93.27% Shell 0.43% Python 2.02% Perl 1.10% C++ 1.41% Assembly 0.17%

sel4test's Introduction

sel4test

Library for creating and running tests for seL4.

Usage

Small unit tests can be defined anywhere, such as libraries outside of sel4test or in sel4test-driver. Larger tests that do things like creating processes need to be declared inside sel4test-tests.

Unit tests

To define a small unit test in a library outside of sel4test or in sel4test-driver:

  1. Declare libsel4test as a dependency for your library and include <sel4test/test.h>. You may also find the functions in <sel4test/testutil.h> handy.
  2. Write your tests. Then, for each test you want to run, call one of the macros that define a test, such as the DEFINE_TEST macro. They are declared here.
  3. Add your library as dependency to libsel4testsupport. Add a call to any function in your test file to testreporter.c in dummy_func(). If you have multiple test files, then you need to call one function for each test file.

For an example, take a look at libsel4serialserver/src/test.c in sel4_libs.

Assumptions

Currently unit tests are assumed to be running sequentially, standalone (i.e. not multi-threaded). Some tests rely on being the highest priority running thread in the system.

Other tests

To define a larger test in sel4test-tests:

  1. Place your test in apps/sel4test-tests/src/tests.
  2. Include <../helpers.h>.
  3. Write your tests. Then, for each test you want to run, call one of the macros that define a test, such as the DEFINE_TEST macro. They are declared here.

For an example, take a look at trivial.c in sel4test.

License

The files in this repository are release under standard open source licenses. Please see individual file headers and the LICENSE_BSD2.txt file for details.

sel4test's People

Contributors

pingerino avatar adriandanis avatar kent-mcleod avatar latentprion avatar yyshen avatar amrzar avatar xurtis avatar jdub avatar gridbugs avatar tperami avatar natestuder avatar chrisguikema avatar gnustomp avatar mbrcknl avatar furao avatar wellmcgarnicle avatar lsf37 avatar whalefur avatar mokshasoft avatar timnewsham avatar newsham avatar

Watchers

James Cloos avatar sn 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.