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