-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathci_tests.sh
More file actions
executable file
·43 lines (34 loc) · 931 Bytes
/
ci_tests.sh
File metadata and controls
executable file
·43 lines (34 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
set -e
source ./ci_utils.sh
# If ENABLE_HCTREE is set, add a flag to the test called -enableHctree
if [ "$ENABLE_HCTREE" == "true" ]; then
ENABLE_HCTREE_FLAG="-enableHctree"
fi
git config --global --add safe.directory `pwd`
# Add bedrock binary to the path
export PATH=$PATH:`pwd`
# Run squid in the background
squid -sYC
export https_proxy=http://127.0.0.1:3128
# Run wget to example.com until it succeeds. Try ten times, else, fail.
for i in {1..10}; do
if wget -q --spider https://example.com; then
echo "Squid started"
break
fi
if [ $i -eq 10 ]; then
echo "Squid failed to start"
exit 1
fi
echo "Waiting for squid to start..."
sleep 1
done
cd test
mark_fold start test_bedrock
./test -threads 128 $ENABLE_HCTREE_FLAG
mark_fold end test_bedrock
cd clustertest
mark_fold start test_bedrock_cluster
./clustertest -threads 8 $ENABLE_HCTREE_FLAG
mark_fold end test_bedrock_cluster