37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow#!/bin/ksh
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow#
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow# This file and its contents are supplied under the terms of the
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow# Common Development and Distribution License ("CDDL"), version 1.0.
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow# You may only use this file in accordance with the terms of version
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow# 1.0 of the CDDL.
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow#
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow# A full copy of the text of the CDDL should have accompanied this
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow# source. A copy of the CDDL is also available via the Internet at
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow# http://www.illumos.org/license/CDDL.
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow#
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow#
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow# Copyright (c) 2014, Joyent, Inc.
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow#
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulowfunction complete {
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow if [[ "${PRINT_OUTPUT}" ]]; then
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow printf "%s\n" "${OUTPUT}"
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow exit 0
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow elif [[ "${OUTPUT}" == "${BASELINE}" ]]; then
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow printf "TEST PASS: %s\n" "$(basename $0)"
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow exit 0
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow else
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow printf "TEST FAIL: %s\n" "$(basename $0)"
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow printf "EXPECTED: %s\n" "${BASELINE}"
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow printf "ACTUAL: %s\n" "${OUTPUT}"
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow exit 1
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow fi
37c79205ad46187f54b2edbf6a468160935f14d9Joshua M. Clulow}