summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/asr/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/regress/lib/libc/asr/Makefile')
-rw-r--r--src/regress/lib/libc/asr/Makefile59
1 files changed, 29 insertions, 30 deletions
diff --git a/src/regress/lib/libc/asr/Makefile b/src/regress/lib/libc/asr/Makefile
index 76891ec176..12e59536e0 100644
--- a/src/regress/lib/libc/asr/Makefile
+++ b/src/regress/lib/libc/asr/Makefile
@@ -1,53 +1,52 @@
1# $OpenBSD: Makefile,v 1.3 2013/04/01 10:18:28 eric Exp $ 1# $OpenBSD: Makefile,v 1.4 2017/03/10 17:23:48 eric Exp $
2 2
3# 3#
4# Note on building and running the regress tests: 4# Notes on building and running the regression tests
5# 5#
6# The regress suite builds two sets of static executables: one linked 6# The regress suite builds two sets of static executables: the former linked
7# against the current libc, and one linked against a libc with the resolver 7# against the system libc, and the latter against the libc found in /usr/obj
8# replaced. The idea is to compare the output of all programs in both cases. 8# The idea is to compare the output of all programs with internal changes in
9# the libc (more specifically the resolver). They will be run in a chrooted
10# environment to test various /etc configurations without touching the local
11# machine config files.
9# 12#
10# So before building the regression test programs, you need to have two 13# First, build a libc that needs testing, then:
11# static libc: the system libc.a in /usr/lib/ which is assumed to be built
12# with asr, and a pre-asr libc.a in the "./lib/" directory (you can build
13# one by commenting out the ".include "${LIBCSRCDIR}/asr/Makefile.inc"
14# line from the /usr/src/lib/libc/Makefile.in and rebuild the libc).
15#
16# When done, run "make && make install". This builds and installs the two sets
17# of programs in REGRESSDIR. They will run chrooted there to allow testing with
18# various /etc environment without messing up the local machine config files.
19# 14#
20# When you are sure everything is in place, run "make regress". This will 15# $ make
21# create two files: $REGRESSDIR/output.log with the output of all tests, 16# $ doas make install
22# and $REGRESSDIR/regress.log with the diffs for those that "failed". 17# $ doas make regress
23# 18#
24# Note that the "install" and "regress" targets need to be run as root. 19# Tests output goes into a $REGRESSDIR/tmp.XXXXXXXXXX directory, and a digest
20# is displayed at the end.
25# 21#
26 22
27LIBCDIRSTD?= ${.CURDIR}/lib 23REGRESSDIR?= /tmp/regress-asr
28LIBCDIRASR?= /usr/lib
29
30REGRESSDIR?= /tmp/regress
31REGRESS?= regress.sh 24REGRESS?= regress.sh
32 25
26A?= .a
27B?= .b
28
29DIRA?= /usr/lib
30DIRB?= /usr/obj/lib/libc
31
32
33all: build 33all: build
34 34
35build: 35build:
36 cd bin && EXT=.asr LDFLAGS=-L${LIBCDIRASR} make 36 cd bin && EXT=${A} LDFLAGS=-L${DIRA} make
37 cd bin && EXT=.std LDFLAGS=-L${LIBCDIRSTD} make 37 cd bin && EXT=${B} LDFLAGS=-L${DIRB} make
38 38
39clean: 39clean:
40 cd bin && EXT=.std make clean 40 cd bin && EXT=${A} make clean
41 cd bin && EXT=.asr make clean 41 cd bin && EXT=${B} make clean
42 42
43install: 43install:
44 mkdir -p ${REGRESSDIR}/etc
45 mkdir -p ${REGRESSDIR}/bin 44 mkdir -p ${REGRESSDIR}/bin
46 cd bin && BINDIR=${REGRESSDIR}/bin EXT=.std make install 45 cd bin && BINDIR=${REGRESSDIR}/bin EXT=${A} make install
47 cd bin && BINDIR=${REGRESSDIR}/bin EXT=.asr make install 46 cd bin && BINDIR=${REGRESSDIR}/bin EXT=${B} make install
48 47
49uninstall: 48uninstall:
50 rm -rf ${REGRESSDIR} 49 rm -rf ${REGRESSDIR}
51 50
52regress: 51regress:
53 RUNDIR=${REGRESSDIR} sh ${.CURDIR}/${REGRESS} 52 RUNDIR=${REGRESSDIR} A=${A} B=${B} sh ${.CURDIR}/${REGRESS}