From ef2e21e757c84357da5c23fa7176e4103f08304f Mon Sep 17 00:00:00 2001 From: Eric F Crist Date: Wed, 3 Jan 2018 19:34:45 -0600 Subject: [PATCH] More breakage for automated tests Signed-off-by: Eric F Crist --- .travis.yml | 1 + build/build-dist.sh | 4 ++-- distro/windows/bin/easyrsa-shell-init.sh | 2 ++ op_test.sh | 6 ++++++ 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 op_test.sh diff --git a/.travis.yml b/.travis.yml index e5e77ab..f8cf9a2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,3 +13,4 @@ script: - bash -c 'export SHELLCHECK_OPTS="-e SC2006"; shopt -s globstar; shellcheck **/*.sh easyrsa3/easyrsa' - bash -c 'pwd' - bash -c 'ls -la' + - bash -c 'sh -x op_test.sh' diff --git a/build/build-dist.sh b/build/build-dist.sh index 7867f3e..5bc91e5 100755 --- a/build/build-dist.sh +++ b/build/build-dist.sh @@ -1,5 +1,5 @@ #!/bin/sh -# shellcheck disable= +# shellcheck disable=SC2162 # Easy-RSA 3 distribution packager: # creates ready-to-use tarball files for Unixes and a zip file for windows @@ -91,7 +91,7 @@ stage_win() { for f in $SRC_ROOT/doc/*.md; do - fname=`basename $f .md` + fname=$(basename "$f" .md) python -m markdown "$f" > "$DIST_ROOT/windows/$PV/doc/$fname.html" done diff --git a/distro/windows/bin/easyrsa-shell-init.sh b/distro/windows/bin/easyrsa-shell-init.sh index 76d03b7..82d4dec 100644 --- a/distro/windows/bin/easyrsa-shell-init.sh +++ b/distro/windows/bin/easyrsa-shell-init.sh @@ -1,4 +1,5 @@ #!/bin/sh +# shellcheck disable=SC2161,SC1091 # This script is a frontend designed to create & launch a POSIX shell # environment suitable for use with Easy-RSA. mksh/Win32 is used with this @@ -24,6 +25,7 @@ for f in $extern_list; do echo " files." echo "" echo " Press enter to exit." + #shellcheck disable=SC2162 read exit 1 fi diff --git a/op_test.sh b/op_test.sh new file mode 100644 index 0000000..fa9f5bd --- /dev/null +++ b/op_test.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# Runs some basic operational testing + +cd easyrsa3 || exit 1 +sh -x easyrsa init-pki --batch