source: trunk/base/tests/Makefile @ 18777

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

Updated the ChangeLog with the latest change to base/
New test case to test cvs + fetching patches (for bug 5269).

  • Property svn:eol-style set to native
File size: 1.5 KB
Line 
1include ../Mk/dports.autoconf.mk
2
3SUBDIR=checksums-1 cvs-and-patchsites envvariables site-tags trace xcodeversion
4
5.PHONY: test clean
6
7all:
8
9/tmp/darwinports-tests/opt/local/etc/ports/sources.conf: sources.conf
10        @echo setting up test installation
11        rm -rf /tmp/darwinports-tests/
12        mkdir -p /tmp/darwinports-tests/opt/local/etc/ports/
13        mkdir -p /tmp/darwinports-tests/opt/local/share/
14        mkdir -p /tmp/darwinports-tests/opt/local/var/db/dports/receipts/
15        ln -s $(datadir)/darwinports /tmp/darwinports-tests/opt/local/share/
16        cp sources.conf /tmp/darwinports-tests/opt/local/etc/ports/
17
18clean:
19        rm -rf /tmp/darwinports-tests/
20
21$(bindir)/port:
22        @echo "Please install DarwinPorts before running these tests"
23        @exit 1
24       
25test: clean /tmp/darwinports-tests/opt/local/etc/ports/sources.conf
26        @for subdir in $(SUBDIR); do\
27                echo ===\> test ${DIRPRFX}$$subdir; \
28                if [ -e ${DIRPRFX}$$subdir/Makefile ]; then \
29                        ( cd $$subdir && \
30                                $(MAKE) DIRPRFX=${DIRPRFX}$$subdir/ PORTSRC=$(PWD)/test-ports.conf test) || exit 1; \
31                else \
32                        ( cd $$subdir && \
33                                PORTSRC=$(PWD)/test-ports.conf $(bindir)/port clean > /dev/null && \
34                                PORTSRC=$(PWD)/test-ports.conf $(bindir)/port test > output 2>&1 \
35                                        || (cat output; exit 1) && \
36                        sed -e "s|${PWD}|PWD|g" < output > output.sed && \
37                        diff output.sed master 2>&1 | tee difference && \
38                        if [ -s difference ]; then \
39                                exit 1; \
40                        else \
41                                rm -f difference output.sed; \
42                        fi) \
43                fi || exit 1; \
44        done
45        @rm -rf /tmp/darwinports-tests/
46
47install:
48
49distclean: clean
Note: See TracBrowser for help on using the repository browser.