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