Skip to content

Commit 1c14a03

Browse files
committed
Merge branch 'develop'
2 parents a4452fa + 8276cfc commit 1c14a03

5 files changed

Lines changed: 102 additions & 6 deletions

File tree

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ Makefile.in
1313
/missing
1414
/stamp-h1
1515

16+
# Download packages directory
17+
/clients/packages
18+
19+
# Test results directory
20+
/scripts/results
21+
1622
# Created by https://www.gitignore.io
1723

1824
### Linux ###

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ This repository contains all necessary for deploy HTTP/2 testing server or clien
33

44

55
## Version
6-
0.1.0
6+
0.2.0
77

88

99
## Installation
@@ -58,4 +58,4 @@ This repository contains a lot of tests for HTTP/2. The description about these
5858
License
5959
----
6060

61-
MIT
61+
[MIT](http://opensource.org/licenses/mit-license.html)

clients/nghttp2_installer.sh

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#!/bin/bash
2+
set -e
3+
mkdir -p packages
4+
cd packages
5+
6+
echo "********************************************************"
7+
echo "* Installing general dependences... *"
8+
echo "********************************************************"
9+
sudo apt-get install git \
10+
gcc \
11+
g++ \
12+
make \
13+
pkg-config \
14+
binutils \
15+
autoconf \
16+
automake \
17+
autotools-dev \
18+
libtool \
19+
-y
20+
21+
echo "********************************************************"
22+
echo "* OPENSSL: 1.0.2 *"
23+
echo "********************************************************"
24+
sudo apt-get install perl \
25+
-y
26+
wget https://www.openssl.org/source/openssl-1.0.2a.tar.gz
27+
tar xfv openssl-1.0.2a.tar.gz
28+
cd openssl-1.0.2a
29+
./config
30+
make depend
31+
make
32+
make test
33+
sudo make install
34+
cd ..
35+
36+
echo "******************************************************"
37+
echo "* SPDYLAY: Last Git master version *"
38+
echo "******************************************************"
39+
sudo apt-get install zlib-bin \
40+
libcunit1-dev \
41+
libxml2-dev \
42+
libevent-dev \
43+
zlib1g-dev \
44+
libssl-dev \
45+
libevent-openssl-2.0-5 \
46+
-y
47+
git clone https://github.com/tatsuhiro-t/spdylay.git
48+
cd spdylay
49+
autoreconf -i
50+
automake
51+
autoconf
52+
./configure
53+
make
54+
sudo make install
55+
cd ..
56+
57+
echo "********************************************************"
58+
echo "* NGHTTP2: 1.0.1 *"
59+
echo "********************************************************"
60+
sudo apt-get install gcc \
61+
sphinx3 \
62+
libev-dev \
63+
libjansson-dev \
64+
libjemalloc-dev \
65+
libboost-dev \
66+
libboost-thread-dev \
67+
cython \
68+
python3.4-dev \
69+
-y
70+
wget https://github.com/tatsuhiro-t/nghttp2/releases/download/v1.0.1/nghttp2-1.0.1.tar.gz
71+
tar xfv nghttp2-1.0.1.tar.gz
72+
cd nghttp2-1.0.1/
73+
autoreconf -i
74+
automake
75+
autoconf
76+
./configure
77+
make
78+
sudo make install
79+
cd ..
80+
81+
cd ..
82+
83+
exit 0

scripts/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ The only way for defined a test is using four arrays with the same index. These
4141
- **TestName:** Contains the route to the template file from the remote test server.
4242
- **TestFilename:** Set the name for the output where the test results will be saved.
4343
- **TestParameter:** Define the input options for NGHTTP client. For get more info about all possibilities, please click [here](https://nghttp2.org/documentation/nghttp.1.html#options).
44+
- **TestUrlPreamb:** Define if the test use *http://* or *https://* with URL of the test server.
4445

4546
This is an example of test definition:
4647

scripts/run_tests.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ fi
1414
# Load the Tests description file
1515
source test.list
1616

17+
# Check if the "results" directory exists. If not, create a new directory.
18+
mkdir -p results
19+
1720
# Launch each test
1821
TOTALTESTS=${#TestFilename[@]}-1
1922
for (( i=0; i<${#TestFilename[@]}; i++ ))
@@ -41,15 +44,15 @@ for (( i=0; i<${#TestFilename[@]}; i++ ))
4144
# Test Command Execution and getting the last output line
4245
TEST_LAST_LINE=$(eval $FULL_COMMAND | tail -n 1)
4346
echo "[ OK ]"
44-
echo "[ DEBUG ] $TEST_LAST_LINE"
47+
# echo "[ DEBUG ] $TEST_LAST_LINE"
4548

4649
# Getting the test total time
4750
responseTime=$(echo $TEST_LAST_LINE | awk '{print $2}') # Get the total time. Example: +34.34s
4851
responseTime=${responseTime:1} # Deleting + symbol from the value (first character)
4952

5053
# Calculating multiplier to parse responseTime to microseconds (us)
5154
valueUnit=$(echo $responseTime | tail -c 3)
52-
echo "[ DEBUG ] Text of the unit value: $valueUnit"
55+
# echo "[ DEBUG ] Text of the unit value: $valueUnit"
5356
case $valueUnit in
5457
[0-9]*s) multiplier=1000000 ;;
5558
ms) multiplier=1000 ;;
@@ -58,12 +61,15 @@ for (( i=0; i<${#TestFilename[@]}; i++ ))
5861
continue;;
5962
esac
6063
responseTime=$(echo $responseTime | grep -Po '(\d+.*\d+)') # Deleting units from the value
61-
echo "[ DEBUG ] Response time: $responseTime"
64+
# echo "[ DEBUG ] Response time: $responseTime"
6265
valueToSave=$(python -c "print $responseTime * $multiplier") # Parsing time to microseconds
63-
echo "[ DEBUG ] Value to save on result file: $valueToSave"
66+
# echo "[ DEBUG ] Value to save on result file: $valueToSave"
6467

6568
# Saving test time to results file
6669
echo "$valueToSave" >> "results/${TestFilename[i]}"
6770
done
71+
72+
# Insert blank lines to formatted user output
73+
echo ""
6874
done
6975
exit 0

0 commit comments

Comments
 (0)