Skip to content

Commit

Permalink
example/Makefile: always run both tests plain before comparing outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
robohack committed Mar 25, 2024
1 parent 0e2940a commit 1eb95ea
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions example/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,22 @@ INTERNALPROG = # defined
realinstall:
proginstall:

E1 = ${.OBJDIR}/${PROG} < ${.CURDIR}/sample.config
T1 = [ $$(expr "$$(${.OBJDIR}/${PROG} < ${.CURDIR}/sample.config 2>&1)" : "Logging/timeFormat: utc.memory leaks:.0") -eq 39 ]
E2 = echo '{broken:' | ${.OBJDIR}/${PROG}
T2 = [ $$(expr "$$(echo '{broken:' | ${.OBJDIR}/${PROG} 2>&1)" : "tree_parse_error: lexical error: invalid char in json text.*memory leaks:.0") -eq 165 ]

regress:
.if defined(USE_ASAN)
if [ -x /usr/sbin/paxctl ]; then /usr/sbin/paxctl +a ${.OBJDIR}/${PROG}; fi
ulimit -v unlimited && ${.OBJDIR}/${PROG} < ${.CURDIR}/sample.config
ulimit -v unlimited && ${E1}
ulimit -v unlimited && ${T1}
ulimit -v unlimited && ${E2}
ulimit -v unlimited && ${T2}
.else
${.OBJDIR}/${PROG} < ${.CURDIR}/sample.config
${E1}
${T1}
${E2}
${T2}
.endif

Expand Down

0 comments on commit 1eb95ea

Please sign in to comment.