598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore# This file and its contents are supplied under the terms of the
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore# Common Development and Distribution License ("CDDL"), version 1.0.
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore# You may only use this file in accordance with the terms of version
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore# 1.0 of the CDDL.
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore# A full copy of the text of the CDDL should have accompanied this
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore# source. A copy of the CDDL is also available via the Internet at
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore# Copyright 2014 Garrett D'Amore <garrett@damore.org>
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore# Copyright (c) 2012 by Delphix. All rights reserved.
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'AmoreUtils Unit Test Suite README
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore1. What the Utils Unit Test Suite tests
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore2. Building and installing the Utils Unit Test Suite
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore3. Running the Utils Unit Test Suite
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore4. Test results
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore--------------------------------------------------------------------------------
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore1. What the Utils Unit Test Suite tests
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'AmoreThe Utils unit test suite is for testing standard shell / POSIX utilities.
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'AmoreFor example utilities such as "printf" are tested.
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore2. Building and installing the Utils Unit Test Suite
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'AmoreThe Utils Unit Test Suite runs under the testrunner framework (which can be
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoreinstalled as pkg:/system/test/testrunner). To build both the Utils Unit Test
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'AmoreSuite and the testrunner without running a full nightly:
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore build_machine$ bldenv [-d] <your_env_file>
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore build_machine$ cd $SRC/test
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore build_machine$ dmake install
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore build_machine$ cd $SRC/pkg
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore build_machine$ dmake install
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'AmoreThen set the publisher on the test machine to point to your repository and
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoreinstall the Utils Unit Test Suite.
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore test_machine# pkg install pkg:/system/test/utiltest
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'AmoreNote, the framework will be installed automatically, as the Utils Unit Test
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'AmoreSuite depends on it.
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore3. Running the Utils Unit Test Suite
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'AmoreThe pre-requisites for running the OS Unit Test Suite are:
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore - Any user may perform these tests.
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'AmoreOnce the pre-requisites are satisfied, simply run the ostest script:
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amore4. Test results
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'AmoreWhile the OS Unit Test Suite is running, one informational line is printed at
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amorethe end of each test, and a results summary is printed at the end of the run.
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'AmoreThe results summary includes the location of the complete logs, which is of the
598f4ceed9327d2d6c2325dd67cae3aa06f7fea6Garrett D'Amoreform /var/tmp/test_results/<ISO 8601 date>.