aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-03-15 14:45:07 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-03-15 14:45:07 +0300
commit53b6e3b712ec677f68a1f5764f7ab3ca475652d7 (patch)
treec35b65177c8678097d2141019769d9f3cff18cf9
parentupdate cmake-common (diff)
downloadmath-server-53b6e3b712ec677f68a1f5764f7ab3ca475652d7.tar.gz
math-server-53b6e3b712ec677f68a1f5764f7ab3ca475652d7.zip
Travis: run stress_test.py
-rw-r--r--.ci/.gitattributes1
-rwxr-xr-x.ci/stress_test.sh24
-rw-r--r--.travis.yml1
3 files changed, 26 insertions, 0 deletions
diff --git a/.ci/.gitattributes b/.ci/.gitattributes
new file mode 100644
index 0000000..dfdb8b7
--- /dev/null
+++ b/.ci/.gitattributes
@@ -0,0 +1 @@
+*.sh text eol=lf
diff --git a/.ci/stress_test.sh b/.ci/stress_test.sh
new file mode 100755
index 0000000..e3c9c40
--- /dev/null
+++ b/.ci/stress_test.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+# Copyright (c) 2020 Egor Tensin <Egor.Tensin@gmail.com>
+# This file is part of the "math-server" project.
+# For details, see https://github.com/egor-tensin/math-server.
+# Distributed under the MIT License.
+
+set -o errexit -o nounset -o pipefail
+
+run_server() {
+ "$HOME/install/bin/math-server" --port 16666 &
+ trap "kill $?" EXIT
+}
+
+run_stress_test() {
+ "$TRAVIS_BUILD_DIR/test/stress_test.py" --client "$HOME/install/bin/math-client" --port 16666 --processes 4 --expressions 1000
+}
+
+main() {
+ run_server
+ run_stress_test
+}
+
+main
diff --git a/.travis.yml b/.travis.yml
index 972eea3..10e0c44 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -43,6 +43,7 @@ script:
- "$HOME/install/bin/math-server-unit-tests"
- "$HOME/install/bin/math-server-benchmarks"
+ - ./.ci/stress_test.sh
jobs:
fast_finish: true