xref: /illumos-gate/usr/src/test/os-tests/doc/README (revision bbf215553c7233fbab8a0afdf1fac74c44781867)
1d583b39bSJohn Wren Kennedy#
2d583b39bSJohn Wren Kennedy# This file and its contents are supplied under the terms of the
3d583b39bSJohn Wren Kennedy# Common Development and Distribution License ("CDDL"), version 1.0.
4d583b39bSJohn Wren Kennedy# You may only use this file in accordance with the terms of version
5d583b39bSJohn Wren Kennedy# 1.0 of the CDDL.
6d583b39bSJohn Wren Kennedy#
7d583b39bSJohn Wren Kennedy# A full copy of the text of the CDDL should have accompanied this
8d583b39bSJohn Wren Kennedy# source.  A copy of the CDDL is also available via the Internet at
9d583b39bSJohn Wren Kennedy# http://www.illumos.org/license/CDDL.
10d583b39bSJohn Wren Kennedy#
11d583b39bSJohn Wren Kennedy
12d583b39bSJohn Wren Kennedy#
13d583b39bSJohn Wren Kennedy# Copyright (c) 2012 by Delphix. All rights reserved.
14d583b39bSJohn Wren Kennedy#
15d583b39bSJohn Wren Kennedy
16d583b39bSJohn Wren KennedyOS Unit Test Suite README
17d583b39bSJohn Wren Kennedy
18d583b39bSJohn Wren Kennedy1. Building and installing the OS Unit Test Suite
19d583b39bSJohn Wren Kennedy2. Running the OS Unit Test Suite
20d583b39bSJohn Wren Kennedy3. Test results
21d583b39bSJohn Wren Kennedy
22d583b39bSJohn Wren Kennedy--------------------------------------------------------------------------------
23d583b39bSJohn Wren Kennedy
24d583b39bSJohn Wren Kennedy1. Building and installing the OS Unit Test Suite
25d583b39bSJohn Wren Kennedy
26d583b39bSJohn Wren KennedyThe OS Unit Test Suite runs under the testrunner framework (which can be
27d583b39bSJohn Wren Kennedyinstalled as pkg:/system/test/testrunner). To build both the OS Unit Test Suite
28d583b39bSJohn Wren Kennedyand the testrunner without running a full nightly:
29d583b39bSJohn Wren Kennedy
30d583b39bSJohn Wren Kennedy	build_machine$ bldenv [-d] <your_env_file>
31d583b39bSJohn Wren Kennedy	build_machine$ cd $SRC/test
32d583b39bSJohn Wren Kennedy	build_machine$ dmake install
33d583b39bSJohn Wren Kennedy	build_machine$ cd $SRC/pkg
34d583b39bSJohn Wren Kennedy	build_machine$ dmake install
35d583b39bSJohn Wren Kennedy
36d583b39bSJohn Wren KennedyThen set the publisher on the test machine to point to your repository and
37d583b39bSJohn Wren Kennedyinstall the OS Unit Test Suite.
38d583b39bSJohn Wren Kennedy
39a800027aSMarcel Telka	test_machine# pkg install pkg:/system/test/ostest
40d583b39bSJohn Wren Kennedy
41d583b39bSJohn Wren KennedyNote, the framework will be installed automatically, as the OS Unit Test Suite
42d583b39bSJohn Wren Kennedydepends on it.
43d583b39bSJohn Wren Kennedy
44d583b39bSJohn Wren Kennedy2. Running the OS Unit Test Suite
45d583b39bSJohn Wren Kennedy
46d583b39bSJohn Wren KennedyThe pre-requisites for running the OS Unit Test Suite are:
47*bbf21555SRichard Lowe	- A non-root user with the ability to sudo(8) to root without a
48d583b39bSJohn Wren Kennedy	  password or the root user must run the test.
49d583b39bSJohn Wren Kennedy
50d583b39bSJohn Wren KennedyOnce the pre-requisites are satisfied, simply run the ostest script:
51d583b39bSJohn Wren Kennedy
52d583b39bSJohn Wren Kennedy	test_machine$ /opt/os-tests/bin/ostest
53d583b39bSJohn Wren Kennedy
54d583b39bSJohn Wren Kennedy3. Test results
55d583b39bSJohn Wren Kennedy
56d583b39bSJohn Wren KennedyWhile the OS Unit Test Suite is running, one informational line is printed at
57d583b39bSJohn Wren Kennedythe end of each test, and a results summary is printed at the end of the run.
58d583b39bSJohn Wren KennedyThe results summary includes the location of the complete logs, which is of the
59d583b39bSJohn Wren Kennedyform /var/tmp/test_results/<ISO 8601 date>.
60