Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
UCC
OpenDispense2
Commits
0fb8990b
Commit
0fb8990b
authored
Sep 19, 2021
by
John Hodge
Browse files
Gitlab CI - Fix tests (using `nc`)
parent
654d09f8
Pipeline
#383
failed with stages
in 46 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
0fb8990b
...
...
@@ -9,14 +9,14 @@ build:
# instead of calling g++ directly you can also use some build toolkit like make
# install the necessary build tools when needed
before_script
:
-
apt update && apt -y install libncurses-dev libmodbus-dev libsqlite3-dev libident-dev
-
apt update && apt -y install libncurses-dev libmodbus-dev libsqlite3-dev libident-dev
netcat
script
:
-
make -C src/
artifacts
:
paths
:
-
dispense
-
cokebank_sqlite.so
-
dispsr
c
-
dispsr
v
# depending on your build setup it's most likely a good idea to cache outputs to reduce the build time
# cache:
# paths:
...
...
tests/_common.sh
View file @
0fb8990b
...
...
@@ -46,10 +46,15 @@ server_pid=$!
cleanup
()
{
LOG
"Killing
${
server_pid
}
"
kill
${
server_pid
}
kill
${
server_pid
}
;
true
}
trap
cleanup EXIT
LOG
"Server running on PID
${
server_pid
}
"
sleep
1
echo
""
| nc localhost
${
PORT
}
# - Make sure that the server started
if
!
(
echo
""
| nc localhost
${
PORT
}
)
;
then
LOG
"Server not responding on
${
PORT
}
"
LOG
"Server log contents:"
cat
${
BASEDIR
}
server.log
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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