-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest
More file actions
44 lines (36 loc) · 630 Bytes
/
Copy pathtest
File metadata and controls
44 lines (36 loc) · 630 Bytes
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
32
33
34
35
36
37
38
39
40
41
42
43
44
#! /bin/sh
here=`pwd`
if test $? -ne 0; then exit 2; fi
tmp=/tmp/$$$$
mkdir $$tmp
if test $? -ne 0; then exit 2; fi
cd $$tmp
if test $? -ne 0; then exit 2; fi
fail()
{
echo "FAILED" 1>&2
cd $$here
chmod -R u+w $$tmp
rm -rf $$tmp
exit 1
}
pass()
{
echo "PASSED" 1>&2
cd $$here
chmod -R u+w $$tmp
rm -rf $$tmp
exit 0
}
trap "fail" 1 2 3 15
# execute test here. PWD is temporary, refer to classdesc home directory
# with $$here
if [ -n "$$AEGIS_ARCH" ]; then
BL=`aegis -cd -bl`
BL1=$$BL/../../baseline
else #standalone test
BL=.
BL1=.
fi
if test $$? -ne 0; then fail; fi
pass