source: trunk/base/tests/trace/Makefile @ 18988

Last change on this file since 18988 was 18988, checked in by pguyot (Paul Guyot), 14 years ago

-t now forbids renaming files/dirs and deleting directories outside the sandbox.

  • Property svn:eol-style set to native
File size: 747 bytes
Line 
1include ../../Mk/dports.autoconf.mk
2
3.PHONY: test
4
5$(bindir)/port:
6        @echo "Please install DarwinPorts before running this test"
7        @exit 1
8       
9test:
10        @PORTSRC=$(PORTSRC) $(bindir)/port clean > /dev/null
11        @touch delete-trace
12        @touch rename-trace
13        @mkdir rmdir-trace
14        @rm -f create-trace
15        @rm -rf mkdir-trace
16        @rm -f /tmp/hello-trace
17        @PORTSRC=$(PORTSRC) $(bindir)/port -t test > output 2>&1 || (cat output; exit 1)
18        @rm -f delete-trace
19        @rm -f rename-trace
20        @rm -f rename-new-trace
21        @rm -f create-trace
22        @rm -rf mkdir-trace
23        @rm -rf rmdir-trace
24        @rm -f /tmp/hello-trace
25        @sed -e "s|${PWD}|PWD|g" < output > output.sed
26        @diff output.sed master 2>&1 | tee difference
27        @if [ -s difference ]; then \
28                exit 1; \
29        else \
30                rm -f difference output.sed; \
31        fi
Note: See TracBrowser for help on using the repository browser.