Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sds
bake
Commits
0c00ccec
Commit
0c00ccec
authored
Dec 11, 2017
by
Shane Snyder
Browse files
cleanup testing scripts
parent
ed95feef
Changes
4
Hide whitespace changes
Inline
Side-by-side
Makefile.am
View file @
0c00ccec
...
...
@@ -14,6 +14,7 @@ MAINTAINERCLEANFILES =
EXTRA_DIST
=
BUILT_SOURCES
=
include_HEADERS
=
include/bake-bulk.h include/bake-bulk-client.h include/bake-bulk-server.h
TESTS_ENVIRONMENT
=
EXTRA_DIST
+=
\
prepare.sh
...
...
configure.ac
View file @
0c00ccec
...
...
@@ -38,6 +38,28 @@ if test "x$PKG_CONFIG" == "x"; then
AC_MSG_ERROR([Could not find pkg-config utility!])
fi
# coreutils checks for OSX
AC_ARG_VAR([TIMEOUT], timeout program)
AC_ARG_VAR([MKTEMP], mktemp program)
if test -z "$TIMEOUT" ; then
AC_CHECK_PROGS(TIMEOUT, [timeout gtimeout])
if test -z "$TIMEOUT" ; then
AC_MSG_ERROR([Could not find timeout command (can optionally provide via the TIMEOUT variable)])
fi
else
AC_SUBST([TIMEOUT], ["$TIMEOUT"])
fi
if test -z "$MKTEMP" ; then
AC_CHECK_PROGS(MKTEMP, [mktemp gmktemp])
if test -z "$MKTEMP" ; then
AC_MSG_ERROR([Could not find mktemp command (can optionally provide via the MKTEMP variable)])
fi
else
AC_SUBST([MKTEMP], ["$MKTEMP"])
fi
PKG_CHECK_MODULES([MARGO],[margo],[],
[AC_MSG_ERROR([Could not find working margo installation!])])
LIBS="$MARGO_LIBS $LIBS"
...
...
tests/Makefile.subdir
View file @
0c00ccec
TESTS_ENVIRONMENT
+=
\
TIMEOUT
=
"
$(TIMEOUT)
"
\
MKTEMP
=
"
$(MKTEMP)
"
TESTS
+=
\
tests/basic.sh
\
tests/copy-to-and-from.sh
...
...
tests/test-util.sh
View file @
0c00ccec
...
...
@@ -2,10 +2,20 @@
# General test script utilities
#
if
[
-z
"
$TIMEOUT
"
]
;
then
echo
expected TIMEOUT variable defined to its respective
command
exit
1
fi
if
[
-z
"
$MKTEMP
"
]
;
then
echo
expected MKTEMP variable defined to its respective
command
exit
1
fi
TMPDIR
=
/dev/shm
export
TMPDIR
mkdir
-p
$TMPDIR
TMPBASE
=
$(
mktemp
--tmpdir
-d
test-XXXXXX
)
TMPBASE
=
$(
${
MKTEMP
}
--tmpdir
-d
test-XXXXXX
)
echo
"tmpbase:
$TMPBASE
"
...
...
@@ -19,7 +29,7 @@ function run_to ()
{
maxtime
=
${
1
}
s
shift
timeout
--signal
=
9
$maxtime
"
$@
"
${
TIMEOUT
}
--signal
=
9
$maxtime
"
$@
"
}
function
test_start_servers
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment