summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/test/evergreen.yml
blob: 1e306fe4b2e7a9b983d4b1f4ed1aa282b3a8a041 (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
#
# This file defines the tasks and platforms for WiredTiger in the
# MongoDB continuous integration system (see https://mci.mongodb.com).
#

functions:
  "get project" :
    command: git.get_project
    params:
      directory: wiredtiger
  "fetch artifacts" :
    command: s3.get
    params:
      aws_key: ${aws_key}
      aws_secret: ${aws_secret}
      remote_file: wiredtiger/${build_variant}/${revision}/artifacts/${dependent_task|compile}_${build_id}.tgz
      bucket: build_external
      extract_to: wiredtiger
  "fetch artifacts from little-endian" :
    - command: s3.get
      params:
        aws_key: ${aws_key}
        aws_secret: ${aws_secret}
        remote_file: wiredtiger/little-endian/${revision}/artifacts/WT_TEST.tgz
        bucket: build_external
        local_file: WT_TEST-little-endian.tgz
    - command: archive.targz_extract
      params:
        path: "WT_TEST-little-endian.tgz"
        destination: "wiredtiger/build_posix/test/format"
  "fetch artifacts from big-endian" :
    - command: s3.get
      params:
        aws_key: ${aws_key}
        aws_secret: ${aws_secret}
        remote_file: wiredtiger/big-endian/${revision}/artifacts/WT_TEST.tgz
        bucket: build_external
        local_file: WT_TEST-big-endian.tgz
    - command: archive.targz_extract
      params:
        path: "WT_TEST-big-endian.tgz"
        destination: "wiredtiger/build_posix/test/format"
  "fetch mongo-tests repo" :
    command: shell.exec
    params:
      script: |
        git clone https://github.com/wiredtiger/mongo-tests
  "configure wiredtiger": &configure_wiredtiger
    command: shell.exec
    params:
      working_dir: "wiredtiger/build_posix"
      shell: bash
      script: |
        set -o errexit
        set -o verbose
        if [ "$OS" != "Windows_NT" ]; then
          sh reconf
          ${configure_env_vars|CC=/opt/mongodbtoolchain/v3/bin/gcc CXX=/opt/mongodbtoolchain/v3/bin/g++ PATH=/opt/mongodbtoolchain/v3/bin:$PATH CFLAGS="-ggdb -fPIC"} \
            ../configure ${configure_python_setting|} \
            ${posix_configure_flags|--enable-silent-rules --enable-diagnostic --enable-python --enable-zlib --enable-strict --enable-static --prefix=$(pwd)/LOCAL_INSTALL}
        fi
  "make wiredtiger": &make_wiredtiger
    command: shell.exec
    params:
      working_dir: "wiredtiger"
      shell: bash
      script: |
        set -o errexit
        set -o verbose
        if [ "Windows_NT" == "$OS" ]; then
          pip install scons==3.1.1
          scons-3.1.1.bat ${win_configure_flags|--enable-python=c:\\swigwin-3.0.2\\swig.exe --enable-diagnostic} ${smp_command|}
        else
          cd build_posix
          ${make_command|make} ${smp_command|} 2>&1

          # On macOS, change the binary location with install_name_tool since DYLD_LIBRARY_PATH
          # appears not to work for dynamic modules loaded by python. For wt, the libtool generated
          # script has the wrong path for running on test machines.
          if [ "$(uname -s)" == "Darwin" ]; then
            WT_VERSION=$(m4 aclocal/version.m4)
            install_name_tool -change /usr/local/lib/libwiredtiger-$WT_VERSION.dylib $(pwd)/.libs/libwiredtiger-$WT_VERSION.dylib lang/python/_wiredtiger*.so
            install_name_tool -change /usr/local/lib/libwiredtiger-$WT_VERSION.dylib $(pwd)/.libs/libwiredtiger-$WT_VERSION.dylib .libs/wt
          fi
        fi
  "compile wiredtiger":
    - *configure_wiredtiger
    - *make_wiredtiger
  "compile wiredtiger no linux ftruncate":
    - *configure_wiredtiger
    - command: shell.exec
      params:
        working_dir: "wiredtiger/build_posix"
        shell: bash
        script: |
          set -o errexit
          set -o verbose
          echo '#undef HAVE_FTRUNCATE' >> wiredtiger_config.h
    - *make_wiredtiger
  "compile wiredtiger address sanitizer":
    - command: shell.exec
      params:
        working_dir: "wiredtiger/build_posix"
        shell: bash
        script: |
          set -o errexit
          set -o verbose
          sh reconf
          if [ "$OS" != "Windows_NT" ]; then
            CC=/opt/mongodbtoolchain/v3/bin/clang CXX=/opt/mongodbtoolchain/v3/bin/clang++ PATH=/opt/mongodbtoolchain/v3/bin:$PATH CFLAGS="-ggdb -fPIC -fno-omit-frame-pointer -fsanitize=address" \
              ../configure ${configure_python_setting|} \
              --enable-diagnostic --with-builtins=lz4,snappy,zlib
          fi
    - *make_wiredtiger
  "compile wiredtiger with builtins":
    - command: shell.exec
      params:
        working_dir: "wiredtiger/build_posix"
        shell: bash
        script: |
          set -o errexit
          set -o verbose
          sh reconf
          if [ "$OS" != "Windows_NT" ]; then
            CC=/opt/mongodbtoolchain/v3/bin/gcc CXX=/opt/mongodbtoolchain/v3/bin/g++ PATH=/opt/mongodbtoolchain/v3/bin:$PATH CFLAGS="-ggdb -fPIC" \
              ../configure ${configure_python_setting|} \
              --enable-strict --enable-diagnostic --with-builtins=lz4,snappy,zlib
          fi
    - *make_wiredtiger
  "make check directory":
    command: shell.exec
    params:
      working_dir: "wiredtiger/build_posix"
      script: |
        set -o errexit
        set -o verbose

        ${test_env_vars|} ${make_command|make} VERBOSE=1 check -C ${directory}  ${smp_command|} 2>&1
  "make check all":
    command: shell.exec
    params:
      working_dir: "wiredtiger/build_posix"
      script: |
        set -o errexit
        set -o verbose

        ${test_env_vars|} ${make_command|make} VERBOSE=1 check ${smp_command|} 2>&1
  "unit test":
    command: shell.exec
    params:
      working_dir: "wiredtiger/build_posix"
      script: |
        set -o errexit
        set -o verbose

        ${test_env_vars|} ${python_binary|python} ../test/suite/run.py ${unit_test_args|-v 2} ${smp_command|} 2>&1
  "format test":
    command: shell.exec
    params:
      working_dir: "wiredtiger/build_posix/test/format"
      script: |
        set -o errexit
        set -o verbose
        for i in $(seq ${times|1}); do
          ./t -1 -c ${config|../../../test/format/CONFIG.stress} ${extra_args|} || ( [ -f RUNDIR/CONFIG ] && cat RUNDIR/CONFIG ) 2>&1
        done
  "format test script":
    command: shell.exec
    params:
      working_dir: "wiredtiger/test/format"
      script: |
        set -o errexit
        set -o verbose
        for i in $(seq ${times|1}); do
          ${format_test_setting|}
          ${test_env_vars|} ./format.sh ${smp_command|} ${format_test_script_args|} 2>&1
        done
  "many dbs test":
    command: shell.exec
    params:
      working_dir: "wiredtiger/build_posix/test/manydbs"
      script: |
        set -o errexit
        set -o verbose
        ${test_env_vars|} ./t ${many_db_args|} 2>&1
  "thread test":
    command: shell.exec
    params:
      working_dir: "wiredtiger/build_posix/test/thread"
      script: |
        set -o errexit
        set -o verbose
        ${test_env_vars|} ./t ${thread_test_args|} 2>&1
  "random abort test":
    command: shell.exec
    params:
      working_dir: "wiredtiger/build_posix/test/csuite"
      script: |
        set -o errexit
        set -o verbose
        ${test_env_vars|} ./test_random_abort ${random_abort_args|} 2>&1
  "timestamp abort test":
    command: shell.exec
    params:
      working_dir: "wiredtiger/build_posix/test/csuite"
      script: |
        set -o errexit
        set -o verbose
        ${test_env_vars|} ./test_timestamp_abort ${timestamp_abort_args|} 2>&1
  "truncated log test":
    command: shell.exec
    params:
      working_dir: "wiredtiger/build_posix/test/csuite"
      script: |
        set -o errexit
        set -o verbose
        ${test_env_vars|} ./test_truncated_log ${truncated_log_args|} 2>&1
  "recovery stress test script":
    command: shell.exec
    params:
      working_dir: "wiredtiger/build_posix/test/csuite"
      script: |
        set -o errexit
        set -o verbose

        for i in $(seq ${times|1}); do
          # Run the various combinations of args.  Let time and threads be random.
          # Run current version with write-no-sync txns.
          ${test_env_vars|} ./test_random_abort 2>&1
          ${test_env_vars|} ./test_timestamp_abort 2>&1

          # Current version with memory-based txns (MongoDB usage).
          ${test_env_vars|} ./test_random_abort -m 2>&1
          ${test_env_vars|} ./test_timestamp_abort -m 2>&1

          # V1 log compatibility mode with write-no-sync txns.
          ${test_env_vars|} ./test_random_abort -C 2>&1
          ${test_env_vars|} ./test_timestamp_abort -C 2>&1

          # V1 log compatibility mode with memory-based txns.
          ${test_env_vars|} ./test_random_abort -C -m 2>&1
          ${test_env_vars|} ./test_timestamp_abort -C -m 2>&1

          ${test_env_vars|} ./test_truncated_log ${truncated_log_args|} 2>&1

          # Just let the system take a breath
          sleep 10s
        done
  "upload artifact":
    - command: archive.targz_pack
      params:
        target: "wiredtiger.tgz"
        source_dir: "wiredtiger"
        include:
          - "./**"
    - command: s3.put
      params:
        aws_secret: ${aws_secret}
        aws_key: ${aws_key}
        local_file: wiredtiger.tgz
        bucket: build_external
        permissions: public-read
        content_type: application/tar
        display_name: Artifacts
        remote_file: wiredtiger/${build_variant}/${revision}/artifacts/${task_name}_${build_id}.tgz
  "cleanup":
    command: shell.exec
    params:
      script: |
        rm -rf "wiredtiger"
        rm -rf "wiredtiger.tgz"

  "checkpoint test":
    command: shell.exec
    params:
      working_dir: "wiredtiger/build_posix/test/checkpoint"
      script: |
        set -o errexit
        set -o verbose
        ./t ${checkpoint_args} 2>&1

  "checkpoint stress test":
    command: shell.exec
    params:
      working_dir: "wiredtiger/build_posix/test/checkpoint"
      shell: bash
      script: |
        set -o errexit
        set -o verbose

        export WIREDTIGER_CONFIG='checkpoint_sync=0,transaction_sync=(method=none)'
        CMD='./t -h WT_TEST.$i.$t -t r -r 2 -W 3 -n 1000000 -k 1000000 -C "cache_size=100MB"'

        for i in $(seq ${times|1}); do
          for t in $(seq ${no_of_procs|1}); do
            eval nohup $CMD > nohup.out.$i.$t 2>&1 &
          done

          for t in $(seq ${no_of_procs|1}); do
            wait -n || exit $?
          done
        done

pre:
  - func: "cleanup"
post:
  - func: "upload artifact"
  - func: "cleanup"

tasks:
  # Base compile task on posix flavours
  - name: compile
    tags: ["pull_request"]
    commands:
      - func: "get project"
      - func: "compile wiredtiger"

  - name: compile-asan
    tags: ["pull_request"]
    commands:
      - func: "get project"
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=/opt/mongodbtoolchain/v3/bin/clang CXX=/opt/mongodbtoolchain/v3/bin/clang++ PATH=/opt/mongodbtoolchain/v3/bin:$PATH CFLAGS="-fsanitize=address -fno-omit-frame-pointer -ggdb"
          posix_configure_flags: --enable-silent-rules --enable-strict --enable-diagnostic --disable-static

  - name: compile-msan
    commands:
      - func: "get project"
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=/opt/mongodbtoolchain/v3/bin/clang CXX=/opt/mongodbtoolchain/v3/bin/clang++ PATH=/opt/mongodbtoolchain/v3/bin:$PATH CFLAGS="-fsanitize=memory -ggdb"
          posix_configure_flags: --enable-silent-rules --enable-strict --enable-diagnostic --disable-static

  - name: compile-ubsan
    commands:
      - func: "get project"
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=/opt/mongodbtoolchain/v3/bin/gcc CXX=/opt/mongodbtoolchain/v3/bin/g++ PATH=/opt/mongodbtoolchain/v3/bin:$PATH CFLAGS="-fsanitize=undefined -ggdb"
          posix_configure_flags: --enable-silent-rules --enable-strict --enable-diagnostic

  # production build with --disable-shared
  - name: compile-production-disable-shared
    tags: ["pull_request"]
    commands:
      - func: "get project"
      - func: "compile wiredtiger"
        vars:
          posix_configure_flags: --enable-silent-rules --enable-strict --disable-shared

  # production build with --disable-static
  - name: compile-production-disable-static
    tags: ["pull_request"]
    commands:
      - func: "get project"
      - func: "compile wiredtiger"
        vars:
          posix_configure_flags: --enable-silent-rules --enable-strict --disable-static --enable-lz4 --enable-snappy --enable-zlib --enable-zstd --enable-python

  - name: compile-linux-no-ftruncate
    commands:
      - func: "get project"
      - func: "compile wiredtiger no linux ftruncate"
        vars:
          posix_configure_flags: --enable-silent-rules --enable-diagnostic --enable-strict --enable-python

  - name: compile-wtperf
    commands:
      - func: "get project"
      - func: "compile wiredtiger"
        vars:
          posix_configure_flags: --enable-strict --enable-diagnostic

  - name: compile-gcc
    tags: ["pull_request", "pull_request_compilers"]
    commands:
      - func: "get project"
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=gcc-4.8 CXX=g++-4.8 CFLAGS="-ggdb -fPIC"
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=gcc-5 CXX=g++-5 CFLAGS="-ggdb -fPIC"
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=gcc-6 CXX=g++-6 CFLAGS="-ggdb -fPIC"
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=gcc-6 CXX=g++-6 CFLAGS="-ggdb -fPIC" CPPFLAGS=-fvisibility=hidden
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=gcc-7 CXX=g++-7 CFLAGS="-ggdb -fPIC"
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=gcc-8 CXX=g++-8 CFLAGS="-ggdb -fPIC"
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=gcc-9 CXX=g++-9 CFLAGS="-ggdb -fPIC"

  - name: compile-clang
    tags: ["pull_request", "pull_request_compilers"]
    commands:
      - func: "get project"
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=clang-3.9 CXX=clang++-3.9 CFLAGS="-ggdb -fPIC"
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=clang-4.0 CXX=clang++-4.0 CFLAGS="-ggdb -fPIC"
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=clang-5.0 CXX=clang++-5.0 CFLAGS="-ggdb -fPIC"
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=clang-6.0 CXX=clang++-6.0 CFLAGS="-ggdb -fPIC"
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=clang-7 CXX=clang++-7 CFLAGS="-ggdb -fPIC"
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=clang-8 CXX=clang++-8 CFLAGS="-ggdb -fPIC"

  - name: make-check-test
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "compile wiredtiger"
      - func: "make check all"

  - name: make-check-msan-test
    depends_on:
      - name: compile-msan
    commands:
      - func: "fetch artifacts"
        vars:
          dependent_task: compile-msan
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=/opt/mongodbtoolchain/v3/bin/clang CXX=/opt/mongodbtoolchain/v3/bin/clang++ PATH=/opt/mongodbtoolchain/v3/bin:$PATH CFLAGS="-fsanitize=memory -ggdb"
          posix_configure_flags: --enable-silent-rules --enable-strict --enable-diagnostic --disable-static
      - func: "make check all"
        vars:
          test_env_vars: MSAN_OPTIONS=abort_on_error=1:disable_coredump=0 MSAN_SYMBOLIZER_PATH=/opt/mongodbtoolchain/v3/bin/llvm-symbolizer TESTUTIL_SLOW_MACHINE=1

  - name: make-check-asan-test
    depends_on:
      - name: compile-asan
    commands:
      - func: "fetch artifacts"
        vars:
          dependent_task: compile-asan
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=/opt/mongodbtoolchain/v3/bin/clang CXX=/opt/mongodbtoolchain/v3/bin/clang++ PATH=/opt/mongodbtoolchain/v3/bin:$PATH CFLAGS="-fsanitize=address -fno-omit-frame-pointer -ggdb"
          posix_configure_flags: --enable-silent-rules --enable-strict --enable-diagnostic --disable-static
      - func: "make check all"
        vars:
          test_env_vars: ASAN_OPTIONS=detect_leaks=1:abort_on_error=1:disable_coredump=0 ASAN_SYMBOLIZER_PATH=/opt/mongodbtoolchain/v3/bin/llvm-symbolizer TESTUTIL_SLOW_MACHINE=1

  - name: make-check-linux-no-ftruncate-test
    depends_on:
      - name: compile-linux-no-ftruncate
    commands:
      - func: "fetch artifacts"
        vars:
          dependent_task: compile-linux-no-ftruncate
      - func: "compile wiredtiger no linux ftruncate"
        vars:
          posix_configure_flags: --enable-silent-rules --enable-diagnostic --enable-strict --enable-python
      - func: "make check all"

  # Start of normal make check test tasks

  - name: lang-python-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "compile wiredtiger"
      - func: "make check directory"
        vars:
          directory: lang/python

  - name: examples-c-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "compile wiredtiger"
      - func: "make check directory"
        vars:
          directory: examples/c

  - name: examples-c-asan-test
    tags: ["pull_request"]
    depends_on:
      - name: compile-asan
    commands:
      - func: "fetch artifacts"
        vars:
          dependent_task: compile-asan
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=/opt/mongodbtoolchain/v3/bin/clang CXX=/opt/mongodbtoolchain/v3/bin/clang++ PATH=/opt/mongodbtoolchain/v3/bin:$PATH CFLAGS="-fsanitize=address -ggdb"
          posix_configure_flags: --enable-silent-rules --enable-strict --enable-diagnostic --disable-static
      - func: "make check directory"
        vars:
          test_env_vars: ASAN_OPTIONS=detect_leaks=1:abort_on_error=1:disable_coredump=0 ASAN_SYMBOLIZER_PATH=/opt/mongodbtoolchain/v3/bin/llvm-symbolizer
          directory: examples/c

  - name: examples-c-production-disable-shared-test
    tags: ["pull_request"]
    depends_on:
      - name: compile-production-disable-shared
    commands:
      - func: "fetch artifacts"
        vars:
          dependent_task: compile-production-disable-shared
      - func: "compile wiredtiger"
        vars:
          posix_configure_flags: --enable-silent-rules --enable-strict --disable-shared
      - func: "make check directory"
        vars:
          directory: examples/c

  - name: examples-c-production-disable-static-test
    tags: ["pull_request"]
    depends_on:
      - name: compile-production-disable-static
    commands:
      - func: "fetch artifacts"
        vars:
          dependent_task: compile-production-disable-static
      - func: "compile wiredtiger"
        vars:
          posix_configure_flags: --enable-silent-rules --enable-strict --disable-static --enable-lz4 --enable-snappy --enable-zlib --enable-zstd --enable-python
      - func: "make check directory"
        vars:
          directory: examples/c

  - name: bloom-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "compile wiredtiger"
      - func: "make check directory"
        vars:
          directory: test/bloom

  # Temporarily disabled
  # - name: checkpoint-test
  #   tags: ["pull_request"]
  #   depends_on:
  #     - name: compile
  #   commands:
  #     - func: "fetch artifacts"
  #     - func: "compile wiredtiger"
  #     - func: "make check directory"
  #       vars:
  #         directory: test/checkpoint

  - name: cursor-order-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "compile wiredtiger"
      - func: "make check directory"
        vars:
          directory: test/cursor_order

  - name: fops-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "compile wiredtiger"
      - func: "make check directory"
        vars:
          directory: test/fops

  # Temporarily disabled
  # - name: format-test
  #   tags: ["pull_request"]
  #   depends_on:
  #     - name: compile
  #   commands:
  #     - func: "fetch artifacts"
  #     - func: "compile wiredtiger"
  #     - func: "make check directory"
  #       vars:
  #         directory: test/format

  - name: huge-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "compile wiredtiger"
      - func: "make check directory"
        vars:
          directory: test/huge

  - name: manydbs-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "compile wiredtiger"
      - func: "make check directory"
        vars:
          directory: test/manydbs

  - name: packing-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "compile wiredtiger"
      - func: "make check directory"
        vars:
          directory: test/packing

  - name: readonly-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "compile wiredtiger"
      - func: "make check directory"
        vars:
          directory: test/readonly

  - name: salvage-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "compile wiredtiger"
      - func: "make check directory"
        vars:
          directory: test/salvage

  - name: thread-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "compile wiredtiger"
      - func: "make check directory"
        vars:
          directory: test/thread

  - name: bench-wtperf-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "compile wiredtiger"
      - func: "make check directory"
        vars:
          directory: bench/wtperf

  # End of normal make check test tasks

  - name: ubsan-test
    depends_on:
      - name: compile-ubsan
    commands:
      - func: "fetch artifacts"
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=/opt/mongodbtoolchain/v3/bin/gcc CXX=/opt/mongodbtoolchain/v3/bin/g++ PATH=/opt/mongodbtoolchain/v3/bin:$PATH CFLAGS="-fsanitize=undefined -ggdb"
          posix_configure_flags: --enable-silent-rules --enable-strict --enable-diagnostic
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix/examples/c"
          script: |
            set -o errexit
            set -o verbose
            UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1:abort_on_error=1:disable_coredump=0 ./ex_access

  # Start of csuite test tasks

  - name: csuite-import-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/../test/csuite/import/smoke.sh 2>&1

  - name: csuite-incr-backup-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_incr_backup 2>&1

  - name: csuite-random-abort-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/../test/csuite/random_abort/smoke.sh 2>&1

  - name: csuite-random-directio-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/../test/csuite/random_directio/smoke.sh 2>&1

  - name: csuite-schema-abort-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/../test/csuite/schema_abort/smoke.sh 2>&1

  - name: csuite-timestamp-abort-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/../test/csuite/timestamp_abort/smoke.sh 2>&1

  - name: csuite-scope-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_scope 2>&1

  - name: csuite-truncated-log-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "truncated log test"

  - name: csuite-wt1965-col-efficiency-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt1965_col_efficiency 2>&1

  - name: csuite-wt2403-lsm-workload-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt2403_lsm_workload 2>&1

  - name: csuite-wt2447-join-main-table-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt2447_join_main_table 2>&1

  - name: csuite-wt2695-checksum-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt2695_checksum 2>&1

  - name: csuite-wt2592-join-schema-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt2592_join_schema 2>&1

  - name: csuite-wt2719-reconfig-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt2719_reconfig 2>&1

  - name: csuite-wt2999-join-extractor-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt2999_join_extractor 2>&1

  - name: csuite-wt3120-filesys-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt3120_filesys 2>&1

  - name: csuite-wt3135-search-near-collator-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt3135_search_near_collator 2>&1

  - name: csuite-wt3184-dup-index-collator-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt3184_dup_index_collator 2>&1

  - name: csuite-wt3363-checkpoint-op-races-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt3363_checkpoint_op_races 2>&1

  - name: csuite-wt3874-pad-byte-collator-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt3874_pad_byte_collator 2>&1

  - name: csuite-wt4105-large-doc-small-upd-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt4105_large_doc_small_upd 2>&1

  - name: csuite-wt4117-checksum-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt4117_checksum 2>&1

  - name: csuite-wt4156-metadata-salvage-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt4156_metadata_salvage 2>&1

  - name: csuite-wt4699-json-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt4699_json 2>&1

  - name: csuite-wt4803-history-store-abort-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt4803_history_store_abort 2>&1

  - name: csuite-wt4891-meta-ckptlist-get-alloc-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt4891_meta_ckptlist_get_alloc 2>&1

  - name: csuite-rwlock-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_rwlock 2>&1

  # Temporarily disabled (WT-5790)
  # - name: csuite-wt2246-col-append-test
  #   tags: ["pull_request"]
  #   depends_on:
  #     - name: compile
  #   commands:
  #     - func: "fetch artifacts"
  #     - command: shell.exec
  #       params:
  #         working_dir: "wiredtiger/build_posix"
  #         script: |
  #           set -o errexit
  #           set -o verbose

  #           ${test_env_vars|} $(pwd)/test/csuite/test_wt2246_col_append 2>&1

  # Temporarily disabled
  # - name: csuite-wt2323-join-visibility-test
  #   tags: ["pull_request"]
  #   depends_on:
  #     - name: compile
  #   commands:
  #     - func: "fetch artifacts"
  #     - command: shell.exec
  #       params:
  #         working_dir: "wiredtiger/build_posix"
  #         script: |
  #           set -o errexit
  #           set -o verbose

  #           ${test_env_vars|} $(pwd)/test/csuite/test_wt2323_join_visibility 2>&1

  - name: csuite-wt2535-insert-race-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt2535_insert_race 2>&1

  - name: csuite-wt2834-join-bloom-fix-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt2834_join_bloom_fix 2>&1

  - name: csuite-wt2853-perf-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt2853_perf 2>&1

  - name: csuite-wt2909-checkpoint-integrity-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt2909_checkpoint_integrity 2>&1

  - name: csuite-wt3338-partial-update-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt3338_partial_update 2>&1

  - name: csuite-wt4333-handle-locks-test
    tags: ["pull_request"]
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} $(pwd)/test/csuite/test_wt4333_handle_locks 2>&1

  # End of csuite test tasks

  # Start of Python unit test tasks

  - name: unit-test
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "unit test"

  - name: unit-test-long
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "unit test"
        vars:
          unit_test_args: -v 2 --long

  - name: unit-linux-no-ftruncate-test
    depends_on:
    - name: compile-linux-no-ftruncate
    commands:
      - func: "fetch artifacts"
        vars:
          dependent_task: compile-linux-no-ftruncate
      - func: "unit test"

  # Break out Python unit tests into multiple buckets/tasks.  We have a fixed number of buckets,
  # and we use the -b option of the test/suite/run.py script to split up the tests.

  - name: unit-test-bucket00
    tags: ["pull_request", "unit_test"]
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} ${python_binary|python} ../test/suite/run.py -b 0/11 ${unit_test_args|-v 2} ${smp_command|} 2>&1

  - name: unit-test-bucket01
    tags: ["pull_request", "unit_test"]
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} ${python_binary|python} ../test/suite/run.py -b 1/11 ${unit_test_args|-v 2} ${smp_command|} 2>&1

  - name: unit-test-bucket02
    tags: ["pull_request", "unit_test"]
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} ${python_binary|python} ../test/suite/run.py -b 2/11 ${unit_test_args|-v 2} ${smp_command|} 2>&1

  - name: unit-test-bucket03
    tags: ["pull_request", "unit_test"]
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} ${python_binary|python} ../test/suite/run.py -b 3/11 ${unit_test_args|-v 2} ${smp_command|} 2>&1

  - name: unit-test-bucket04
    tags: ["pull_request", "unit_test"]
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} ${python_binary|python} ../test/suite/run.py -b 4/11 ${unit_test_args|-v 2} ${smp_command|} 2>&1

  - name: unit-test-bucket05
    tags: ["pull_request", "unit_test"]
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} ${python_binary|python} ../test/suite/run.py -b 5/11 ${unit_test_args|-v 2} ${smp_command|} 2>&1

  - name: unit-test-bucket06
    tags: ["pull_request", "unit_test"]
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} ${python_binary|python} ../test/suite/run.py -b 6/11 ${unit_test_args|-v 2} ${smp_command|} 2>&1

  - name: unit-test-bucket07
    tags: ["pull_request", "unit_test"]
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} ${python_binary|python} ../test/suite/run.py -b 7/11 ${unit_test_args|-v 2} ${smp_command|} 2>&1

  - name: unit-test-bucket08
    tags: ["pull_request", "unit_test"]
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} ${python_binary|python} ../test/suite/run.py -b 8/11 ${unit_test_args|-v 2} ${smp_command|} 2>&1

  - name: unit-test-bucket09
    tags: ["pull_request", "unit_test"]
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} ${python_binary|python} ../test/suite/run.py -b 9/11 ${unit_test_args|-v 2} ${smp_command|} 2>&1

  - name: unit-test-bucket10
    tags: ["pull_request", "unit_test"]
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} ${python_binary|python} ../test/suite/run.py -b 10/11 ${unit_test_args|-v 2} ${smp_command|} 2>&1

  # End of Python unit test tasks

  - name: s-all
    tags: ["pull_request"]
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/dist"
          script: |
            set -o errexit
            set -o verbose
            sh s_all -A -E 2>&1

  - name: conf-dump-test
    tags: ["pull_request"]
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix/test"
          script: |
            set -o errexit
            set -o verbose

            ${test_env_vars|} ${python_binary|python} ../../test/wtperf/test_conf_dump.py 2>&1

  - name: compile-windows-alt
    tags: ["pull_request", "windows_only"]
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger"
          script: |
            set -o errexit
            set -o verbose

            pip install scons==3.1.1
            scons-3.1.1.bat ${smp_command|} "CFLAGS=/Gv /wd4090 /wd4996 /we4047 /we4024 /TC /we4100 /we4133" wiredtiger.dll libwiredtiger.lib

  - name: scons-check
    tags: ["pull_request", "windows_only"]
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger"
          script: |
            set -o errexit
            set -o verbose

            pip install scons==3.1.1
            scons-3.1.1.bat ${smp_command|} check

  - name: fops
    tags: ["pull_request"]
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - command: shell.exec
        params:
          working_dir: "wiredtiger"
          script: |
            set -o errexit
            set -o verbose
            if [ "Windows_NT" = "$OS" ]; then
              cmd.exe /c t_fops.exe
            else
              build_posix/test/fops/t
            fi

  - name: million-collection-test
    commands:
      - func: "get project"
      - func: "fetch mongo-tests repo"
      - command: shell.exec
        params:
          working_dir: mongo-tests
          script: |
            sudo su
            set -o errexit
            set -o verbose
            ulimit -n 1000000
            ulimit -c unlimited
            largescale/run-million-collection-test.sh .

  - name: compatibility-test-for-releases
    commands:
      - func: "get project"
      - command: shell.exec
        params:
          working_dir: "wiredtiger"
          script: |
            set -o errexit
            set -o verbose
            test/evergreen/compatibility_test_for_releases.sh

  - name: generate-datafile-little-endian
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "compile wiredtiger"
      - func: "format test"
        vars:
          times: 10
          config: ../../../test/format/CONFIG.endian
          extra_args: -h "WT_TEST.$i"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix/test/format"
          shell: bash
          script: |
            set -o errexit
            set -o verbose
            # Archive the WT_TEST directories which include the generated wt data files
            tar -zcvf WT_TEST.tgz WT_TEST*
      - command: s3.put
        params:
          aws_secret: ${aws_secret}
          aws_key: ${aws_key}
          local_file: wiredtiger/build_posix/test/format/WT_TEST.tgz
          bucket: build_external
          permissions: public-read
          content_type: application/tar
          display_name: WT_TEST
          remote_file: wiredtiger/little-endian/${revision}/artifacts/WT_TEST.tgz

  - name: verify-datafile-little-endian
    depends_on:
    - name: compile
    - name: generate-datafile-little-endian
    commands:
      - func: "fetch artifacts"
      - func: "fetch artifacts from little-endian"
      - command: shell.exec
        params:
          working_dir: "wiredtiger"
          script: |
            set -o errexit
            set -o verbose
            ./test/evergreen/verify_wt_datafiles.sh 2>&1

  - name: verify-datafile-from-little-endian
    depends_on:
    - name: compile
    - name: generate-datafile-little-endian
      variant: little-endian
    commands:
      - func: "fetch artifacts"
      - func: "fetch artifacts from little-endian"
      - command: shell.exec
        params:
          working_dir: "wiredtiger"
          script: |
            set -o errexit
            set -o verbose
            ./test/evergreen/verify_wt_datafiles.sh 2>&1

  - name: generate-datafile-big-endian
    depends_on:
      - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "compile wiredtiger"
      - func: "format test"
        vars:
          times: 10
          config: ../../../test/format/CONFIG.endian
          extra_args: -h "WT_TEST.$i"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix/test/format"
          shell: bash
          script: |
            set -o errexit
            set -o verbose
            # Archive the WT_TEST directories which include the generated wt data files
            tar -zcvf WT_TEST.tgz WT_TEST*
      - command: s3.put
        params:
          aws_secret: ${aws_secret}
          aws_key: ${aws_key}
          local_file: wiredtiger/build_posix/test/format/WT_TEST.tgz
          bucket: build_external
          permissions: public-read
          content_type: application/tar
          display_name: WT_TEST
          remote_file: wiredtiger/big-endian/${revision}/artifacts/WT_TEST.tgz

  - name: verify-datafile-big-endian
    depends_on:
    - name: compile
    - name: generate-datafile-big-endian
    commands:
      - func: "fetch artifacts"
      - func: "fetch artifacts from big-endian"
      - command: shell.exec
        params:
          working_dir: "wiredtiger"
          script: |
            set -o errexit
            set -o verbose
            ./test/evergreen/verify_wt_datafiles.sh 2>&1

  - name: verify-datafile-from-big-endian
    depends_on:
    - name: compile
    - name: generate-datafile-big-endian
      variant: big-endian
    commands:
      - func: "fetch artifacts"
      - func: "fetch artifacts from big-endian"
      - command: shell.exec
        params:
          working_dir: "wiredtiger"
          script: |
            set -o errexit
            set -o verbose
            ./test/evergreen/verify_wt_datafiles.sh 2>&1

  - name: clang-analyzer
    tags: ["pull_request"]
    commands:
      - func: "get project"
      - command: shell.exec
        params:
          working_dir: "wiredtiger"
          script: |
            set -o errexit
            set -o verbose
            sh dist/s_clang-scan 2>&1

  - name: configure-combinations
    commands:
      - func: "get project"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/test/evergreen"
          script: |
            set -o errexit
            set -o verbose
            ./configure_combinations.sh ${smp_command|} 2>&1
      # Handle special build combination for running all the diagnostic tests.
      - func: "configure wiredtiger"
        vars:
          configure_env_vars: CC=/opt/mongodbtoolchain/v3/bin/gcc CXX=/opt/mongodbtoolchain/v3/bin/g++ PATH=/opt/mongodbtoolchain/v3/bin:$PATH CFLAGS="-g -Werror"
          posix_configure_flags: --enable-silent-rules --enable-diagnostic --disable-static
      - func: "make wiredtiger"
        vars:
          make_command: make all
      - func: "make check all"

  # Use format.sh to run tests in parallel (x4) for just under two hours (the
  # default Evergreen timeout) on the higher spec build distros. This allows
  # us to perform multiple test runs while ensuring a long-running config does
  # not result in an Evergreen test timeout failure.
  - name: linux-directio
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "compile wiredtiger"
      - func: "format test script"
        vars:
          format_test_script_args: -t 110 -j 4 direct_io=1

  # - name: linux-directio
  #   depends_on:
  #   - name: compile
  #   commands:
  #     - func: "fetch artifacts"
  #     - func: "compile wiredtiger"
  #     - func: "format test"
  #       vars:
  #         times: 3
  #         config: ../../../test/format/CONFIG.stress
  #         extra_args: -C "direct_io=[data]"

  - name: format-linux-no-ftruncate
    depends_on:
    - name: compile-linux-no-ftruncate
    commands:
      - func: "fetch artifacts"
        vars:
          dependent_task: compile-linux-no-ftruncate
      - func: "compile wiredtiger no linux ftruncate"
      - func: "format test"
        vars:
          times: 3

  - name: package
    commands:
      - func: "get project"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/dist"
          script: |
            set -o errexit
            set -o verbose
            env CC=/opt/mongodbtoolchain/v3/bin/gcc CXX=/opt/mongodbtoolchain/v3/bin/g++ PATH=/opt/mongodbtoolchain/v3/bin:/opt/java/jdk11/bin:$PATH sh s_release `date +%Y%m%d`

  - name: syscall-linux
    depends_on:
    - name: compile
    commands:
      - func: "fetch artifacts"
      - func: "compile wiredtiger"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/test/syscall"
          script: |
            set -o errexit
            set -o verbose
            ${python_binary|python} syscall.py --verbose --preserve

  - name: checkpoint-filetypes-test
    commands:
      - func: "get project"
      - func: "compile wiredtiger"
        vars:
          # Don't use diagnostic - this test looks for timing problems that are more likely to occur without it
          posix_configure_flags: --enable-strict
      - func: "checkpoint test"
        vars:
          checkpoint_args: -t m -n 1000000 -k 5000000 -C cache_size=100MB
      - func: "checkpoint test"
        vars:
          checkpoint_args: -t r -n 1000000 -k 5000000 -C cache_size=100MB
      - func: "checkpoint test"
        vars:
          checkpoint_args: -t c -n 1000000 -k 5000000 -C cache_size=100MB

  - name: coverage-report
    commands:
      - func: "get project"
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC=/opt/mongodbtoolchain/v3/bin/gcc CXX=/opt/mongodbtoolchain/v3/bin/g++ PATH=/opt/mongodbtoolchain/v3/bin:$PATH CFLAGS="--coverage -fPIC -ggdb" LDFLAGS=--coverage
          posix_configure_flags: --enable-silent-rules --enable-diagnostic --enable-strict --enable-python --with-builtins=lz4,snappy,zlib
      - func: "make check all"
      - func: "unit test"
        vars:
          unit_test_args: -v 2 --long
      - func: "format test"
        vars:
          extra_args: checkpoints=1 leak_memory=0 mmap=1 file_type=row compression=snappy logging=1 logging_compression=snappy logging_prealloc=1
      - func: "format test"
        vars:
          extra_args: checkpoints=1 leak_memory=0 mmap=1 file_type=row alter=1 backups=1 compaction=1 data_extend=1 prepare=1 rebalance=1 salvage=1 statistics=1 statistics_server=1 verify=1
      - func: "format test"
        vars:
          extra_args: checkpoints=1 leak_memory=0 mmap=1 file_type=row firstfit=1 internal_key_truncation=1
      - func: "format test"
        vars:
          extra_args: leak_memory=0 mmap=1 file_type=row checkpoints=0 in_memory=1 reverse=1 truncate=1
      - func: "format test"
        vars:
          extra_args: checkpoints=1 leak_memory=0 mmap=1 file_type=row compression=zlib huffman_key=1 huffman_value=1
      - func: "format test"
        vars:
          extra_args: checkpoints=1 leak_memory=0 mmap=1 file_type=row isolation=random transaction_timestamps=0
      - func: "format test"
        vars:
          extra_args: checkpoints=1 leak_memory=0 mmap=1 file_type=row data_source=lsm bloom=1
      - func: "format test"
        vars:
          extra_args: checkpoints=1 leak_memory=0 mmap=1 file_type=var compression=snappy checksum=uncompressed dictionary=1 repeat_data_pct=10
      - func: "format test"
        vars:
          extra_args: checkpoints=1 leak_memory=0 mmap=1 file_type=row compression=lz4 prefix_compression=1 leaf_page_max=9 internal_page_max=9 key_min=256 value_min=256
      - func: "format test"
        vars:
          extra_args: checkpoints=1 leak_memory=0 mmap=1 file_type=var leaf_page_max=9 internal_page_max=9 value_min=256
      - func: "format test"
        vars:
          extra_args: checkpoints=1 leak_memory=0 mmap=1 file_type=fix
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            GCOV=/opt/mongodbtoolchain/v3/bin/gcov gcovr -r .. -e '.*/bt_(debug|dump|misc|salvage|vrfy).*' -e '.*/(log|progress|verify_build|strerror|env_msg|err_file|cur_config|os_abort)\..*' -e '.*_stat\..*' --html -o ../coverage_report.html
      - command: s3.put
        params:
          aws_secret: ${aws_secret}
          aws_key: ${aws_key}
          local_file: wiredtiger/coverage_report.html
          bucket: build_external
          permissions: public-read
          content_type: text/html
          display_name: Coverage report
          remote_file: wiredtiger/${build_variant}/${revision}/coverage_report/coverage_report_${build_id}.html

  - name: spinlock-gcc-test
    commands:
      - func: "get project"
      - func: "compile wiredtiger"
        vars:
          posix_configure_flags: --enable-python --with-spinlock=gcc --enable-strict
      - func: "make check all"
      - func: "format test"
        vars:
          times: 3
      - func: "unit test"

  - name: spinlock-pthread-adaptive-test
    commands:
      - func: "get project"
      - func: "compile wiredtiger"
        vars:
          posix_configure_flags: --enable-python --with-spinlock=pthread_adaptive --enable-strict
      - func: "make check all"
      - func: "format test"
        vars:
          times: 3
      - func: "unit test"

  - name: wtperf-test
    depends_on:
      - name: compile-wtperf
    commands:
      - func: "fetch artifacts"
        vars:
          dependent_task: compile-wtperf
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose
            # The test will generate WT_TEST directory automatically
            dir=../bench/wtperf/stress
            for file in `ls $dir`
            do
              ./bench/wtperf/wtperf -O $dir/$file -o verbose=2
              cp -rf WT_TEST WT_TEST_$file
            done

  - name: ftruncate-test
    commands:
      - func: "get project"
      - func: "compile wiredtiger"
        vars:
          posix_configure_flags: ac_cv_func_ftruncate=no
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose
            # ${test_env_vars|} $(pwd)/../test/csuite/random_abort/smoke.sh 2>&1
            ${test_env_vars|} $(pwd)/../test/csuite/timestamp_abort/smoke.sh 2>&1
            ${test_env_vars|} $(pwd)/test/csuite/test_truncated_log 2>&1

  - name: long-test
    commands:
      - func: "get project"
      - func: "configure wiredtiger"
        vars:
          configure_env_vars: CC=/opt/mongodbtoolchain/v3/bin/gcc CXX=/opt/mongodbtoolchain/v3/bin/g++ PATH=/opt/mongodbtoolchain/v3/bin:$PATH CFLAGS="-g -Werror"
          posix_configure_flags: --enable-silent-rules --enable-diagnostic --disable-static
      - func: "make wiredtiger"

      # Run the long version of make check, that includes the full csuite tests
      - func: "make check all"
        vars:
          test_env_vars: ${test_env_vars} TESTUTIL_ENABLE_LONG_TESTS=1
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          script: |
            set -o errexit
            set -o verbose

            WT3363_CHECKPOINT_OP_RACES=1 test/csuite/./test_wt3363_checkpoint_op_races 2>&1

      # Many dbs test - Run with:
      # 1.  The defaults
      - func: "many dbs test"
      # 2.  Set idle flag to turn off operations.
      - func: "many dbs test"
        vars:
          many_db_args: -I
      # 3.  More dbs.
      - func: "many dbs test"
        vars:
          many_db_args: -D 40
      # 4.  With idle flag and more dbs.
      - func: "many dbs test"
        vars:
          many_db_args: -I -D 40

      # extended test/thread runs
      - func: "thread test"
        vars:
          thread_test_args: -t f
      - func: "thread test"
        vars:
          thread_test_args: -S -F -n 100000 -t f
      - func: "thread test"
        vars:
          thread_test_args: -t r
      - func: "thread test"
        vars:
          thread_test_args: -S -F -n 100000 -t r
      - func: "thread test"
        vars:
          thread_test_args: -t v
      - func: "thread test"
        vars:
          thread_test_args: -S -F -n 100000 -t v

      # random-abort - default (random time and number of threads)
      - func: "random abort test"
      # random-abort - minimum time, random number of threads
      - func: "random abort test"
        vars:
          random_abort_args: -t 10
      # random-abort - maximum time, random number of threads
      - func: "random abort test"
        vars:
          random_abort_args: -t 40

      # truncated-log
      - func: "truncated log test"

      # format test
      - func: "format test"
        vars:
          extra_args: file_type=fix
      - func: "format test"
        vars:
          extra_args: file_type=row

      #FIXME-WT-5270: Add wtperf testing from Jenkin "wiredtiger-test-check-long" after fixing WT-5270

  - name: time-shift-sensitivity-test
    depends_on:
    - name: compile
      vars:
        posix_configure_flags: --enable-strict
    commands:
      - func: "fetch artifacts"
        vars:
          posix_configure_flags: --enable-strict
      - command: shell.exec
        params:
          working_dir: "wiredtiger/test/csuite"
          script: |
            set -o errexit
            set -o verbose

            ./time_shift_test.sh /usr/local/lib/faketime/libfaketimeMT.so.1 0-1 2>&1

  - name: format-stress-sanitizer-test
    #set a 25 hours (25*60*60 = 90000 seconds) timeout
    exec_timeout_secs: 90000
    commands:
      - func: "get project"
      - func: "compile wiredtiger address sanitizer"
      - func: "format test script"
        vars:
          test_env_vars: ASAN_OPTIONS="detect_leaks=1:abort_on_error=1:disable_coredump=0" ASAN_SYMBOLIZER_PATH=/opt/mongodbtoolchain/v3/bin/llvm-symbolizer
          # run for 24 hours ( 24 * 60 = 1440 minutes), skip known errors, don't stop at failed tests, use default config
          format_test_script_args: -E -t 1440

  - name: format-stress-sanitizer-lsm-test
    commands:
      - func: "get project"
      - func: "compile wiredtiger address sanitizer"
      - func: "format test script"
        vars:
          test_env_vars: ASAN_OPTIONS="detect_leaks=1:abort_on_error=1:disable_coredump=0" ASAN_SYMBOLIZER_PATH=/opt/mongodbtoolchain/v3/bin/llvm-symbolizer
          # Run for 30 mins, and explicitly set data_source to LSM with a large cache
          format_test_script_args: -t 30 data_source=lsm cache_minimum=5000

  - name: format-stress-sanitizer-smoke-test
    #set a 7 hours timeout
    exec_timeout_secs: 25200
    commands:
      - func: "get project"
      - func: "compile wiredtiger address sanitizer"
      - func: "format test script"
        # to emulate the original Jenkins job's test coverage, we are running the smoke test 16 times
        # run smoke tests, skip known errors, don't stop at failed tests, use default config
        vars:
          test_env_vars: ASAN_OPTIONS="detect_leaks=1:abort_on_error=1:disable_coredump=0" ASAN_SYMBOLIZER_PATH=/opt/mongodbtoolchain/v3/bin/llvm-symbolizer
          format_test_script_args: -E -S
          times: 16

  - name: race-condition-stress-sanitizer-test
    # set an evergreen timeout of 25 hours
    exec_timeout_secs: 90000
    commands:
      - func: "get project"
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CC="/opt/mongodbtoolchain/v3/bin/clang -fsanitize=address" PATH=/opt/mongodbtoolchain/v3/bin:$PATH CFLAGS="-ggdb -fPIC -fno-omit-frame-pointer"
          posix_configure_flags: --enable-diagnostic --with-builtins=lz4,snappy,zlib
      - func: "format test script"
        vars:
          # set a format.sh timeout of 24 hours, skip known errors, don't stop at failed tests, use default config
          format_test_script_args: -E -R -t 1440
          test_env_vars: ASAN_OPTIONS="detect_leaks=1:abort_on_error=1:disable_coredump=0" ASAN_SYMBOLIZER_PATH=/opt/mongodbtoolchain/v3/bin/llvm-symbolizer

  - name: recovery-stress-test
    #set a 25 hours timeout
    exec_timeout_secs: 90000
    commands:
      - func: "get project"
      - func: "compile wiredtiger"
        vars:
          posix_configure_flags: --enable-strict --enable-diagnostic --with-builtins=lz4,snappy,zlib
      - func: "recovery stress test script"
        vars:
          # Repeat this script enough times to make this task run for 24 hours
          # At the time of writing this script, one call to underlying scripts takes about ~15 mins to finish in worst case.
          # We are giving an extra ~20% room for vairance in execution time.
          times: 80

  - name: split-stress-test
    commands:
      - func: "get project"
      - func: "compile wiredtiger"
        vars:
          configure_env_vars: CXX=/opt/mongodbtoolchain/v3/bin/g++ PATH=/opt/mongodbtoolchain/v3/bin:$PATH CFLAGS="-ggdb -fPIC"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/bench/workgen/runner"
          script: |
            set -o errexit
            set -o verbose
            for i in {1..10}; do ${python_binary|python} split_stress.py; done

  - name: format-stress-test
    # Set 25 hours timeout
    exec_timeout_secs: 90000
    commands:
      - func: "get project"
      - func: "compile wiredtiger with builtins"
      - func: "format test script"
        vars:
          #run for 24 hours ( 24 * 60 = 1440 minutes), use default config
          format_test_script_args: -b "SEGFAULT_SIGNALS=all catchsegv ./t" -t 1440

  - name: format-stress-smoke-test
    # Set 7 hours timeout
    exec_timeout_secs: 25200
    commands:
      - func: "get project"
      - func: "compile wiredtiger with builtins"
      - func: "format test script"
        vars:
          # to emulate the original Jenkins job's test coverage, we are running the smoke test 16 times
          # run smoke tests, use default config (-S)
          format_test_script_args: -b "SEGFAULT_SIGNALS=all catchsegv ./t" -S
          times: 16

  - name: checkpoint-stress-test
    commands:
      - command: timeout.update
        params:
          # set 24 hour timeout for the task and command
          exec_timeout_secs: 86400
          timeout_secs: 86400
      - func: "get project"
      - func: "compile wiredtiger with builtins"
      - func: "checkpoint stress test"
        vars:
          # No of times to run the loop
          times: 1
          # No of processes to run in the background
          no_of_procs: 8

  # The task name is ppc-zseries because this task will be used in both buildVariants
  - name: format-stress-ppc-zseries-test
    # Set 2.5 hours timeout (60 * 60 * 2.5)
    exec_timeout_secs: 9000
    commands:
      - func: "get project"
      - func: "compile wiredtiger with builtins"
      - func: "format test script"
        vars:
          # Make sure we dump core on failure
          format_test_setting: ulimit -c unlimited
          #run for 2 hours ( 2 * 60 = 120 minutes), use default config
          format_test_script_args: -b "SEGFAULT_SIGNALS=all catchsegv ./t" -t 120

  - name: format-wtperf-test
    commands:
      - func: "get project"
      - func: "compile wiredtiger with builtins"
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix/bench/wtperf"
          script: |
            set -o errexit
            set -o verbose

            cp ../../../bench/wtperf/split_heavy.wtperf .
            ./wtperf -O ./split_heavy.wtperf -o verbose=2

  - name: static-wt-build-test
    commands:
      - func: "get project"
      - func: "compile wiredtiger"
        vars:
          posix_configure_flags: --disable-shared --with-builtins=snappy,zlib
      - command: shell.exec
        params:
          working_dir: "wiredtiger/build_posix"
          shell: bash
          script: |
            set -o errexit
            set -o verbose

            # Delete wt util
            rm -f wt
            # Build static wt util
            make CC='eval "g++ -static"' ${smp_command|}
            # -V option displays Wiredtiger library version
            ./wt -V

            if [ $? -ne 0 ]; then
              echo "Error, WT util is not generated or is not functioning"
              exit 1
            fi

            ldd wt || wt_static_build=1

            if [ $wt_static_build -ne 1 ]; then
              echo "Error, WT util is not statically linked"
              exit 1
            fi

  - name: format-stress-sanitizer-ppc-test
    # Set 2.5 hours timeout (60 * 60 * 2.5)
    exec_timeout_secs: 9000
    commands:
      - func: "get project"
      - func: "compile wiredtiger"
        vars:
          # CC is set to the system default "clang" binary here as a workaround. Change it back to mongodbtoolchain "clang" binary after BUILD-10248 fix.
          configure_env_vars: CCAS=/opt/mongodbtoolchain/v3/bin/gcc CC=/usr/bin/clang CXX=/opt/mongodbtoolchain/v3/bin/clang++ PATH=/opt/mongodbtoolchain/v3/bin:$PATH CFLAGS="-ggdb -fPIC -fsanitize=address -fno-omit-frame-pointer -I/opt/mongodbtoolchain/v3/lib/gcc/ppc64le-mongodb-linux/8.2.0/include"
          posix_configure_flags: --enable-diagnostic --with-builtins=lz4,snappy,zlib
      - func: "format test script"
        vars:
          test_env_vars: ASAN_OPTIONS="detect_leaks=1:abort_on_error=1:disable_coredump=0" ASAN_SYMBOLIZER_PATH=`ls /usr/bin/llvm-symbolizer* | tail -1`
          # run for 2 hours ( 2 * 60 = 120 minutes), don't stop at failed tests, use default config
          format_test_script_args: -t 120

  - name: format-stress-sanitizer-smoke-ppc-test
    # Set 7 hours timeout (60 * 60 * 7)
    exec_timeout_secs: 25200
    commands:
      - func: "get project"
      - func: "compile wiredtiger"
        vars:
          # CC is set to the system default "clang" binary here as a workaround. Change it back to mongodbtoolchain "clang" binary after BUILD-10248 fix.
          configure_env_vars: CCAS=/opt/mongodbtoolchain/v3/bin/gcc CC=/usr/bin/clang CXX=/opt/mongodbtoolchain/v3/bin/clang++ PATH=/opt/mongodbtoolchain/v3/bin:$PATH CFLAGS="-ggdb -fPIC -fsanitize=address -fno-omit-frame-pointer -I/opt/mongodbtoolchain/v3/lib/gcc/ppc64le-mongodb-linux/8.2.0/include"
          posix_configure_flags: --enable-diagnostic --with-builtins=lz4,snappy,zlib
      - func: "format test script"
        # to emulate the original Jenkins job's test coverage, we are running the smoke test 16 times
        # run smoke tests, don't stop at failed tests, use default config
        vars:
          test_env_vars: ASAN_OPTIONS="detect_leaks=1:abort_on_error=1:disable_coredump=0" ASAN_SYMBOLIZER_PATH=`ls /usr/bin/llvm-symbolizer* | tail -1`
          format_test_script_args: -S
          times: 16

buildvariants:
- name: ubuntu1804
  display_name: Ubuntu 18.04
  run_on:
  - ubuntu1804-test
  expansions:
    test_env_vars: LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libeatmydata.so PATH=/opt/mongodbtoolchain/v3/bin:$PATH LD_LIBRARY_PATH=$(pwd)/.libs top_srcdir=$(pwd)/.. top_builddir=$(pwd)
    smp_command: -j $(echo "`grep -c ^processor /proc/cpuinfo` * 2" | bc)
    posix_configure_flags: --enable-silent-rules --enable-diagnostic --enable-python --enable-zlib --enable-snappy --enable-strict --enable-static --prefix=$(pwd)/LOCAL_INSTALL
    make_command: PATH=/opt/mongodbtoolchain/v3/bin:$PATH make
  tasks:
    - name: ".pull_request !.windows_only !.pull_request_compilers"
    - name: compile-msan
    - name: make-check-msan-test
    - name: compile-ubsan
    - name: ubsan-test
    - name: linux-directio
      distros: ubuntu1804-build
    - name: syscall-linux
    - name: make-check-asan-test
    - name: configure-combinations
    # - name: checkpoint-filetypes-test
    # - name: coverage-report
    - name: unit-test-long
    # - name: spinlock-gcc-test
    - name: spinlock-pthread-adaptive-test
    - name: compile-wtperf
    - name: wtperf-test
    - name: ftruncate-test
    - name: long-test
    - name: static-wt-build-test

- name: ubuntu1804-compilers
  display_name: Ubuntu 18.04 Compilers
  run_on:
  - ubuntu1804-wt-build
  expansions:
    posix_configure_flags: --enable-silent-rules --enable-diagnostic --enable-strict --enable-lz4 --enable-snappy --enable-zlib --enable-zstd --enable-python
    smp_command: -j $(grep -c ^processor /proc/cpuinfo)
    make_command: PATH=/opt/mongodbtoolchain/v3/bin:$PATH make
  tasks:
    - name: ".pull_request_compilers"

- name: ubuntu1804-python3
  display_name: Ubuntu 18.04 (Python3)
  run_on:
  - ubuntu1804-test
  expansions:
    test_env_vars: LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libeatmydata.so PATH=/opt/mongodbtoolchain/v3/bin:$PATH LD_LIBRARY_PATH=$(pwd)/.libs top_srcdir=$(pwd)/.. top_builddir=$(pwd)
    smp_command: -j $(grep -c ^processor /proc/cpuinfo)
    configure_python_setting: PYTHON=python3
    posix_configure_flags: --enable-silent-rules --enable-diagnostic --enable-python --enable-zlib --enable-snappy --enable-strict --enable-static --prefix=$(pwd)/LOCAL_INSTALL
    make_command: PATH=/opt/mongodbtoolchain/v3/bin:$PATH make
    python_binary: python3
  tasks:
    - name: compile
    - name: ".unit_test"
    - name: conf-dump-test

- name: ubuntu1804-stress-tests
  display_name: Ubuntu 18.04 Stress tests
  run_on:
  - ubuntu1804-test
  expansions:
    test_env_vars: LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libeatmydata.so PATH=/opt/mongodbtoolchain/v3/bin:$PATH LD_LIBRARY_PATH=$(pwd)/.libs top_srcdir=$(pwd)/.. top_builddir=$(pwd)
    smp_command: -j $(grep -c ^processor /proc/cpuinfo)
    posix_configure_flags: --enable-silent-rules --enable-diagnostic --enable-python --enable-zlib --enable-snappy --enable-strict --enable-static --prefix=$(pwd)/LOCAL_INSTALL
    make_command: PATH=/opt/mongodbtoolchain/v3/bin:$PATH make
  tasks:
    - name: recovery-stress-test
    - name: format-stress-sanitizer-test
    - name: format-stress-sanitizer-smoke-test
    - name: format-stress-sanitizer-lsm-test
    - name: split-stress-test
    - name: format-stress-test
    - name: format-stress-smoke-test
    - name: race-condition-stress-sanitizer-test
    - name: checkpoint-stress-test

- name: package
  display_name: Package
  batchtime: 1440 # 1 day
  run_on:
  - ubuntu1804-test
  tasks:
    - name: package

- name: linux-no-ftruncate
  display_name: Linux no ftruncate
  batchtime: 10080 # 1 day
  run_on:
  - ubuntu1804-test
  expansions:
    test_env_vars: LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libeatmydata.so PATH=/opt/mongodbtoolchain/v3/bin:$PATH LD_LIBRARY_PATH=$(pwd)/.libs top_srcdir=$(pwd)/.. top_builddir=$(pwd)
    smp_command: -j $(grep -c ^processor /proc/cpuinfo)
    make_command: PATH=/opt/mongodbtoolchain/v3/bin:$PATH make
  tasks:
    - name: compile-linux-no-ftruncate
    - name: make-check-linux-no-ftruncate-test
    - name: unit-linux-no-ftruncate-test
    - name: format-linux-no-ftruncate

- name: rhel80
  display_name: RHEL 8.0
  run_on:
  - rhel80-test
  expansions:
    test_env_vars: LD_PRELOAD=/usr/local/lib/libeatmydata.so PATH=/opt/mongodbtoolchain/v3/bin:$PATH LD_LIBRARY_PATH=$(pwd)/.libs top_srcdir=$(pwd)/.. top_builddir=$(pwd)
    smp_command: -j $(grep -c ^processor /proc/cpuinfo)
    make_command: PATH=/opt/mongodbtoolchain/v3/bin:$PATH make
  tasks:
    - name: compile
    - name: make-check-test
    - name: unit-test
    - name: fops
    - name: time-shift-sensitivity-test
    - name: compile-msan
    - name: make-check-msan-test
    - name: compile-ubsan
    - name: ubsan-test
    - name: linux-directio
      distros: rhel80-build
    - name: syscall-linux
    - name: compile-asan
    - name: make-check-asan-test
    # - name: checkpoint-filetypes-test
    - name: unit-test-long
    # - name: spinlock-gcc-test
    - name: spinlock-pthread-adaptive-test
    - name: compile-wtperf
    - name: wtperf-test
    - name: ftruncate-test
    - name: long-test
    - name: configure-combinations
    # - name: coverage-report

- name: large-scale-tests
  display_name: Large scale tests
  batchtime: 1440 # 1 day
  run_on:
  - rhel80-build
  tasks:
    - name: million-collection-test

- name: compatibility-tests
  display_name: Compatibility tests
  batchtime: 10080 # 7 days
  run_on:
  - ubuntu1804-test
  tasks:
    - name: compatibility-test-for-releases

- name: windows-64
  display_name: Windows 64-bit
  run_on:
  - windows-64-vs2017-test
  tasks:
    - name: compile
    - name: ".windows_only"
    - name: ".unit_test"
    - name: fops

- name: macos-1012
  display_name: OS X 10.12
  run_on:
  - macos-1012
  expansions:
    configure_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH CFLAGS="-ggdb -fPIC"
    posix_configure_flags: --enable-silent-rules --enable-diagnostic --enable-python --enable-zlib --enable-strict --enable-static --prefix=$(pwd)/LOCAL_INSTALL
    smp_command: -j $(sysctl -n hw.logicalcpu)
    make_command: PATH=/opt/mongodbtoolchain/v3/bin:$PATH ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future make
    test_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH DYLD_LIBRARY_PATH=$(pwd)/.libs top_srcdir=$(pwd)/.. top_builddir=$(pwd)
  tasks:
    - name: compile
    - name: make-check-test
    - name: unit-test
    - name: fops

- name: little-endian
  display_name: Little-endian (x86)
  run_on:
  - ubuntu1804-test
  batchtime: 10080 # 7 days
  expansions:
    smp_command: -j $(grep -c ^processor /proc/cpuinfo)
    test_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH LD_LIBRARY_PATH=$(pwd)/.libs top_srcdir=$(pwd)/.. top_builddir=$(pwd)
  tasks:
  - name: compile
  # - name: generate-datafile-little-endian
  # - name: verify-datafile-little-endian
  # - name: verify-datafile-from-big-endian

- name: big-endian
  display_name: Big-endian (s390x/zSeries)
  modules:
  - enterprise
  run_on:
  - ubuntu1804-zseries-build
  batchtime: 10080 # 7 days
  expansions:
    smp_command: -j $(grep -c ^processor /proc/cpuinfo)
    test_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH LD_LIBRARY_PATH=$(pwd)/.lib top_srcdir=$(pwd)/.. top_builddir=$(pwd)
  tasks:
  - name: compile
  # - name: generate-datafile-big-endian
  # - name: verify-datafile-big-endian
  # - name: verify-datafile-from-little-endian

- name: ubuntu1804-ppc
  display_name: Ubuntu 18.04 PPC
  run_on:
  - ubuntu1804-power8-test
  expansions:
    smp_command: -j $(grep -c ^processor /proc/cpuinfo)
    posix_configure_flags: --enable-silent-rules --enable-diagnostic --enable-python --enable-zlib --enable-snappy --enable-strict --enable-static --prefix=$(pwd)/LOCAL_INSTALL
    make_command: PATH=/opt/mongodbtoolchain/v3/bin:$PATH make
    test_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH LD_LIBRARY_PATH=$(pwd)/.libs top_srcdir=$(pwd)/.. top_builddir=$(pwd)
  tasks:
  - name: compile
  - name: unit-test
  - name: format-stress-ppc-zseries-test
  - name: format-stress-smoke-test
  - name: format-wtperf-test
  # Replace the below two tests with format-stress-sanitizer-ppc-test and format-stress-sanitizer-smoke-test after BUILD-10248 fix.
  - name: format-stress-sanitizer-ppc-test
  - name: format-stress-sanitizer-smoke-ppc-test

- name: ubuntu1804-zseries
  display_name: Ubuntu 18.04 zSeries
  run_on:
  - ubuntu1804-zseries-test
  expansions:
    smp_command: -j $(grep -c ^processor /proc/cpuinfo)
    posix_configure_flags: --enable-silent-rules --enable-diagnostic --enable-python --enable-zlib --enable-snappy --enable-strict --enable-static --prefix=$(pwd)/LOCAL_INSTALL
    make_command: PATH=/opt/mongodbtoolchain/v3/bin:$PATH make
    test_env_vars: PATH=/opt/mongodbtoolchain/v3/bin:$PATH LD_LIBRARY_PATH=$(pwd)/.libs:$(pwd)/lang/python top_srcdir=$(pwd)/.. top_builddir=$(pwd)
  tasks:
  - name: compile
  - name: unit-test
  - name: recovery-stress-test
  - name: split-stress-test
  - name: format-stress-ppc-zseries-test
  - name: format-stress-smoke-test