Skip to content

Commit 3fdc58d

Browse files
spencerjacksonhanumantmk
authored andcommitted
CDRIVER-451 Run make check
Closes #116
1 parent 3a06949 commit 3fdc58d

File tree

1 file changed

+58
-2
lines changed

1 file changed

+58
-2
lines changed

.mci.yml

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
stepback: true
22
pre:
3+
- command: expansions.fetch
4+
params:
5+
keys:
6+
- local_key: "aws_key"
7+
remote_key: "project_aws_key"
8+
- local_key: "aws_secret"
9+
remote_key: "project_aws_secret"
310
- command: shell.exec
411
params:
512
script: |
13+
set -o verbose
614
rm -rf "c-driver"
7-
15+
rm -rf /data/db
16+
mkdir -p /data/db
817
post:
18+
- command: shell.exec
19+
params:
20+
script: |
21+
set -o verbose
22+
${killall_mci|pkill -9 mongod; pkill -9 mongos}
923
1024
## tasks
1125
tasks:
@@ -14,6 +28,9 @@ tasks:
1428
- command: git.get_project
1529
params:
1630
directory: "c-driver"
31+
- command: git.apply_patch
32+
params:
33+
directory: "c-driver"
1734
- command: shell.exec
1835
params:
1936
working_dir: "c-driver"
@@ -22,13 +39,52 @@ tasks:
2239
set -o errexit
2340
./autogen.sh
2441
make ${compile_flags}
42+
tar -czvf ../mongo-c-driver.tar.gz .
43+
- command: s3.put
44+
params:
45+
aws_key: ${aws_key}
46+
aws_secret: ${aws_secret}
47+
remote_file: mongo-c-driver/${build_variant}/${revision}/artifacts/${build_id}.tar.gz
48+
bucket: mciuploads
49+
local_file: mongo-c-driver.tar.gz
50+
permissions: public-read
51+
content_type: ${content_type|application/x-gzip}
52+
53+
- name: "make check"
54+
depends_on:
55+
- name: "compile"
56+
commands:
57+
- command: shell.exec
58+
params:
59+
script: |
60+
mkdir c-driver
61+
- command: shell.exec
62+
params:
63+
working_dir: "c-driver"
64+
script: |
65+
set -o verbose
66+
set -o errexit
67+
trap 'set +o errexit; pkill -9 mongod; pkill -9 mongos}' EXIT
68+
# MCI's S3 mechanism doesn't support symlinks
69+
curl http://s3.amazonaws.com/mciuploads/mongo-c-driver/${build_variant}/${revision}/artifacts/${build_id}.tar.gz -o ${build_id}.tar.gz --silent
70+
tar -xzf ${build_id}.tar.gz
71+
curl -s ${mongo_url} --output mongo_enterprise.${ext|tgz}
72+
${decompress} mongo_enterprise.${ext|tgz}
73+
cp mongodb*/bin/mongod${extension} ./mongod${extension}
74+
chmod +x ./mongod${extension}
75+
./mongod${extension} ${mongodb_args}
76+
sleep 30
77+
make check
2578
2679
buildvariants:
2780
- name: ubuntu-1404
2881
display_name: "Ubuntu-1404"
2982
expansions:
3083
compile_flags: -j$(grep -c ^processor /proc/cpuinfo)
84+
mongo_url: "http://downloads.mongodb.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1404-latest.tgz"
85+
mongodb_args: "--dbpath /data/db --nopreallocj --setParameter=enableTestCommands=1 &"
3186
run_on:
3287
- ubuntu1404-test
3388
tasks:
34-
- name: compile
89+
- name: compile
90+
- name: "make check"

0 commit comments

Comments
 (0)