xref: /titanic_41/usr/src/test/util-tests/doc/README (revision c037192b037119c9fd354732fc29b38ce097d356)
1*c037192bSGarrett D'Amore#
2*c037192bSGarrett D'Amore# This file and its contents are supplied under the terms of the
3*c037192bSGarrett D'Amore# Common Development and Distribution License ("CDDL"), version 1.0.
4*c037192bSGarrett D'Amore# You may only use this file in accordance with the terms of version
5*c037192bSGarrett D'Amore# 1.0 of the CDDL.
6*c037192bSGarrett D'Amore#
7*c037192bSGarrett D'Amore# A full copy of the text of the CDDL should have accompanied this
8*c037192bSGarrett D'Amore# source.  A copy of the CDDL is also available via the Internet at
9*c037192bSGarrett D'Amore# http://www.illumos.org/license/CDDL.
10*c037192bSGarrett D'Amore#
11*c037192bSGarrett D'Amore
12*c037192bSGarrett D'Amore#
13*c037192bSGarrett D'Amore# Copyright 2014 Garrett D'Amore <garrett@damore.org>
14*c037192bSGarrett D'Amore# Copyright (c) 2012 by Delphix. All rights reserved.
15*c037192bSGarrett D'Amore#
16*c037192bSGarrett D'Amore
17*c037192bSGarrett D'AmoreUtils Unit Test Suite README
18*c037192bSGarrett D'Amore
19*c037192bSGarrett D'Amore1. What the Utils Unit Test Suite tests
20*c037192bSGarrett D'Amore2. Building and installing the Utils Unit Test Suite
21*c037192bSGarrett D'Amore3. Running the Utils Unit Test Suite
22*c037192bSGarrett D'Amore4. Test results
23*c037192bSGarrett D'Amore
24*c037192bSGarrett D'Amore--------------------------------------------------------------------------------
25*c037192bSGarrett D'Amore
26*c037192bSGarrett D'Amore1. What the Utils Unit Test Suite tests
27*c037192bSGarrett D'Amore
28*c037192bSGarrett D'AmoreThe Utils unit test suite is for testing standard shell / POSIX utilities.
29*c037192bSGarrett D'AmoreFor example utilities such as "printf" are tested.
30*c037192bSGarrett D'Amore
31*c037192bSGarrett D'Amore2. Building and installing the Utils Unit Test Suite
32*c037192bSGarrett D'Amore
33*c037192bSGarrett D'AmoreThe Utils Unit Test Suite runs under the testrunner framework (which can be
34*c037192bSGarrett D'Amoreinstalled as pkg:/system/test/testrunner). To build both the Utils Unit Test
35*c037192bSGarrett D'AmoreSuite and the testrunner without running a full nightly:
36*c037192bSGarrett D'Amore
37*c037192bSGarrett D'Amore	build_machine$ bldenv [-d] <your_env_file>
38*c037192bSGarrett D'Amore	build_machine$ cd $SRC/test
39*c037192bSGarrett D'Amore	build_machine$ dmake install
40*c037192bSGarrett D'Amore	build_machine$ cd $SRC/pkg
41*c037192bSGarrett D'Amore	build_machine$ dmake install
42*c037192bSGarrett D'Amore
43*c037192bSGarrett D'AmoreThen set the publisher on the test machine to point to your repository and
44*c037192bSGarrett D'Amoreinstall the Utils Unit Test Suite.
45*c037192bSGarrett D'Amore
46*c037192bSGarrett D'Amore	test_machine# pkg install pkg:/system/test/utiltest
47*c037192bSGarrett D'Amore
48*c037192bSGarrett D'AmoreNote, the framework will be installed automatically, as the Utils Unit Test
49*c037192bSGarrett D'AmoreSuite depends on it.
50*c037192bSGarrett D'Amore
51*c037192bSGarrett D'Amore3. Running the Utils Unit Test Suite
52*c037192bSGarrett D'Amore
53*c037192bSGarrett D'AmoreThe pre-requisites for running the OS Unit Test Suite are:
54*c037192bSGarrett D'Amore	- Any user may perform these tests.
55*c037192bSGarrett D'Amore
56*c037192bSGarrett D'AmoreOnce the pre-requisites are satisfied, simply run the ostest script:
57*c037192bSGarrett D'Amore
58*c037192bSGarrett D'Amore	test_machine$ /opt/util-tests/bin/utiltest
59*c037192bSGarrett D'Amore
60*c037192bSGarrett D'Amore4. Test results
61*c037192bSGarrett D'Amore
62*c037192bSGarrett D'AmoreWhile the OS Unit Test Suite is running, one informational line is printed at
63*c037192bSGarrett D'Amorethe end of each test, and a results summary is printed at the end of the run.
64*c037192bSGarrett D'AmoreThe results summary includes the location of the complete logs, which is of the
65*c037192bSGarrett D'Amoreform /var/tmp/test_results/<ISO 8601 date>.
66