tst.libdepsepdir.ksh revision 237834
1237834Smm# 2237834Smm# CDDL HEADER START 3237834Smm# 4237834Smm# The contents of this file are subject to the terms of the 5237834Smm# Common Development and Distribution License (the "License"). 6237834Smm# You may not use this file except in compliance with the License. 7237834Smm# 8237834Smm# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9237834Smm# or http://www.opensolaris.org/os/licensing. 10237834Smm# See the License for the specific language governing permissions 11237834Smm# and limitations under the License. 12237834Smm# 13237834Smm# When distributing Covered Code, include this CDDL HEADER in each 14237834Smm# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15237834Smm# If applicable, add the following below this CDDL HEADER, with the 16237834Smm# fields enclosed by brackets "[]" replaced with your own identifying 17237834Smm# information: Portions Copyright [yyyy] [name of copyright owner] 18237834Smm# 19237834Smm# CDDL HEADER END 20237834Smm# 21237834Smm 22237834Smm# 23237834Smm# Copyright (c) 2011, Joyent Inc. All rights reserved. 24237834Smm# Use is subject to license terms. 25237834Smm# 26237834Smm 27237834Smm# 28237834Smm# Test to catch that we properly look for libraries dependencies in 29237834Smm# our full library parth 30237834Smm# 31237834Smm 32237834Smmif [ $# != 1 ]; then 33237834Smm echo expected one argument: '<'dtrace-path'>' 34237834Smm exit 2 35237834Smmfi 36237834Smm 37237834Smmlibdira=${TMPDIR:-/tmp}/libdepa.$$ 38237834Smmlibdirb=${TMPDIR:-/tmp}/libdepb.$$ 39237834Smmlibdirc=${TMPDIR:-/tmp}/libdepc.$$ 40237834Smmdtrace=$1 41237834Smm 42237834Smmsetup_libs() 43237834Smm{ 44237834Smm mkdir $libdira 45237834Smm mkdir $libdirb 46237834Smm mkdir $libdirc 47237834Smm cat > $libdira/liba.$$.d <<EOF 48237834Smm#pragma D depends_on library libb.$$.d 49237834Smm#pragma D depends_on library libc.$$.d 50237834Smm#pragma D depends_on library libd.$$.d 51237834SmmEOF 52237834Smm cat > $libdirb/libb.$$.d <<EOF 53237834Smm#pragma D depends_on library libc.$$.d 54237834SmmEOF 55237834Smm cat > $libdirb/libc.$$.d <<EOF 56237834SmmEOF 57237834Smm cat > $libdirb/libd.$$.d <<EOF 58237834SmmEOF 59237834Smm cat > $libdirc/libe.$$.d <<EOF 60237834Smm#pragma D depends_on library liba.$$.d 61237834SmmEOF 62237834Smm cat > $libdirc/libf.$$.d <<EOF 63237834SmmEOF 64237834Smm} 65237834Smm 66237834Smm 67237834Smmsetup_libs 68237834Smm 69237834Smm$dtrace -L$libdira -L$libdirb -L$libdirc -e 70237834Smm 71237834Smmstatus=$? 72237834Smmrm -rf $libdira 73237834Smmrm -rf $libdirb 74237834Smmrm -rf $libdirc 75237834Smmreturn $status 76237834Smm 77