File: test-wrapper.sh

package info (click to toggle)
xnee 3.19-9.4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 34,432 kB
  • sloc: ansic: 23,555; sh: 13,521; makefile: 600
file content (31 lines) | stat: -rwxr-xr-x 525 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh

test_program()
{
    if [ ! -x $1 ]
    then
	echo "Program $1 does not exists, or is not executable"
	return 1
    fi

    xdpyinfo >/dev/null 2>&1 
    if [ "$?" != "0" ]
    then
	echo "Problem with X server (prob authorisation, or no X up and running)"
	echo "   when executing program $1"
	echo "   .... bailing out"
	return 1
    fi
    
    $1
}

if [ ! -f ./.libs/libtestcb.so ]
then
    cp ./.libs/libtestcb_la-callback_so.o ./.libs/libtestcb.so
fi
export LD_LIBRARY_PATH=./.libs

test_program $1
exit 0