descriptionContinuous build tools and automated tests for HelenOS.
homepage URLhttp://www.helenos.org
repository URLhttps://github.com/HelenOS/ci.git
ownerjakub@jermar.eu
last changeTue, 4 Dec 2018 22:26:32 +0000 (4 23:26 +0100)
last refreshMon, 10 Dec 2018 04:25:19 +0000 (10 05:25 +0100)
content tags
add:
README.md

HelenOS Continuous Integration Testing Scripts

The purpose of this repository is to have a universal script for building and testing (almost) everything related to HelenOS. Currently, the script is able to:

See http://www.helenos.org/wiki/CI for more information. Nightly builds using this tool are pushed to http://ci.helenos.org/.

Note: this tool is not meant to be used for normal development of HelenOS (i.e. the "edit - incrementally compile - test" loop) but rather for pre-merge tests or automated nightly builds.

Running

# Fetch default branches and build everything.
./build.py

# Limit paralellism
./build.py --jobs 3

# Fetch from non-default branches
./build.py --helenos-repository git@github.com:login/helenos.git

Tests

The tests are executed in QEMU and it is possible to type text into console and assert for command output.

See scripts in scenarios/ directory for examples or the test-in-vm.py script to learn about internals.

usage: test-in-vm.py [-h] [--headless] [--scenario FILENAME.yml] --arch
                     ARCHITECTURE [--memory MB] --image FILENAME
                     [--pass OPTION] [--vterm-dump FILENAME.txt]
                     [--last-screenshot FILENAME.png] [--debug]

Testing of HelenOS in VM

optional arguments:
  -h, --help            show this help message and exit
  --headless            Do not show any VM windows.
  --scenario FILENAME.yml
                        Scenario file
  --arch ARCHITECTURE   Emulated architecture identification.
  --memory MB           Amount of memory for the virtual machine.
  --image FILENAME      HelenOS boot image (e.g. ISO file).
  --pass OPTION         Extra options to pass through to the emulator
  --vterm-dump FILENAME.txt
                        Where to store full vterm dump.
  --last-screenshot FILENAME.png
                        Where to store last screenshot.
  --debug               Print debugging messages

Typical invocation will use the following arguments:
  --image helenos.iso
  --scenario scenario.yml
  --arch amd64               # ia32, ppc32 etc.
  --vterm-dump dump.txt      # all text from main vterm
  --last-screenshot shot.png # last VM screen

Simple test running malloc and checking its output looks like this:

meta:
  name: "tester malloc"
  harbours: []

tasks:
  - boot
  - command:
      args: "tester malloc1"
      assert:  "Test passed"
      negassert: "Test failed"

Test checking that we are able to launch GCC (needs special image):

meta:
  name: "gcc --version"
  harbours:
     - gcc

tasks:
  - boot
  - command:
      args: "gcc --version"
      assert:  "GCC"
shortlog
5 days ago Vojtech HorkyFix base FS testmaster
9 days ago jxsvobodaMerge pull request #2 from jxsvoboda/master
9 days ago Jiri SvobodaAdd basic test scenarios for GZX and Sycek
2018-11-20 Vojtech HorkyRefactoring of terminal capture (WiP)
2018-11-20 Vojtech HorkyAdd `gcc hello.c' test scenario
2018-11-19 Vojtech HorkyConfigure Travis
2018-11-19 Vojtech HorkyAdd requirements.txt for pip
2018-11-19 Vojtech HorkyStart work on unit tests of CI
2018-11-16 Vojtech HorkyWorkaround for temp files reuse
2018-11-16 Vojtech HorkyTest in MSIM: hide files on failed launch
2018-11-15 Vojtech HorkyRemove old files first
2018-11-14 Vojtech HorkyCI: run tests in MSIM too
2018-11-14 Vojtech Horkytest-in-vm: basic support for MSIM (mips32)
2018-11-14 Vojtech HorkyWorkaround in failing PCC scenario
2018-11-14 Vojtech Horkytest-in-vm: add --disk option
2018-11-14 Vojtech Horkytest-in-vm: better farewell message
...
heads
5 days ago master