forked from dotnet/coreclr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
netci.groovy
executable file
·3831 lines (3382 loc) · 168 KB
/
netci.groovy
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
// Import the utility functionality.
import jobs.generation.*
// The input project name (e.g. dotnet/coreclr)
def project = GithubProject
// The input branch name (e.g. master)
def branch = GithubBranchName
def projectFolder = Utilities.getFolderName(project) + '/' + Utilities.getFolderName(branch)
// Create a folder for JIT stress jobs and associated folder views
folder('jitstress')
Utilities.addStandardFolderView(this, 'jitstress', project)
// Create a folder for testing via illink
folder('illink')
Utilities.addStandardFolderView(this, 'illink', project)
def static getOSGroup(def os) {
def osGroupMap = ['Ubuntu' : 'Linux',
'Ubuntu16.04' : 'Linux',
'Ubuntu16.10' : 'Linux',
'RHEL7.2' : 'Linux',
'Debian8.4' : 'Linux',
'Fedora24' : 'Linux',
'CentOS7.1' : 'Linux',
'Tizen' : 'Linux',
'OSX10.12' : 'OSX',
'Windows_NT' : 'Windows_NT']
def osGroup = osGroupMap.get(os, null)
assert osGroup != null : "Could not find os group for ${os}"
return osGroupMap[os]
}
// We use this class (vs variables) so that the static functions can access data here.
class Constants {
// We have very limited Windows ARM64 hardware (used for ARM/ARM64 testing) and Linux/arm32 and Linux/arm64 hardware.
// So only allow certain branches to use it.
def static LimitedHardwareBranches = [
'master']
// Innerloop build OS's
// The Windows_NT_BuildOnly OS is a way to speed up the Non-Windows builds by avoiding
// test execution in the build flow runs. It generates the exact same build
// as Windows_NT but without running the tests.
def static osList = [
'Ubuntu',
'Debian8.4',
'OSX10.12',
'Windows_NT',
'Windows_NT_BuildOnly',
'CentOS7.1',
'RHEL7.2',
'Ubuntu16.04',
'Ubuntu16.10',
'Fedora24',
'Tizen']
def static crossList = [
'Ubuntu',
'Debian8.4',
'OSX10.12',
'Windows_NT',
'CentOS7.1',
'RHEL7.2']
// This is a set of JIT stress modes combined with the set of variables that
// need to be set to actually enable that stress mode. The key of the map is the stress mode and
// the values are the environment variables
def static jitStressModeScenarios = [
'minopts' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JITMinOpts' : '1'],
'tieredcompilation' : ['COMPlus_TieredCompilation' : '1'], // this can be removed once tiered compilation is on by default
'no_tiered_compilation' : ['COMPlus_TieredCompilation' : '0'],
'no_tiered_compilation_innerloop': ['COMPlus_TieredCompilation' : '0'],
'forcerelocs' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_ForceRelocs' : '1'],
'jitstress1' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStress' : '1'],
'jitstress2' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStress' : '2'],
'jitstress1_tiered' : ['COMPlus_TieredCompilation' : '1', 'COMPlus_JitStress' : '1'],
'jitstress2_tiered' : ['COMPlus_TieredCompilation' : '1', 'COMPlus_JitStress' : '2'],
'jitstressregs1' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStressRegs' : '1'],
'jitstressregs2' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStressRegs' : '2'],
'jitstressregs3' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStressRegs' : '3'],
'jitstressregs4' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStressRegs' : '4'],
'jitstressregs8' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStressRegs' : '8'],
'jitstressregs0x10' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStressRegs' : '0x10'],
'jitstressregs0x80' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStressRegs' : '0x80'],
'jitstressregs0x1000' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStressRegs' : '0x1000'],
'jitstress2_jitstressregs1' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '1'],
'jitstress2_jitstressregs2' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '2'],
'jitstress2_jitstressregs3' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '3'],
'jitstress2_jitstressregs4' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '4'],
'jitstress2_jitstressregs8' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '8'],
'jitstress2_jitstressregs0x10' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '0x10'],
'jitstress2_jitstressregs0x80' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '0x80'],
'jitstress2_jitstressregs0x1000' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '0x1000'],
'tailcallstress' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_TailcallStress' : '1'],
'jitsse2only' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_EnableAVX' : '0', 'COMPlus_EnableSSE3_4' : '0'],
'jitnosimd' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_FeatureSIMD' : '0'],
'jitincompletehwintrinsic' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_EnableIncompleteISAClass' : '1'],
'jitx86hwintrinsicnoavx' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_EnableIncompleteISAClass' : '1', 'COMPlus_EnableAVX' : '0'], // testing the legacy SSE encoding
'jitx86hwintrinsicnoavx2' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_EnableIncompleteISAClass' : '1', 'COMPlus_EnableAVX2' : '0'], // testing SNB/IVB
'jitx86hwintrinsicnosimd' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_EnableIncompleteISAClass' : '1', 'COMPlus_FeatureSIMD' : '0'], // match "jitnosimd", may need to remove after decoupling HW intrinsic from FeatureSIMD
'jitnox86hwintrinsic' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_EnableIncompleteISAClass' : '1', 'COMPlus_EnableSSE' : '0' , 'COMPlus_EnableSSE2' : '0' , 'COMPlus_EnableSSE3' : '0' , 'COMPlus_EnableSSSE3' : '0' , 'COMPlus_EnableSSE41' : '0' , 'COMPlus_EnableSSE42' : '0' , 'COMPlus_EnableAVX' : '0' , 'COMPlus_EnableAVX2' : '0' , 'COMPlus_EnableAES' : '0' , 'COMPlus_EnableBMI1' : '0' , 'COMPlus_EnableBMI2' : '0' , 'COMPlus_EnableFMA' : '0' , 'COMPlus_EnableLZCNT' : '0' , 'COMPlus_EnablePCLMULQDQ' : '0' , 'COMPlus_EnablePOPCNT' : '0'],
'corefx_baseline' : ['COMPlus_TieredCompilation' : '0'], // corefx baseline
'corefx_minopts' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JITMinOpts' : '1'],
'corefx_tieredcompilation' : ['COMPlus_TieredCompilation' : '1'], // this can be removed once tiered compilation is on by default
'corefx_jitstress1' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStress' : '1'],
'corefx_jitstress2' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStress' : '2'],
'corefx_jitstressregs1' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStressRegs' : '1'],
'corefx_jitstressregs2' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStressRegs' : '2'],
'corefx_jitstressregs3' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStressRegs' : '3'],
'corefx_jitstressregs4' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStressRegs' : '4'],
'corefx_jitstressregs8' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStressRegs' : '8'],
'corefx_jitstressregs0x10' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStressRegs' : '0x10'],
'corefx_jitstressregs0x80' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStressRegs' : '0x80'],
'corefx_jitstressregs0x1000' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_JitStressRegs' : '0x1000'],
'gcstress0x3' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_GCStress' : '0x3'],
'gcstress0xc' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_GCStress' : '0xC'],
'zapdisable' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_ZapDisable' : '1', 'COMPlus_ReadyToRun' : '0'],
'heapverify1' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_HeapVerify' : '1'],
'gcstress0xc_zapdisable' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_GCStress' : '0xC', 'COMPlus_ZapDisable' : '1', 'COMPlus_ReadyToRun' : '0'],
'gcstress0xc_zapdisable_jitstress2' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_GCStress' : '0xC', 'COMPlus_ZapDisable' : '1', 'COMPlus_ReadyToRun' : '0', 'COMPlus_JitStress' : '2'],
'gcstress0xc_zapdisable_heapverify1' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_GCStress' : '0xC', 'COMPlus_ZapDisable' : '1', 'COMPlus_ReadyToRun' : '0', 'COMPlus_HeapVerify' : '1'],
'gcstress0xc_jitstress1' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_GCStress' : '0xC', 'COMPlus_JitStress' : '1'],
'gcstress0xc_jitstress2' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_GCStress' : '0xC', 'COMPlus_JitStress' : '2'],
'gcstress0xc_minopts_heapverify1' : ['COMPlus_TieredCompilation' : '0', 'COMPlus_GCStress' : '0xC', 'COMPlus_JITMinOpts' : '1', 'COMPlus_HeapVerify' : '1']
]
// This is a set of ReadyToRun stress scenarios
def static r2rStressScenarios = [
'r2r_jitstress1' : ['COMPlus_TieredCompilation' : '0', "COMPlus_JitStress": "1"],
'r2r_jitstress2' : ['COMPlus_TieredCompilation' : '0', "COMPlus_JitStress": "2"],
'r2r_jitstress1_tiered' : ['COMPlus_TieredCompilation' : '1', "COMPlus_JitStress": "1"],
'r2r_jitstress2_tiered' : ['COMPlus_TieredCompilation' : '1', "COMPlus_JitStress": "2"],
'r2r_jitstressregs1' : ['COMPlus_TieredCompilation' : '0', "COMPlus_JitStressRegs": "1"],
'r2r_jitstressregs2' : ['COMPlus_TieredCompilation' : '0', "COMPlus_JitStressRegs": "2"],
'r2r_jitstressregs3' : ['COMPlus_TieredCompilation' : '0', "COMPlus_JitStressRegs": "3"],
'r2r_jitstressregs4' : ['COMPlus_TieredCompilation' : '0', "COMPlus_JitStressRegs": "4"],
'r2r_jitstressregs8' : ['COMPlus_TieredCompilation' : '0', "COMPlus_JitStressRegs": "8"],
'r2r_jitstressregs0x10' : ['COMPlus_TieredCompilation' : '0', "COMPlus_JitStressRegs": "0x10"],
'r2r_jitstressregs0x80' : ['COMPlus_TieredCompilation' : '0', "COMPlus_JitStressRegs": "0x80"],
'r2r_jitstressregs0x1000' : ['COMPlus_TieredCompilation' : '0', "COMPlus_JitStressRegs": "0x1000"],
'r2r_jitminopts' : ['COMPlus_TieredCompilation' : '0', "COMPlus_JITMinOpts": "1"],
'r2r_jitforcerelocs' : ['COMPlus_TieredCompilation' : '0', "COMPlus_ForceRelocs": "1"],
'r2r_gcstress15' : ['COMPlus_TieredCompilation' : '0', "COMPlus_GCStress": "0xF"],
'r2r_no_tiered_compilation' : ['COMPlus_TieredCompilation' : '0'],
]
// This is the basic set of scenarios
def static basicScenarios = [
'innerloop',
'normal',
'ilrt',
'r2r',
'longgc',
'formatting',
'gcsimulator',
// 'jitdiff', // jitdiff is currently disabled, until someone spends the effort to make it fully work
'standalone_gc',
'gc_reliability_framework',
'illink',
'corefx_innerloop',
'crossgen_comparison',
'pmi_asm_diffs']
def static allScenarios = basicScenarios + r2rStressScenarios.keySet() + jitStressModeScenarios.keySet()
// Valid PR trigger combinations.
def static prTriggeredValidInnerLoopCombos = [
'Windows_NT': [
'x64': [
'Checked'
],
'x86': [
'Checked',
'Release'
],
'arm': [
'Debug',
'Checked'
],
'arm64': [
'Debug',
'Checked'
]
],
'Windows_NT_BuildOnly': [
'x64': [
'Checked',
'Release'
],
'x86': [
'Checked',
'Release'
],
'arm': [
'Checked'
],
],
'Ubuntu': [
'x64': [
'Checked'
],
'arm': [
'Checked'
]
],
'Ubuntu16.04': [
'arm64': [
'Checked'
]
],
'CentOS7.1': [
'x64': [
'Debug',
'Checked'
]
],
'OSX10.12': [
'x64': [
'Checked'
]
]
]
// A set of scenarios that are valid for arm/arm64 tests run on hardware. This is a map from valid scenario name
// to Tests.lst file categories to exclude.
//
// This list should contain a subset of the scenarios from `allScenarios`. Please keep this in the same order as that,
// and with the same values, with some commented out, for easier maintenance.
//
// Note that some scenarios that are commented out should be enabled, but haven't yet been.
//
def static validArmWindowsScenarios = [
'innerloop',
'normal',
// 'ilrt'
'r2r',
// 'longgc'
// 'formatting'
// 'gcsimulator'
// 'jitdiff'
// 'standalone_gc'
// 'gc_reliability_framework'
// 'illink'
// 'corefx_innerloop'
// 'crossgen_comparison'
// 'pmi_asm_diffs'
'r2r_jitstress1',
'r2r_jitstress2',
'r2r_jitstress1_tiered',
'r2r_jitstress2_tiered',
'r2r_jitstressregs1',
'r2r_jitstressregs2',
'r2r_jitstressregs3',
'r2r_jitstressregs4',
'r2r_jitstressregs8',
'r2r_jitstressregs0x10',
'r2r_jitstressregs0x80',
'r2r_jitstressregs0x1000',
'r2r_jitminopts',
'r2r_jitforcerelocs',
'r2r_gcstress15',
'r2r_no_tiered_compilation',
'minopts',
'tieredcompilation',
'no_tiered_compilation',
'no_tiered_compilation_innerloop',
'forcerelocs',
'jitstress1',
'jitstress2',
'jitstress1_tiered',
'jitstress2_tiered',
'jitstressregs1',
'jitstressregs2',
'jitstressregs3',
'jitstressregs4',
'jitstressregs8',
'jitstressregs0x10',
'jitstressregs0x80',
'jitstressregs0x1000',
'jitstress2_jitstressregs1',
'jitstress2_jitstressregs2',
'jitstress2_jitstressregs3',
'jitstress2_jitstressregs4',
'jitstress2_jitstressregs8',
'jitstress2_jitstressregs0x10',
'jitstress2_jitstressregs0x80',
'jitstress2_jitstressregs0x1000',
'tailcallstress',
// 'jitsse2only' // Only relevant to xarch
'jitnosimd', // Only interesting on platforms where SIMD support exists.
// 'jitincompletehwintrinsic'
// 'jitx86hwintrinsicnoavx'
// 'jitx86hwintrinsicnoavx2'
// 'jitx86hwintrinsicnosimd'
// 'jitnox86hwintrinsic'
'corefx_baseline', // corefx tests don't use smarty
'corefx_minopts', // corefx tests don't use smarty
'corefx_tieredcompilation', // corefx tests don't use smarty
'corefx_jitstress1', // corefx tests don't use smarty
'corefx_jitstress2', // corefx tests don't use smarty
'corefx_jitstressregs1', // corefx tests don't use smarty
'corefx_jitstressregs2', // corefx tests don't use smarty
'corefx_jitstressregs3', // corefx tests don't use smarty
'corefx_jitstressregs4', // corefx tests don't use smarty
'corefx_jitstressregs8', // corefx tests don't use smarty
'corefx_jitstressregs0x10', // corefx tests don't use smarty
'corefx_jitstressregs0x80', // corefx tests don't use smarty
'corefx_jitstressregs0x1000', // corefx tests don't use smarty
'gcstress0x3',
'gcstress0xc',
'zapdisable',
'heapverify1',
'gcstress0xc_zapdisable',
'gcstress0xc_zapdisable_jitstress2',
'gcstress0xc_zapdisable_heapverify1',
'gcstress0xc_jitstress1',
'gcstress0xc_jitstress2',
'gcstress0xc_minopts_heapverify1',
//
// NOTE: the following scenarios are not defined in the 'allScenarios' list! Is this a bug?
//
'minopts_zapdisable',
'gcstress0x3_jitstress1',
'gcstress0x3_jitstress2',
'gcstress0x3_jitstressregs1',
'gcstress0x3_jitstressregs2',
'gcstress0x3_jitstressregs3',
'gcstress0x3_jitstressregs4',
'gcstress0x3_jitstressregs8',
'gcstress0x3_jitstressregs0x10',
'gcstress0x3_jitstressregs0x80',
'gcstress0x3_jitstressregs0x1000',
'gcstress0xc_jitstressregs1',
'gcstress0xc_jitstressregs2',
'gcstress0xc_jitstressregs3',
'gcstress0xc_jitstressregs4',
'gcstress0xc_jitstressregs8',
'gcstress0xc_jitstressregs0x10',
'gcstress0xc_jitstressregs0x80',
'gcstress0xc_jitstressregs0x1000'
]
def static validLinuxArmScenarios = [
'innerloop',
'normal',
// 'ilrt'
'r2r',
// 'longgc'
// 'formatting'
// 'gcsimulator'
// 'jitdiff'
// 'standalone_gc'
// 'gc_reliability_framework'
// 'illink'
// 'corefx_innerloop'
'crossgen_comparison',
'pmi_asm_diffs',
'r2r_jitstress1',
'r2r_jitstress2',
'r2r_jitstress1_tiered',
'r2r_jitstress2_tiered',
'r2r_jitstressregs1',
'r2r_jitstressregs2',
'r2r_jitstressregs3',
'r2r_jitstressregs4',
'r2r_jitstressregs8',
'r2r_jitstressregs0x10',
'r2r_jitstressregs0x80',
'r2r_jitstressregs0x1000',
'r2r_jitminopts',
'r2r_jitforcerelocs',
'r2r_gcstress15',
'r2r_no_tiered_compilation',
'minopts',
'tieredcompilation',
'no_tiered_compilation',
'no_tiered_compilation_innerloop',
'forcerelocs',
'jitstress1',
'jitstress2',
'jitstress1_tiered',
'jitstress2_tiered',
'jitstressregs1',
'jitstressregs2',
'jitstressregs3',
'jitstressregs4',
'jitstressregs8',
'jitstressregs0x10',
'jitstressregs0x80',
'jitstressregs0x1000',
'jitstress2_jitstressregs1',
'jitstress2_jitstressregs2',
'jitstress2_jitstressregs3',
'jitstress2_jitstressregs4',
'jitstress2_jitstressregs8',
'jitstress2_jitstressregs0x10',
'jitstress2_jitstressregs0x80',
'jitstress2_jitstressregs0x1000',
'tailcallstress',
// 'jitsse2only' // Only relevant to xarch
// 'jitnosimd' // Only interesting on platforms where SIMD support exists.
// 'jitincompletehwintrinsic'
// 'jitx86hwintrinsicnoavx'
// 'jitx86hwintrinsicnoavx2'
// 'jitx86hwintrinsicnosimd'
// 'jitnox86hwintrinsic'
'corefx_baseline',
'corefx_minopts',
'corefx_tieredcompilation',
'corefx_jitstress1',
'corefx_jitstress2',
'corefx_jitstressregs1',
'corefx_jitstressregs2',
'corefx_jitstressregs3',
'corefx_jitstressregs4',
'corefx_jitstressregs8',
'corefx_jitstressregs0x10',
'corefx_jitstressregs0x80',
'corefx_jitstressregs0x1000',
'gcstress0x3',
'gcstress0xc',
'zapdisable',
'heapverify1',
'gcstress0xc_zapdisable',
'gcstress0xc_zapdisable_jitstress2',
'gcstress0xc_zapdisable_heapverify1',
'gcstress0xc_jitstress1',
'gcstress0xc_jitstress2',
'gcstress0xc_minopts_heapverify1'
]
def static validLinuxArm64Scenarios = [
'innerloop',
'normal',
// 'ilrt'
'r2r',
// 'longgc'
// 'formatting'
// 'gcsimulator'
// 'jitdiff'
// 'standalone_gc'
// 'gc_reliability_framework'
// 'illink'
// 'corefx_innerloop'
'crossgen_comparison',
'pmi_asm_diffs',
'r2r_jitstress1',
'r2r_jitstress2',
'r2r_jitstress1_tiered',
'r2r_jitstress2_tiered',
'r2r_jitstressregs1',
'r2r_jitstressregs2',
'r2r_jitstressregs3',
'r2r_jitstressregs4',
'r2r_jitstressregs8',
'r2r_jitstressregs0x10',
'r2r_jitstressregs0x80',
'r2r_jitstressregs0x1000',
'r2r_jitminopts',
'r2r_jitforcerelocs',
'r2r_gcstress15',
'r2r_no_tiered_compilation',
'minopts',
'tieredcompilation',
'no_tiered_compilation',
'no_tiered_compilation_innerloop',
'forcerelocs',
'jitstress1',
'jitstress2',
'jitstress1_tiered',
'jitstress2_tiered',
'jitstressregs1',
'jitstressregs2',
'jitstressregs3',
'jitstressregs4',
'jitstressregs8',
'jitstressregs0x10',
'jitstressregs0x80',
'jitstressregs0x1000',
'jitstress2_jitstressregs1',
'jitstress2_jitstressregs2',
'jitstress2_jitstressregs3',
'jitstress2_jitstressregs4',
'jitstress2_jitstressregs8',
'jitstress2_jitstressregs0x10',
'jitstress2_jitstressregs0x80',
'jitstress2_jitstressregs0x1000',
'tailcallstress',
// 'jitsse2only' // Only relevant to xarch
'jitnosimd', // Only interesting on platforms where SIMD support exists.
// 'jitincompletehwintrinsic'
// 'jitx86hwintrinsicnoavx'
// 'jitx86hwintrinsicnoavx2'
// 'jitx86hwintrinsicnosimd'
// 'jitnox86hwintrinsic'
'corefx_baseline',
'corefx_minopts',
'corefx_tieredcompilation',
'corefx_jitstress1',
'corefx_jitstress2',
'corefx_jitstressregs1',
'corefx_jitstressregs2',
'corefx_jitstressregs3',
'corefx_jitstressregs4',
'corefx_jitstressregs8',
'corefx_jitstressregs0x10',
'corefx_jitstressregs0x80',
'corefx_jitstressregs0x1000',
'gcstress0x3',
'gcstress0xc',
'zapdisable',
'heapverify1',
'gcstress0xc_zapdisable',
'gcstress0xc_zapdisable_jitstress2',
'gcstress0xc_zapdisable_heapverify1',
'gcstress0xc_jitstress1',
'gcstress0xc_jitstress2',
'gcstress0xc_minopts_heapverify1'
]
def static configurationList = ['Debug', 'Checked', 'Release']
// This is the set of architectures
// Some of these are pseudo-architectures:
// armem -- ARM builds/runs using an emulator. Used for Tizen runs.
def static architectureList = ['arm', 'armem', 'arm64', 'x64', 'x86']
// This set of architectures that cross build on Windows and run on Windows ARM64 hardware.
def static armWindowsCrossArchitectureList = ['arm', 'arm64']
}
// **************************************************************
// Create some specific views
//
// These aren't using the Utilities.addStandardFolderView() function, because that creates
// views based on a single regular expression. These views will be generated by adding a
// specific set of jobs to them.
//
// Utilities.addStandardFolderView() also creates a lot of additional stuff around the
// view, like "Build Statistics", "Job Statistics", "Unstable Jobs". Until it is determined
// those are required, don't add them (which simplifies the view pages, as well).
// **************************************************************
class Views {
def static MergeJobView = null
def static PeriodicJobView = null
def static ArchitectureViews = [:]
def static OSViews = [:]
}
// MergeJobView: include all jobs that execute when a PR change is merged.
Views.MergeJobView = listView('Merge') {
recurse()
columns {
status()
weather()
name()
lastSuccess()
lastFailure()
lastDuration()
buildButton()
}
}
// PeriodicJobView: include all jobs that execute on a schedule
Views.PeriodicJobView = listView('Periodic') {
recurse()
columns {
status()
weather()
name()
lastSuccess()
lastFailure()
lastDuration()
buildButton()
}
}
// Create a view for non-PR jobs for each architecture.
Constants.architectureList.each { architecture ->
Views.ArchitectureViews[architecture] = listView(architecture) {
recurse()
columns {
status()
weather()
name()
lastSuccess()
lastFailure()
lastDuration()
buildButton()
}
}
}
// Create a view for non-PR jobs for each OS.
Constants.osList.each { os ->
// Don't create one for the special 'Windows_NT_BuildOnly'
if (os == 'Windows_NT_BuildOnly') {
return
}
Views.OSViews[os] = listView(os) {
recurse()
columns {
status()
weather()
name()
lastSuccess()
lastFailure()
lastDuration()
buildButton()
}
}
}
def static addToMergeView(def job) {
Views.MergeJobView.with {
jobs {
name(job.name)
}
}
}
def static addToPeriodicView(def job) {
Views.PeriodicJobView.with {
jobs {
name(job.name)
}
}
}
def static addToViews(def job, def isFlowJob, def isPR, def architecture, def os, def configuration, def scenario) {
if (isPR) {
// No views want PR jobs currently.
return
}
// We don't want to include in view any job that is only used by a flow job (because we want the views to have only the
// "top-level" jobs. Build only jobs are such jobs.
if (os == 'Windows_NT_BuildOnly') {
return
}
if (!isFlowJob) {
// For non-flow jobs, which ones are only used by flow jobs?
if ((architecture == 'arm') || (architecture == 'arm64')) {
if (isCoreFxScenario(scenario)) {
// We have corefx-specific scenario builds for each of the runs, but these are driven by flow jobs.
return
}
// We're left with the basic normal/innerloop builds. We might want to remove these from the views also, if desired.
// However, there are a few, like the Debug Build, that is build only, not "Build and Test", that we should leave.
}
}
// Add to architecture view.
Views.ArchitectureViews[architecture].with {
jobs {
name(job.name)
}
}
// Add to OS view.
Views.OSViews[os].with {
jobs {
name(job.name)
}
}
}
def static addPeriodicTriggerHelper(def job, String cronString, boolean alwaysRuns = false) {
addToPeriodicView(job)
Utilities.addPeriodicTrigger(job, cronString, alwaysRuns)
}
def static addGithubPushTriggerHelper(def job) {
addToMergeView(job)
Utilities.addGithubPushTrigger(job)
}
def static setMachineAffinity(def job, def os, def architecture, def options = null) {
assert os instanceof String
assert architecture instanceof String
def armArches = ['arm', 'armem', 'arm64']
if (!(architecture in armArches)) {
assert options == null
Utilities.setMachineAffinity(job, os, 'latest-or-auto')
return
}
// This is an arm(64) job.
//
// There are several options.
//
// Windows_NT
//
// Arm32 (Build) -> latest-arm64
// |-> os == "Windows_NT" && (architecture == "arm") && options['use_arm64_build_machine'] == true
// Arm32 (Test) -> arm64-windows_nt
// |-> os == "Windows_NT" && (architecture == "arm") && options['use_arm64_build_machine'] == false
//
// Arm64 (Build) -> latest-arm64
// |-> os == "Windows_NT" && architecture == "arm64" && options['use_arm64_build_machine'] == true
// Arm64 (Test) -> arm64-windows_nt
// |-> os == "Windows_NT" && architecture == "arm64" && options['use_arm64_build_machine'] == false
//
// Ubuntu
//
// Arm32 emulator (Build, Test) -> arm-cross-latest
// |-> os == "Tizen" && (architecture == "armem")
//
// Arm32 hardware (Flow) -> Ubuntu 16.04 latest-or-auto (don't use limited arm hardware)
// |-> os == "Ubuntu" && (architecture == "arm") && options['is_flow_job'] == true
// Arm32 hardware (Build) -> Ubuntu 16.04 latest-or-auto
// |-> os == "Ubuntu" && (architecture == "arm") && options['is_build_job'] == true
// Arm32 hardware (Test) -> Helix ubuntu.1404.arm32.open queue
// |-> os == "Ubuntu" && (architecture == "arm")
//
// Arm64 (Build) -> arm64-cross-latest
// |-> os != "Windows_NT" && architecture == "arm64" && options['is_build_job'] == true
// Arm64 (Test) -> Helix Ubuntu.1604.Arm64.Iron.Open queue
// |-> os != "Windows_NT" && architecture == "arm64"
//
// Note: we are no longer using Jenkins tags "arm64-huge-page-size", "arm64-small-page-size".
// Support for Linux arm64 large page size has been removed for now, as it wasn't being used.
//
// Note: we are no longer using Jenkins tag 'latest-arm64' for arm/arm64 Windows build machines. Instead,
// we are using public VS2017 arm/arm64 tools in a VM from Helix.
// This has to be a arm arch
assert architecture in armArches
if (os == "Windows_NT") {
// arm32/arm64 Windows jobs share the same machines for now
def isBuild = options['use_arm64_build_machine'] == true
if (isBuild == true) {
job.with {
label('Windows.10.Amd64.ClientRS4.DevEx.Open')
}
} else {
Utilities.setMachineAffinity(job, 'windows.10.arm64.open')
}
} else {
assert os != 'Windows_NT'
if (architecture == 'armem') {
// arm emulator (Tizen). Build and test on same machine,
// using Docker.
assert os == 'Tizen'
Utilities.setMachineAffinity(job, 'Ubuntu', 'arm-cross-latest')
}
else {
// arm/arm64 Ubuntu on hardware.
assert architecture == 'arm' || architecture == 'arm64'
def isFlow = (options != null) && (options['is_flow_job'] == true)
def isBuild = (options != null) && (options['is_build_job'] == true)
if (isFlow || isBuild) {
// arm/arm64 Ubuntu build machine. Build uses docker, so the actual host OS is not
// very important. Therefore, use latest or auto. Flow jobs don't need to use arm hardware.
Utilities.setMachineAffinity(job, 'Ubuntu16.04', 'latest-or-auto')
} else {
// arm/arm64 Ubuntu test machine. Specify the Helix queue name here.
if (architecture == 'arm64') {
assert os == 'Ubuntu16.04'
job.with {
label('Ubuntu.1604.Arm64.Iron.Open')
}
}
else {
assert os == 'Ubuntu'
job.with {
label('ubuntu.1404.arm32.open')
}
}
}
}
}
}
// setJobMachineAffinity: compute the machine affinity options for a job,
// then set the job with those affinity options.
def static setJobMachineAffinity(def architecture, def os, def isBuildJob, def isTestJob, def isFlowJob, def job)
{
assert (isBuildJob && !isTestJob && !isFlowJob) ||
(!isBuildJob && isTestJob && !isFlowJob) ||
(!isBuildJob && !isTestJob && isFlowJob)
def affinityOptions = null
def affinityArchitecture = architecture
if (os == "Windows_NT") {
if (architecture in Constants.armWindowsCrossArchitectureList) {
if (isBuildJob) {
affinityOptions = [ "use_arm64_build_machine" : true ]
} else if (isTestJob) {
affinityOptions = [ "use_arm64_build_machine" : false ]
} else if (isFlowJob) {
// For the flow jobs set the machine affinity as x64
affinityArchitecture = 'x64'
}
}
}
else {
if ((architecture == 'arm64') || (architecture == 'arm')) {
if (isBuildJob) {
affinityOptions = ['is_build_job': true]
} else if (isFlowJob) {
affinityOptions = ['is_flow_job': true]
}
}
}
setMachineAffinity(job, os, affinityArchitecture, affinityOptions)
}
def static isGCStressRelatedTesting(def scenario) {
// The 'r2r_gcstress15' scenario is a basic scenario.
// Detect it and make it a GCStress related.
if (scenario == 'r2r_gcstress15')
{
return true;
}
def gcStressTestEnvVars = [ 'COMPlus_GCStress', 'COMPlus_ZapDisable', 'COMPlus_HeapVerify']
def scenarioName = scenario.toLowerCase()
def isGCStressTesting = false
Constants.jitStressModeScenarios[scenario].each{ k, v ->
if (k in gcStressTestEnvVars) {
isGCStressTesting = true;
}
}
return isGCStressTesting
}
def static isCoreFxScenario(def scenario) {
def corefx_prefix = 'corefx_'
if (scenario.length() < corefx_prefix.length()) {
return false
}
return scenario.substring(0,corefx_prefix.length()) == corefx_prefix
}
def static isR2RBaselineScenario(def scenario) {
return (scenario == 'r2r')
}
def static isR2RStressScenario(def scenario) {
return Constants.r2rStressScenarios.containsKey(scenario)
}
def static isR2RScenario(def scenario) {
return isR2RBaselineScenario(scenario) || isR2RStressScenario(scenario)
}
def static isJitStressScenario(def scenario) {
return Constants.jitStressModeScenarios.containsKey(scenario)
}
def static isLongGc(def scenario) {
return (scenario == 'longgc' || scenario == 'gcsimulator')
}
def static isJitDiff(def scenario) {
return (scenario == 'jitdiff')
}
def static isGcReliabilityFramework(def scenario) {
return (scenario == 'gc_reliability_framework')
}
def static isArmWindowsScenario(def scenario) {
return Constants.validArmWindowsScenarios.contains(scenario)
}
def static isValidPrTriggeredInnerLoopJob(os, architecture, configuration, isBuildOnly) {
if (isBuildOnly == true) {
os = 'Windows_NT_BuildOnly'
}
def validOsPrTriggerArchConfigs = Constants.prTriggeredValidInnerLoopCombos[os]
if (validOsPrTriggerArchConfigs != null) {
def validOsPrTriggerConfigs = validOsPrTriggerArchConfigs[architecture]
if (validOsPrTriggerConfigs != null) {
if (configuration in validOsPrTriggerConfigs) {
return true
}
}
}
return false
}
// This means the job builds and runs the 'innerloop' test set. This does not mean the job is
// scheduled with a default PR trigger despite the correlation being true at the moment.
def static isInnerloopTestScenario(def scenario) {
return (scenario == 'innerloop' || scenario == 'no_tiered_compilation_innerloop')
}
def static isCrossGenComparisonScenario(def scenario) {
return (scenario == 'crossgen_comparison')
}
def static shouldGenerateCrossGenComparisonJob(def os, def architecture, def configuration, def scenario) {
assert isCrossGenComparisonScenario(scenario)
return ((os == 'Ubuntu' && architecture == 'arm') || (os == 'Ubuntu16.04' && architecture == 'arm64')) && (configuration == 'Checked' || configuration == 'Release')
}
def static getFxBranch(def branch) {
def fxBranch = branch
// Map 'dev/unix_test_workflow' to 'master' so we can test CoreFX jobs in the CoreCLR dev/unix_test_workflow
// branch even though CoreFX doesn't have such a branch.
if (branch == 'dev/unix_test_workflow') {
fxBranch = 'master'
}
return fxBranch
}
def static setJobTimeout(newJob, isPR, architecture, configuration, scenario, isBuildOnly) {
// 2 hours (120 minutes) is the default timeout
def timeout = 120
if (!isInnerloopTestScenario(scenario)) {
// Pri-1 test builds take a long time (see calculateBuildCommands()). So up the Pri-1 build jobs timeout.
timeout = 240
}
if (!isBuildOnly) {
// Note that these can only increase, never decrease, the Pri-1 timeout possibly set above.
if (isGCStressRelatedTesting(scenario)) {
timeout = 4320
}
else if (isCoreFxScenario(scenario)) {
timeout = 360
}
else if (isJitStressScenario(scenario)) {
timeout = 300
}
else if (isR2RBaselineScenario(scenario)) {
timeout = 240
}
else if (isLongGc(scenario)) {
timeout = 1440
}
else if (isJitDiff(scenario)) {
timeout = 240
}
else if (isGcReliabilityFramework(scenario)) {
timeout = 1440
}
else if (architecture == 'armem' || architecture == 'arm64') {
timeout = 240
}
if (architecture == 'arm') {
// ARM32 machines are particularly slow.
timeout += 120
}
}
if (configuration == 'Debug') {
// Debug runs can be very slow. Add an hour.
timeout += 60
}
// If we've changed the timeout from the default, set it in the job.
if (timeout != 120) {
Utilities.setJobTimeout(newJob, timeout)
}
}
def static getJobFolder(def scenario) {
if (isJitStressScenario(scenario) || isR2RStressScenario(scenario)) {
return 'jitstress'
}
if (scenario == 'illink') {
return 'illink'
}
return ''
}
def static getStressModeDisplayName(def scenario) {
def displayStr = ''
Constants.jitStressModeScenarios[scenario].each{ k, v ->
def prefixLength = 'COMPlus_'.length()
if (k.length() >= prefixLength) {
def modeName = k.substring(prefixLength, k.length())
if (displayStr != '') {
// Separate multiple variables with a space.
displayStr += ' '
}