This repository was archived by the owner on Aug 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +2
-36
lines changed Expand file tree Collapse file tree 2 files changed +2
-36
lines changed Original file line number Diff line number Diff line change 8
8
- run :
9
9
name : Install software
10
10
command : |
11
- apt-get update && apt-get install -y sudo wget jq \
11
+ apt-get update && apt-get install -y sudo wget jq gawk pgreplay \
12
12
&& wget get.docker.com -q -S -O - | sudo sh
13
13
- checkout
14
14
- setup_remote_docker
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- # CAUTION: these checks will definitely not work on non-Debian(Ubuntu) machines,
4
- # In general, all this script is very fragile. TODO improve
5
-
6
- failures=0
7
-
8
- output=$( \
9
- ${BASH_SOURCE%/* } /../nancy prepare-workload --db-name testci \
10
- --output ./test.replay ./.circleci/sample.log \
11
- 2>&1
12
- )
13
- if [ " ${output: 0: 27} " != " ERROR: GNU awk is required." ]; then
14
- failures=$(( failures+ 1 ))
15
- fi
16
-
17
- sudo apt-get install -y gawk # only Ubuntu/Debian! TODO
18
-
19
- output=$( \
20
- ${BASH_SOURCE%/* } /../nancy prepare-workload --db-name testci \
21
- --output ./test.replay ./.circleci/sample.log \
22
- 2>&1
23
- )
24
- if [ " ${output: 0: 33} " != " ERROR: pgreplay is not installed." ]; then
25
- failures=$(( failures+ 1 ))
26
- echo " out: $output "
27
- fi
28
-
29
- sudo apt-get install -y pgreplay # only Ubuntu/Debian! TODO
30
-
31
3
output=$( \
32
4
${BASH_SOURCE%/* } /../nancy prepare-workload --db-name testci \
33
5
--output ./test.replay ./.circleci/sample.log \
34
6
2>&1
35
7
)
36
8
if [[ $output =~ " Total SQL statements processed: 2" ]]; then
37
- :
38
- else
39
- failures=$(( failures+ 1 ))
40
- fi
41
-
42
- if [ " $failures " -eq " 0" ]; then
43
9
echo -e " \e[36mOK\e[39m"
44
10
else
45
11
>&2 echo -e " \e[31mFAILED\e[39m"
46
- >&2 echo -e " $failures /3 of checks failed "
12
+ >&2 echo -e " Output: $output "
47
13
exit 1
48
14
fi
49
15
You can’t perform that action at this time.
0 commit comments