On 06/21/2018 04:13 AM, Willy Tarreau wrote:
On Wed, Jun 20, 2018 at 04:39:36PM -0400, Daniel Corbett wrote:
Hello,


On 06/20/2018 03:34 PM, ???? ??????? wrote:
hi


[ilia@localhost haproxy]$ HAPROXY_PROGRAM=./haproxy varnishtest
reg-tests/ssl/h00000.vtc
**** top   0.0 extmacro def pwd=/home/ilia/xxx/haproxy
**** top   0.0 extmacro def localhost=127.0.0.1
**** top   0.0 extmacro def bad_backend=127.0.0.1 36769
**** top   0.0 extmacro def bad_ip=192.0.2.255
**** top   0.0 macro def tmpdir=/tmp/vtc.31222.33cfe809
*    top   0.0 TEST reg-tests/ssl/h00000.vtc starting
**   top   0.0 === varnishtest "OpenSSL bug: Random crashes"
*    top   0.0 TEST OpenSSL bug: Random crashes
**   top   0.0 === feature ignore_unknown_macro
**   top   0.0 === haproxy h1 -conf {
---- top   0.0 Unknown command: "haproxy"
*    top   0.0 RESETTING after reg-tests/ssl/h00000.vtc
*    top   0.0 TEST reg-tests/ssl/h00000.vtc FAILED
#    top  TEST reg-tests/ssl/h00000.vtc FAILED (0.001) exit=2
[ilia@localhost haproxy]$

Something like this should work:

$ HAPROXY_PROGRAM=$PWD/haproxy varnishtest reg-tests/ssl/h00000.vtc
#    top  TEST reg-tests/ssl/h00000.vtc passed (0.147)

This just makes me think that we should probably also set HAPROXY_PROGRAM
in the "reg-tests" target in the makefile to point to the current haproxy
executable, about like the below. Fred, what do you think ?

  reg-tests:
        ...
+       @export HAPROXY_PROGRAM=$${HAPROXY_PROGRAM:-$$PWD/haproxy}; \
        @find reg-tests ...

As ${parameter:-word} expansion is Posix, I agree ;).
Same thing for PWD shell variable.

Fred


Reply via email to