#!/bin/sh

# Use user-writable directories
export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/tmp}
export FE_TEST=1

SOCKET=${XDG_RUNTIME_DIR}/xapi/forker/main

../src/fe_main.exe &
MAIN=$!
cleanup () {
    kill $MAIN
}
trap cleanup EXIT
for _ in $(seq 1 10); do
    test -S ${SOCKET} || sleep 1
done
./fe_test.exe 16

#!/bin/sh

# Use user-writable directories
export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/tmp}
export FE_TEST=1

SOCKET=${XDG_RUNTIME_DIR}/xapi/forker/main

../src/fe_main.exe &
MAIN=$!
cleanup () {
    kill $MAIN
}
trap cleanup EXIT
for _ in $(seq 1 10); do
    test -S ${SOCKET} || sleep 1
done
echo "" | ./fe_test.exe 16

Make test compatible with dune 2.7+
CP-34942: Make test compatible with dune 2.7+

Newer versions of dune force a null stdin in the tests, which breaks
them. Pipe the output of echo to force the test binary use anything
other than /dev/null for stdin.

Signed-off-by: Pau Ruiz Safont <9c4aad32b049b39a74875643d7fe76c19fd4f9a1@citrix.com>
