1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
# Copyright (C) Dmitry Volyntsev
# Copyright (C) NGINX, Inc.
njs_found=no
printf "checking for expect ..."
if /bin/sh -c "(expect -v)" >> $NJS_AUTOCONF_ERR 2>&1; then
njs_found=yes
fi
if [ $njs_found = yes ]; then
echo " found"
echo " + Expect version: `expect -v`"
else
echo " not found"
fi
if [ $njs_found = yes -a $NJS_HAVE_READLINE = YES ]; then
cat << END >> $NJS_MAKEFILE
shell_test_njs: njs test/shell_test.exp
PATH="$NJS_BUILD_DIR:\$(PATH)" LANG=C.UTF-8 TERM=screen \
expect -f test/shell_test.exp
PATH="$NJS_BUILD_DIR:\$(PATH)" LANG=C.UTF-8 TERM=screen \
expect -f test/shell_test_njs.exp
END
if [ $NJS_HAVE_QUICKJS = YES ]; then
cat << END >> $NJS_MAKEFILE
shell_test: shell_test_njs shell_test_quickjs
shell_test_quickjs: njs test/shell_test.exp
PATH="$NJS_BUILD_DIR:\$(PATH)" LANG=C.UTF-8 TERM=screen NJS_ENGINE=QuickJS \
expect -f test/shell_test.exp
END
else
cat << END >> $NJS_MAKEFILE
shell_test: shell_test_njs
END
fi
else
echo " - expect tests are disabled"
cat << END >> $NJS_MAKEFILE
shell_test:
@echo "Skipping expect tests"
END
fi
|