1*7d1ffc32SGordon Ross#!/bin/sh
2*7d1ffc32SGordon Ross
3*7d1ffc32SGordon Ross#
4*7d1ffc32SGordon Ross# This file and its contents are supplied under the terms of the
5*7d1ffc32SGordon Ross# Common Development and Distribution License ("CDDL"), version 1.0.
6*7d1ffc32SGordon Ross# You may only use this file in accordance with the terms of version
7*7d1ffc32SGordon Ross# 1.0 of the CDDL.
8*7d1ffc32SGordon Ross#
9*7d1ffc32SGordon Ross# A full copy of the text of the CDDL should have accompanied this
10*7d1ffc32SGordon Ross# source.  A copy of the CDDL is also available via the Internet at
11*7d1ffc32SGordon Ross# http://www.illumos.org/license/CDDL.
12*7d1ffc32SGordon Ross#
13*7d1ffc32SGordon Ross
14*7d1ffc32SGordon Ross#
15*7d1ffc32SGordon Ross# Copyright 2018 Nexenta Systems, Inc.  All rights reserved.
16*7d1ffc32SGordon Ross#
17*7d1ffc32SGordon Ross
18*7d1ffc32SGordon Ross# Helper program to run test-msgbuf (unit test program)
19*7d1ffc32SGordon Ross# using binaries from the proto area.
20*7d1ffc32SGordon Ross
21*7d1ffc32SGordon Ross[ -n "$CODEMGR_WS" ] || {
22*7d1ffc32SGordon Ross  echo "Need a buildenv to set CODEMGR_WS=..."
23*7d1ffc32SGordon Ross  exit 1;
24*7d1ffc32SGordon Ross}
25*7d1ffc32SGordon Ross
26*7d1ffc32SGordon RossROOT=${CODEMGR_WS}/proto/root_i386
27*7d1ffc32SGordon RossLD_LIBRARY_PATH=$ROOT/usr/lib/smbsrv:$ROOT/usr/lib:$ROOT/lib
28*7d1ffc32SGordon Rossexport LD_LIBRARY_PATH
29*7d1ffc32SGordon Rossexport UMEM_DEBUG=default
30*7d1ffc32SGordon Ross
31*7d1ffc32SGordon Ross# run with the passed options
32*7d1ffc32SGordon Rossexec $ROOT/usr/lib/smbsrv/test-msgbuf "$@"
33