-
Notifications
You must be signed in to change notification settings - Fork 155
/
Makefile
1434 lines (1278 loc) · 61 KB
/
Makefile
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
Q := @
, := ,
PROJECT_ROOT := ${PWD}
TRACER_SOURCE_DIR := $(PROJECT_ROOT)/src/
ASAN ?= $(shell ldd $(shell which php) 2>/dev/null | grep -q asan && echo 1)
SHELL = /bin/bash
APPSEC_SOURCE_DIR = $(PROJECT_ROOT)/appsec/
BUILD_SUFFIX = extension
BUILD_DIR_NAME = tmp/build_$(BUILD_SUFFIX)
BUILD_DIR = $(PROJECT_ROOT)/$(BUILD_DIR_NAME)
BUILD_DIR_APPSEC = $(BUILD_DIR)/appsec/
ZAI_BUILD_DIR = $(PROJECT_ROOT)/tmp/build_zai$(if $(ASAN),_asan)
TEA_BUILD_DIR = $(PROJECT_ROOT)/tmp/build_tea$(if $(ASAN),_asan)
TEA_INSTALL_DIR = $(TEA_BUILD_DIR)/opt
TEA_BUILD_TESTS ?= OFF
TEA_BUILD_BENCHMARKS ?= OFF
TEA_BENCHMARK_REPETITIONS ?= 10
# Note: If the tea benchmark format or output is changed, make changes to ./benchmark/runall.sh
TEA_BENCHMARK_FORMAT ?= json
TEA_BENCHMARK_OUTPUT ?= $(PROJECT_ROOT)/tea/benchmarks/reports/tracer-tea-bench-results.$(TEA_BENCHMARK_FORMAT)
BENCHMARK_EXTRA ?=
COMPONENTS_BUILD_DIR = $(PROJECT_ROOT)/tmp/build_components
SO_FILE = $(BUILD_DIR)/modules/ddtrace.so
AR_FILE = $(BUILD_DIR)/modules/ddtrace.a
WALL_FLAGS = -Wall -Wextra
CFLAGS ?= $(shell [ -n "${DD_TRACE_DOCKER_DEBUG}" ] && echo -O0 || echo -O2) -g $(WALL_FLAGS)
LDFLAGS ?=
PHP_EXTENSION_DIR = $(shell ASAN_OPTIONS=detect_leaks=0 php -r 'print ini_get("extension_dir");')
PHP_MAJOR_MINOR = $(shell ASAN_OPTIONS=detect_leaks=0 php -r 'echo PHP_MAJOR_VERSION . PHP_MINOR_VERSION;')
ARCHITECTURE = $(shell uname -m)
QUIET_TESTS := ${CIRCLE_SHA1}
RUST_DEBUG_BUILD ?= $(shell [ -n "${DD_TRACE_DOCKER_DEBUG}" ] && echo 1)
EXTRA_CONFIGURE_OPTIONS ?=
ASSUME_COMPILED := ${DD_TRACE_ASSUME_COMPILED}
MAX_TEST_PARALLELISM ?= $(shell nproc)
VERSION := $(shell cat VERSION)
INI_FILE := $(shell ASAN_OPTIONS=detect_leaks=0 php -i | awk -F"=>" '/Scan this dir for additional .ini files/ {print $$2}')/ddtrace.ini
RUN_TESTS_IS_PARALLEL ?= $(shell test $(PHP_MAJOR_MINOR) -ge 74 && echo 1)
# shuffle parallel tests to evenly distribute test load, avoiding a batch of 32 tests being request-replayer tests
RUN_TESTS_CMD := REPORT_EXIT_STATUS=1 TEST_PHP_SRCDIR=$(PROJECT_ROOT) USE_TRACKED_ALLOC=1 php -n -d 'memory_limit=-1' $(BUILD_DIR)/run-tests.php $(if $(QUIET_TESTS),,-g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP) $(if $(ASAN), --asan) --show-diff -n -p $(shell which php) -q $(if $(RUN_TESTS_IS_PARALLEL), --shuffle -j$(MAX_TEST_PARALLELISM))
C_FILES = $(shell find components components-rs ext src/dogstatsd zend_abstract_interface -name '*.c' -o -name '*.h' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' )
TEST_FILES = $(shell find tests/ext -name '*.php*' -o -name '*.inc' -o -name '*.json' -o -name 'CONFLICTS' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' )
RUST_FILES = $(BUILD_DIR)/Cargo.toml $(BUILD_DIR)/Cargo.lock $(shell find components-rs -name '*.c' -o -name '*.rs' -o -name 'Cargo.toml' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' ) $(shell find libdatadog/{alloc,build-common,crashtracker,crashtracker-ffi,data-pipeline,ddcommon,ddcommon-ffi,ddsketch,ddtelemetry,ddtelemetry-ffi,dogstatsd-client,dynamic-configuration,ipc,live-debugger,live-debugger-ffi,remote-config,sidecar,sidecar-ffi,spawn_worker,tinybytes,tools/{cc_utils,sidecar_mockgen},trace-*,Cargo.toml} -type f \( -path "*/src*" -o -path "*/examples*" -o -path "*Cargo.toml" -o -path "*/build.rs" -o -path "*/tests/dataservice.rs" -o -path "*/tests/service_functional.rs" \) -not -path "*/ipc/build.rs" -not -path "*/sidecar-ffi/build.rs")
ALL_OBJECT_FILES = $(C_FILES) $(RUST_FILES) $(BUILD_DIR)/Makefile
TEST_OPCACHE_FILES = $(shell find tests/opcache -name '*.php*' -o -name '.gitkeep' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' )
TEST_STUB_FILES = $(shell find tests/ext -type d -name 'stubs' -exec find '{}' -type f \; | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' )
INIT_HOOK_TEST_FILES = $(shell find tests/C2PHP -name '*.phpt' -o -name '*.inc' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' )
M4_FILES = $(shell find m4 -name '*.m4*' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' ) $(BUILD_DIR)/config.m4
XDEBUG_SO_FILE = $(shell find $(shell php-config --extension-dir) -type f -name "xdebug*.so" -exec basename {} \; | tail -n 1)
# Make 'sed -i' portable
ifeq ($(shell { sed --version 2>&1 || echo ''; } | grep GNU > /dev/null && echo GNU || true),GNU)
SED_I = sed -i
else
SED_I = sed -i ''
endif
all: $(BUILD_DIR)/configure $(SO_FILE)
# The following differentiation exists so we can build only (but always) the relevant files while executing tests
# - when a `.phpt` changes, we only copy the file to the build dir and we DO NOT rebuild
# - when a `.c` changes, we copy the file to the build dir and we DO the specific .lo build and linking
# - when a `.h` (or anything else) changes, we remove all .lo files from the build directory so a full build is done
# The latter, avoids that during development we change something in a header included in multiple .c files, then we
# change only one of those .c files, we only rebuild that one, we SEGFAULT.
#
# Note: while this adds some complexity, as a matter of facts it does not impact production builds in CI which are done
# from scratch. But the benefits are that we can have the quickest possible `modify --> test` cycle possible.
$(BUILD_DIR)/tests/%: tests/%
$(Q) echo Copying tests/$* to $@
$(Q) mkdir -p $(dir $@)
$(Q) cp -a tests/$* $@
$(BUILD_DIR)/%.c: %.c
$(Q) echo Copying $*.c to $@
$(Q) mkdir -p $(dir $@)
$(Q) cp -a $*.c $@
$(BUILD_DIR)/%Cargo.toml: %Cargo.toml
$(Q) echo Copying $*Cargo.toml to $@
$(Q) mkdir -p $(dir $@)
$(Q) cp -a $*Cargo.toml $@
$(SED_I) -E 's/"\.\.\/([^"]*)"/"..\/..\/..\/\1"/' $@
$(BUILD_DIR)/Cargo.toml: Cargo.toml
$(Q) echo Copying Cargo.toml to $@
$(Q) mkdir -p $(dir $@)
$(Q) cp -a Cargo.toml $@
$(SED_I) -E 's/, "profiling",?//' $@
$(BUILD_DIR)/%: %
$(Q) echo Copying $* to $@
$(Q) mkdir -p $(dir $@)
$(Q) cp -a $* $@
$(Q) rm -f tmp/build_extension/ext/**/*.lo
JUNIT_RESULTS_DIR := $(shell pwd)
all: $(BUILD_DIR)/configure $(SO_FILE)
$(BUILD_DIR)/configure: $(M4_FILES) $(BUILD_DIR)/ddtrace.sym $(BUILD_DIR)/VERSION
$(Q) (cd $(BUILD_DIR); phpize && $(SED_I) 's/\/FAILED/\/\\bFAILED/' $(BUILD_DIR)/run-tests.php) # Fix PHP 5.4 exit code bug when running selected tests (FAILED vs XFAILED)
$(BUILD_DIR)/run-tests.php: $(if $(ASSUME_COMPILED),, $(BUILD_DIR)/configure)
$(if $(ASSUME_COMPILED), cp $(shell dirname $(shell realpath $(shell which phpize)))/../lib/php/build/run-tests.php $(BUILD_DIR)/run-tests.php)
$(BUILD_DIR)/Makefile: $(BUILD_DIR)/configure
$(Q) (cd $(BUILD_DIR); ./configure --$(if $(RUST_DEBUG_BUILD),enable,disable)-ddtrace-rust-debug $(if $(ASAN), --enable-ddtrace-sanitize) $(EXTRA_CONFIGURE_OPTIONS))
$(SO_FILE): $(if $(ASSUME_COMPILED),, $(ALL_OBJECT_FILES) $(BUILD_DIR)/compile_rust.sh)
$(if $(ASSUME_COMPILED),,$(Q) $(MAKE) -C $(BUILD_DIR) -j)
$(AR_FILE): $(ALL_OBJECT_FILES)
$(Q) $(MAKE) -C $(BUILD_DIR) -j ./modules/ddtrace.a all
$(PHP_EXTENSION_DIR)/ddtrace.so: $(SO_FILE)
$(Q) $(SUDO) $(if $(ASSUME_COMPILED),cp $(BUILD_DIR)/modules/ddtrace.so $(PHP_EXTENSION_DIR)/ddtrace.so,$(MAKE) -C $(BUILD_DIR) install)
install: $(PHP_EXTENSION_DIR)/ddtrace.so
set_static_option:
$(eval EXTRA_CONFIGURE_OPTIONS := --enable-ddtrace-rust-library-split)
static: set_static_option $(AR_FILE)
$(INI_FILE):
$(Q) echo "extension=ddtrace.so" | $(SUDO) tee -a $@
install_ini: $(INI_FILE)
delete_ini:
$(SUDO) rm $(INI_FILE)
install_appsec:
cmake -S $(APPSEC_SOURCE_DIR) -B $(BUILD_DIR_APPSEC)
cd $(BUILD_DIR_APPSEC);make extension ddappsec-helper
cp $(BUILD_DIR_APPSEC)/ddappsec.so $(PHP_EXTENSION_DIR)/ddappsec.so
cp $(BUILD_DIR_APPSEC)/libddappsec-helper.so $(PHP_EXTENSION_DIR)/libddappsec-helper.so
cp $(APPSEC_SOURCE_DIR)/recommended.json /tmp/recommended.json
$(Q) echo "extension=ddappsec.so" | $(SUDO) tee -a $(INI_FILE)
$(Q) echo "datadog.appsec.cli_start_on_rinit=true" | $(SUDO) tee -a $(INI_FILE)
$(Q) echo "datadog.appsec.helper_path=$(PHP_EXTENSION_DIR)/libddappsec-helper.so" | $(SUDO) tee -a $(INI_FILE)
$(Q) echo "datadog.appsec.rules=/tmp/recommended.json" | $(SUDO) tee -a $(INI_FILE)
$(Q) echo "datadog.appsec.helper_socket_path=/tmp/ddappsec.sock" | $(SUDO) tee -a $(INI_FILE)
$(Q) echo "datadog.appsec.helper_lock_path=/tmp/ddappsec.lock" | $(SUDO) tee -a $(INI_FILE)
$(Q) echo "datadog.appsec.log_file=/tmp/logs/appsec.log" | $(SUDO) tee -a $(INI_FILE)
$(Q) echo "datadog.appsec.helper_log_file=/tmp/logs/helper.log" | $(SUDO) tee -a $(INI_FILE)
install_all: install install_ini
run_tests: $(TEST_FILES) $(TEST_STUB_FILES) $(BUILD_DIR)/run-tests.php
DD_TRACE_GIT_METADATA_ENABLED=0 $(RUN_TESTS_CMD) $(TESTS)
test_c: $(SO_FILE) $(TEST_FILES) $(TEST_STUB_FILES) $(BUILD_DIR)/run-tests.php
$(if $(ASAN), USE_ZEND_ALLOC=0 USE_TRACKED_ALLOC=1 LSAN_OPTIONS=fast_unwind_on_malloc=0$${LSAN_OPTIONS:+$(,)$${LSAN_OPTIONS}}) DD_TRACE_GIT_METADATA_ENABLED=0 $(RUN_TESTS_CMD) -d extension=$(SO_FILE) $(BUILD_DIR)/$(subst $(BUILD_DIR_NAME)/,,$(TESTS))
test_c_coverage: dist_clean
DD_TRACE_DOCKER_DEBUG=1 EXTRA_CFLAGS="-fprofile-arcs -ftest-coverage" $(MAKE) test_c || exit 0
test_c_disabled: $(SO_FILE) $(TEST_FILES) $(TEST_STUB_FILES) $(BUILD_DIR)/run-tests.php
( \
DD_TRACE_CLI_ENABLED=0 DD_TRACE_DEBUG=1 $(RUN_TESTS_CMD) -d extension=$(SO_FILE) $(BUILD_DIR)/$(TESTS) || true; \
! grep -E 'Successfully triggered flush with trace of size|=== Total [0-9]+ memory leaks detected ===|Segmentation fault|Assertion ' $$(find $(BUILD_DIR)/$(TESTS) -name "*.out" | grep -v segfault_backtrace_enabled.out); \
)
test_c_observer: $(SO_FILE) $(TEST_FILES) $(TEST_STUB_FILES) $(BUILD_DIR)/run-tests.php
$(if $(ASAN), USE_ZEND_ALLOC=0 USE_TRACKED_ALLOC=1) DD_TRACE_GIT_METADATA_ENABLED=0 $(RUN_TESTS_CMD) -d extension=$(SO_FILE) -d extension=zend_test.so -d zend_test.observer.enabled=1 -d zend_test.observer.observe_all=1 -d zend_test.observer.show_output=0 $(BUILD_DIR)/$(TESTS)
test_opcache: $(SO_FILE) $(TEST_OPCACHE_FILES) $(BUILD_DIR)/run-tests.php
$(if $(ASAN), USE_ZEND_ALLOC=0 USE_TRACKED_ALLOC=1) $(RUN_TESTS_CMD) -d extension=$(SO_FILE) -d zend_extension=opcache.so $(BUILD_DIR)/tests/opcache
test_c_mem: $(SO_FILE) $(TEST_FILES) $(TEST_STUB_FILES) $(BUILD_DIR)/run-tests.php
$(RUN_TESTS_CMD) -d extension=$(SO_FILE) -m $(BUILD_DIR)/$(TESTS)
test_c2php: $(SO_FILE) $(INIT_HOOK_TEST_FILES) $(BUILD_DIR)/run-tests.php
( \
set -xe; \
export PATH="$(PROJECT_ROOT)/tests/ext/valgrind:$$PATH"; \
sed -i 's/stream_socket_accept($$listenSock, 5)/stream_socket_accept($$listenSock, 20)/' $(BUILD_DIR)/run-tests.php; \
export USE_ZEND_ALLOC=0; \
export ZEND_DONT_UNLOAD_MODULES=1; \
export USE_TRACKED_ALLOC=1; \
$(shell grep -Pzo '(?<=--ENV--)(?s).+?(?=--)' $(INIT_HOOK_TEST_FILES)) valgrind -q --tool=memcheck --trace-children=yes --vex-iropt-register-updates=allregs-at-mem-access bash -c '$(RUN_TESTS_CMD) -d extension=$(SO_FILE) -d datadog.trace.sources_path=$(TRACER_SOURCE_DIR) -d pcre.jit=0 $(INIT_HOOK_TEST_FILES)'; \
)
test_with_init_hook: $(SO_FILE) $(INIT_HOOK_TEST_FILES) $(BUILD_DIR)/run-tests.php
$(if $(ASAN), USE_ZEND_ALLOC=0 USE_TRACKED_ALLOC=1) $(RUN_TESTS_CMD) -d extension=$(SO_FILE) -d datadog.trace.sources_path=$(TRACER_SOURCE_DIR) $(INIT_HOOK_TEST_FILES);
test_extension_ci: $(SO_FILE) $(TEST_FILES) $(TEST_STUB_FILES) $(BUILD_DIR)/run-tests.php
( \
set -xe; \
export PATH="$(PROJECT_ROOT)/tests/ext/valgrind:$$PATH"; \
export TEST_PHP_JUNIT=$(JUNIT_RESULTS_DIR)/normal-extension-test.xml; \
export DD_TRACE_GIT_METADATA_ENABLED=0; \
$(RUN_TESTS_CMD) -d extension=$(SO_FILE) $(BUILD_DIR)/$(TESTS); \
\
export TEST_PHP_JUNIT=$(JUNIT_RESULTS_DIR)/valgrind-extension-test.xml; \
export TEST_PHP_OUTPUT=$(JUNIT_RESULTS_DIR)/valgrind-run-tests.out; \
$(RUN_TESTS_CMD) -d extension=$(SO_FILE) -m -s $$TEST_PHP_OUTPUT $(BUILD_DIR)/$(TESTS) && ! grep -e 'LEAKED TEST SUMMARY' $$TEST_PHP_OUTPUT; \
)
build_tea: TEA_BUILD_TESTS=ON
build_tea: TEA_PREFIX_PATH=/opt/catch2
build_tea: build_tea_common
build_tea_benchmarks: TEA_BUILD_BENCHMARKS=ON
build_tea_benchmarks: TEA_PREFIX_PATH=/opt/gbench
build_tea_benchmarks: build_tea_common
build_tea_common:
$(Q) test -f $(TEA_BUILD_DIR)/.built || \
( \
mkdir -p "$(TEA_BUILD_DIR)" "$(TEA_INSTALL_DIR)"; \
cd $(TEA_BUILD_DIR); \
CMAKE_PREFIX_PATH=$(TEA_PREFIX_PATH) \
cmake \
-DCMAKE_INSTALL_PREFIX=$(TEA_INSTALL_DIR) \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_TEA_TESTING=$(TEA_BUILD_TESTS) \
-DBUILD_TEA_BENCHMARKING=$(TEA_BUILD_BENCHMARKS) \
-DPhpConfig_ROOT=$(shell php-config --prefix) \
$(if $(ASAN), -DCMAKE_TOOLCHAIN_FILE=$(PROJECT_ROOT)/cmake/asan.cmake) \
$(PROJECT_ROOT)/tea; \
$(MAKE) $(MAKEFLAGS) && touch $(TEA_BUILD_DIR)/.built; \
)
test_tea: clean_tea build_tea
( \
$(if $(ASAN), USE_ZEND_ALLOC=0 USE_TRACKED_ALLOC=1) $(MAKE) -C $(TEA_BUILD_DIR) test; \
! grep -e "=== Total .* memory leaks detected ===" $(TEA_BUILD_DIR)/Testing/Temporary/LastTest.log; \
)
benchmarks_tea: clean_tea build_tea_benchmarks
$(TEA_BUILD_DIR)/benchmarks/tea_benchmarks \
--benchmark_repetitions=$(TEA_BENCHMARK_REPETITIONS) \
--benchmark_out=$(TEA_BENCHMARK_OUTPUT) \
--benchmark_format=$(TEA_BENCHMARK_FORMAT) \
--benchmark_time_unit=ms
install_tea: build_tea
$(Q) test -f $(TEA_BUILD_DIR)/.installed || \
( \
$(MAKE) -C $(TEA_BUILD_DIR) install; \
touch $(TEA_BUILD_DIR)/.installed; \
)
build_tea_coverage: TEA_BUILD_TESTS=ON
build_tea_coverage:
$(Q) test -f $(TEA_BUILD_DIR)/.built.coverage || \
( \
mkdir -p "$(TEA_BUILD_DIR)" "$(TEA_INSTALL_DIR)"; \
cd $(TEA_BUILD_DIR); \
CMAKE_PREFIX_PATH=/opt/catch2 \
cmake \
-DCMAKE_INSTALL_PREFIX=$(TEA_INSTALL_DIR) \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_TEA_TESTING=$(TEA_BUILD_TESTS) \
-DCMAKE_C_FLAGS="-O0 --coverage" \
-DCMAKE_SHARED_LINKER_FLAGS="--coverage" \
-DCMAKE_MODULE_LINKER_FLAGS="--coverage" \
-DCMAKE_EXE_LINKER_FLAGS="--coverage" \
-DPhpConfig_ROOT=$(shell php-config --prefix) \
$(PROJECT_ROOT)/tea; \
$(MAKE) $(MAKEFLAGS) && touch $(TEA_BUILD_DIR)/.built.coverage; \
)
test_tea_coverage: clean_tea build_tea_coverage
( \
$(MAKE) -C $(TEA_BUILD_DIR) test; \
! grep -e "=== Total .* memory leaks detected ===" $(TEA_BUILD_DIR)/Testing/Temporary/LastTest.log; \
)
install_tea_coverage: build_tea_coverage
$(Q) test -f $(TEA_BUILD_DIR)/.installed.coverage || \
( \
$(MAKE) -C $(TEA_BUILD_DIR) install; \
touch $(TEA_BUILD_DIR)/.installed.coverage; \
)
clean_tea:
rm -rf $(TEA_BUILD_DIR)
build_zai: install_tea
( \
mkdir -p "$(ZAI_BUILD_DIR)"; \
cd $(ZAI_BUILD_DIR); \
CMAKE_PREFIX_PATH=/opt/catch2 \
Tea_ROOT=$(TEA_INSTALL_DIR) \
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_ZAI_TESTING=ON $(if $(ASAN), -DCMAKE_TOOLCHAIN_FILE=$(PROJECT_ROOT)/cmake/asan.cmake) -DPhpConfig_ROOT=$(shell php-config --prefix) $(PROJECT_ROOT)/zend_abstract_interface; \
$(MAKE) $(MAKEFLAGS); \
)
test_zai: build_zai
$(MAKE) -C $(ZAI_BUILD_DIR) test $(shell [ -z "${TESTS}"] || echo "ARGS='--test-dir ${TESTS}'") $(if $(ASAN), USE_ZEND_ALLOC=0 USE_TRACKED_ALLOC=1) && ! grep -e "=== Total .* memory leaks detected ===" $(ZAI_BUILD_DIR)/Testing/Temporary/LastTest.log
build_zai_coverage: install_tea_coverage
( \
mkdir -p "$(ZAI_BUILD_DIR)"; \
cd $(ZAI_BUILD_DIR); \
CMAKE_PREFIX_PATH=/opt/catch2 \
Tea_ROOT=$(TEA_INSTALL_DIR) \
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-O0 --coverage" -DCMAKE_SHARED_LINKER_FLAGS="--coverage" -DCMAKE_MODULE_LINKER_FLAGS="--coverage" -DCMAKE_EXE_LINKER_FLAGS="--coverage" -DBUILD_ZAI_TESTING=ON -DPhpConfig_ROOT=$(shell php-config --prefix) $(PROJECT_ROOT)/zend_abstract_interface; \
$(MAKE) $(MAKEFLAGS); \
)
test_zai_coverage: build_zai_coverage
$(MAKE) -C $(ZAI_BUILD_DIR) test $(shell [ -z "${TESTS}"] || echo "ARGS='--test-dir ${TESTS}'") && ! grep -e "=== Total .* memory leaks detected ===" $(ZAI_BUILD_DIR)/Testing/Temporary/LastTest.log
clean_zai:
rm -rf $(ZAI_BUILD_DIR)
build_components_coverage:
( \
mkdir -p "$(COMPONENTS_BUILD_DIR)"; \
cd $(COMPONENTS_BUILD_DIR); \
CMAKE_PREFIX_PATH=/opt/catch2 cmake -DCMAKE_BUILD_TYPE=Debug -DDATADOG_PHP_TESTING=ON -DCMAKE_C_FLAGS="-O0 --coverage" -DCMAKE_SHARED_LINKER_FLAGS="--coverage" -DCMAKE_MODULE_LINKER_FLAGS="--coverage" -DCMAKE_EXE_LINKER_FLAGS="--coverage" $(PROJECT_ROOT)/components; \
$(MAKE) $(MAKEFLAGS); \
)
test_components_coverage: build_components_coverage
$(MAKE) -C $(COMPONENTS_BUILD_DIR) test $(shell [ -z "${TESTS}" ] || echo "ARGS='--test-dir ${TESTS}'") && ! grep -e "=== Total .* memory leaks detected ===" $(COMPONENTS_BUILD_DIR)/Testing/Temporary/LastTest.log
test_coverage_collect:
$(Q) lcov \
--directory $(PROJECT_ROOT)/tmp \
--capture \
--exclude "/usr/include/*.h" \
--exclude "/usr/include/*/*/*" \
--exclude "/opt/php/*/include/php/Zend/*" \
--exclude "$(BUILD_DIR)/components/*/*" \
--exclude "$(BUILD_DIR)/components-rs/*" \
--exclude "$(BUILD_DIR)/zend_abstract_interface/*/*" \
--exclude "$(BUILD_DIR)/ext/vendor/*/*" \
--exclude "$(BUILD_DIR)/src/dogstatsd/*" \
--exclude "$(BUILD_DIR)/src/dogstatsd/dogstatsd_client/*" \
--output-file $(PROJECT_ROOT)/tmp/coverage.info
$(Q) $(SED_I) 's+tmp/build_extension/ext+ext+g' $(PROJECT_ROOT)/tmp/coverage.info
test_coverage_output:
$(Q) genhtml \
--legend \
--title "PHP v$(shell php-config --version) / dd-trace-php combined coverage" \
-o $(PROJECT_ROOT)/coverage \
--prefix $(PROJECT_ROOT) \
$(PROJECT_ROOT)/tmp/coverage.info
test_coverage: dist_clean test_components_coverage test_tea_coverage test_zai_coverage test_c_coverage test_coverage_collect test_coverage_output
clean_components:
rm -rf $(COMPONENTS_BUILD_DIR)
dist_clean:
rm -rf $(BUILD_DIR) $(TEA_BUILD_DIR) $(ZAI_BUILD_DIR) $(COMPONENTS_BUILD_DIR)
clean:
if [[ -f "$(BUILD_DIR)/Makefile" ]]; then $(MAKE) -C $(BUILD_DIR) clean; fi
rm -f $(BUILD_DIR)/configure*
rm -f $(SO_FILE)
rm -f composer.lock composer.lock-php$(PHP_MAJOR_MINOR)
echo $(ZAI_BUILD_DIR)
sudo:
$(eval SUDO:=sudo)
debug:
$(eval CFLAGS=$(CFLAGS) -O0 -g)
prod:
$(eval CFLAGS=$(CFLAGS) -O2 -g0)
strict:
$(eval CFLAGS=-Wall -Werror -Wextra)
clang_find_files_to_lint:
@find . \( \
-path ./.git -prune -o \
-path ./tmp -prune -o \
-path ./vendor -prune -o \
-path ./tests -prune -o \
-path ./ext/vendor/mpack -prune -o \
-path ./ext/vendor/mt19937 -prune -o \
-path ./tooling/generation -prune -o \
-type f \) \
\( -iname "*.h" -o -iname "*.c" \)
CLANG_FORMAT := clang-format-6.0
clang_format_check:
@while read fname; do \
changes=$$($(CLANG_FORMAT) -output-replacements-xml $$fname | grep -c "<replacement " || true); \
if [ $$changes != 0 ]; then \
$(CLANG_FORMAT) -output-replacements-xml $$fname; \
echo "$$fname did not pass clang-format, consider running: make clang_format_fix"; \
touch .failure; \
fi \
done <<< $$($(MAKE) clang_find_files_to_lint)
clang_format_fix:
$(MAKE) clang_find_files_to_lint | xargs clang-format -i
cbindgen: remove_cbindgen generate_cbindgen
remove_cbindgen:
rm -f components-rs/ddtrace.h components-rs/live-debugger.h components-rs/telemetry.h components-rs/sidecar.h components-rs/common.h components-rs/crashtracker.h
generate_cbindgen: cbindgen_binary # Regenerate components-rs/ddtrace.h components-rs/live-debugger.h components-rs/telemetry.h components-rs/sidecar.h components-rs/common.h components-rs/crashtracker.h
( \
$(command rustup && echo run nightly --) cbindgen --crate ddtrace-php \
--config cbindgen.toml \
--output $(PROJECT_ROOT)/components-rs/ddtrace.h; \
cd libdatadog; \
$(command rustup && echo run nightly --) cbindgen --crate ddcommon-ffi \
--config ddcommon-ffi/cbindgen.toml \
--output $(PROJECT_ROOT)/components-rs/common.h; \
$(command rustup && echo run nightly --) cbindgen --crate datadog-live-debugger-ffi \
--config live-debugger-ffi/cbindgen.toml \
--output $(PROJECT_ROOT)/components-rs/live-debugger.h; \
$(command rustup && echo run nightly --) cbindgen --crate ddtelemetry-ffi \
--config ddtelemetry-ffi/cbindgen.toml \
--output $(PROJECT_ROOT)/components-rs/telemetry.h; \
$(command rustup && echo run nightly --) cbindgen --crate datadog-sidecar-ffi \
--config sidecar-ffi/cbindgen.toml \
--output $(PROJECT_ROOT)/components-rs/sidecar.h; \
$(command rustup && echo run nightly --) cbindgen --crate datadog-crashtracker-ffi \
--config crashtracker-ffi/cbindgen.toml \
--output $(PROJECT_ROOT)/components-rs/crashtracker.h; \
if test -d $(PROJECT_ROOT)/tmp; then \
mkdir -pv "$(BUILD_DIR)"; \
export CARGO_TARGET_DIR="$(BUILD_DIR)/target"; \
fi; \
cargo run -p tools -- $(PROJECT_ROOT)/components-rs/common.h $(PROJECT_ROOT)/components-rs/ddtrace.h $(PROJECT_ROOT)/components-rs/live-debugger.h $(PROJECT_ROOT)/components-rs/telemetry.h $(PROJECT_ROOT)/components-rs/sidecar.h $(PROJECT_ROOT)/components-rs/crashtracker.h \
)
cbindgen_binary:
if ! command -v cbindgen &> /dev/null; then \
cargo install cbindgen; \
fi
EXT_DIR:=/opt/datadog-php
PACKAGE_NAME:=datadog-php-tracer
FPM_DIR_OPTS=--directories $(EXT_DIR)/etc --config-files $(EXT_DIR)/etc -s dir
define FPM_FILES
extensions_$(shell test $(1) = arm64 && echo aarch64 || echo $(1))/=$(EXT_DIR)/extensions \
$(shell test $(1) = windows || echo package/post-install.sh=$(EXT_DIR)/bin/post-install.sh) package/ddtrace.ini.example=$(EXT_DIR)/etc/ \
docs=$(EXT_DIR)/docs README.md=$(EXT_DIR)/docs/README.md \
src=$(EXT_DIR)/dd-trace-sources
endef
define FPM_OPTS
-a $(1) -n $(PACKAGE_NAME) -m [email protected] --license "BSD 3-Clause License" --version $(VERSION) \
--provides $(PACKAGE_NAME) --vendor DataDog --url "https://docs.datadoghq.com/tracing/setup/php/" --no-depends \
$(FPM_INFO_OPTS) $(FPM_DIR_OPTS) $(shell test $(1) = windows || echo --after-install=package/post-install.sh)
endef
PACKAGES_BUILD_DIR:=build/packages
$(PACKAGES_BUILD_DIR):
mkdir -p "$@"
.deb.%: $(PACKAGES_BUILD_DIR)
fpm -p $(PACKAGES_BUILD_DIR) -t deb $(call FPM_OPTS, $(*)) $(call FPM_FILES, $(*))
.rpm.%: $(PACKAGES_BUILD_DIR)
fpm -p $(PACKAGES_BUILD_DIR) -t rpm $(call FPM_OPTS, $(*)) $(call FPM_FILES, $(*))
.apk.%: $(PACKAGES_BUILD_DIR)
fpm -p $(PACKAGES_BUILD_DIR) -t apk $(call FPM_OPTS, $(*)) --depends=bash --depends=curl --depends=libgcc $(call FPM_FILES, $(*))
# Example .tar.gz.aarch64, .tar.gz.x86_64
.tar.gz.%: $(PACKAGES_BUILD_DIR)
mkdir -p /tmp/$(PACKAGES_BUILD_DIR)-$(*)
rm -rf /tmp/$(PACKAGES_BUILD_DIR)-$(*)/*
fpm -p /tmp/$(PACKAGES_BUILD_DIR)-$(*)/$(PACKAGE_NAME)-$(VERSION) -t dir $(call FPM_OPTS, $(*)) $(call FPM_FILES, $(*))
tar -zcf $(PACKAGES_BUILD_DIR)/$(PACKAGE_NAME)-$(VERSION).$(*).tar.gz -C /tmp/$(PACKAGES_BUILD_DIR)-$(*)/$(PACKAGE_NAME)-$(VERSION) . --owner=0 --group=0
bundle.tar.gz: $(PACKAGES_BUILD_DIR)
bash ./tooling/bin/generate-final-artifact.sh \
$(VERSION) \
$(PACKAGES_BUILD_DIR) \
$(PROJECT_ROOT)
$(PACKAGES_BUILD_DIR)/datadog-setup.php: $(PACKAGES_BUILD_DIR)
bash ./tooling/bin/generate-installers.sh \
$(VERSION) \
$(PACKAGES_BUILD_DIR)
build_pecl_package:
BUILD_DIR='$(BUILD_DIR)/'; \
FILES="$(C_FILES) $(RUST_FILES) $(TEST_FILES) $(TEST_STUB_FILES) $(M4_FILES) Cargo.lock"; \
tooling/bin/pecl-build $${FILES//$${BUILD_DIR}/}
dbgsym.tar.gz:
$(if $(DDTRACE_MAKE_PACKAGES_ASAN), , tar -zcf $(PACKAGES_BUILD_DIR)/dd-library-php-$(VERSION)_windows_debugsymbols.tar.gz ./extensions_x86_64_debugsymbols --owner=0 --group=0)
installer_packages: .apk.x86_64 .apk.aarch64 .rpm.x86_64 .rpm.aarch64 .deb.x86_64 .deb.arm64 .tar.gz.x86_64 .tar.gz.aarch64 bundle.tar.gz dbgsym.tar.gz
tar --use-compress-program=pigz --exclude='dd-library-php-ssi-*' -cf packages.tar.gz $(PACKAGES_BUILD_DIR) --owner=0 --group=0
ssi_packages: $(PACKAGES_BUILD_DIR)
bash ./tooling/bin/generate-ssi-package.sh \
$(VERSION) \
$(PACKAGES_BUILD_DIR)
calculate_package_sha256_sums: $(PACKAGES_BUILD_DIR)/datadog-setup.php installer_packages
(cd build/packages && find . -type f -exec sha256sum {} + > ../../package_sha256sums)
packages: $(PACKAGES_BUILD_DIR)/datadog-setup.php ssi_packages installer_packages
# Generates the src/bridge/_generated_*.php files.
generate:
@composer -dtooling/generation update
@composer -dtooling/generation generate
@composer -dtooling/generation verify
# Generates the stubs file for the public API
generate_stubs:
@composer -dtooling/stubs update
@composer -dtooling/stubs generate
# Find all generated core dumps, sorted by date descending
cores:
find . -path "./*/vendor" -prune -false -o \( -type f -regex ".*\/core\.?[0-9]*" \) -printf "%T@ %Tc %p\n" | sort -n -r
########################################################################################################################
# TESTS
########################################################################################################################
TRACER_SOURCES_INI := -d datadog.trace.sources_path=$(TRACER_SOURCE_DIR)
ENV_OVERRIDE := $(shell [ -n "${DD_TRACE_DOCKER_DEBUG}" ] && echo DD_AUTOLOAD_NO_COMPILE=true DD_TRACE_SOURCES_PATH=$(TRACER_SOURCE_DIR)) DD_DOGSTATSD_URL=http://request-replayer:80 DD_TRACE_GIT_METADATA_ENABLED=false
TEST_EXTRA_INI ?=
TEST_EXTRA_ENV ?=
### DDTrace tests ###
TESTS_ROOT = ./tests
COMPOSER = $(if $(ASAN), ASAN_OPTIONS=detect_leaks=0) COMPOSER_MEMORY_LIMIT=-1 composer --no-interaction
DDPROF_IDENTIFIER ?=
PHPUNIT_OPTS ?=
PHPUNIT = $(TESTS_ROOT)/vendor/bin/phpunit $(PHPUNIT_OPTS) --config=$(TESTS_ROOT)/phpunit.xml
PHPUNIT_COVERAGE ?=
PHPBENCH_OPTS ?=
PHPBENCH_CONFIG ?= $(TESTS_ROOT)/phpbench.json
PHPBENCH_OPCACHE_CONFIG ?= $(TESTS_ROOT)/phpbench-opcache.json
PHPBENCH = $(TESTS_ROOT)/Benchmarks/vendor/bin/phpbench $(PHPBENCH_OPTS) run
PHPCOV = $(TESTS_ROOT)/vendor/bin/phpcov
TELEMETRY_ENABLED=0
TEST_INTEGRATIONS_70 := \
test_integrations_deferred_loading \
test_integrations_curl \
test_integrations_memcache \
test_integrations_memcached \
test_integrations_mongodb1 \
test_integrations_mysqli \
test_integrations_pdo \
test_integrations_elasticsearch1 \
test_integrations_guzzle5 \
test_integrations_guzzle6 \
test_integrations_pcntl \
test_integrations_phpredis3 \
test_integrations_phpredis4 \
test_integrations_phpredis5 \
test_integrations_predis1 \
test_integrations_sqlsrv
TEST_WEB_70 := \
test_metrics \
test_web_cakephp_28 \
test_web_codeigniter_22 \
test_web_codeigniter_31 \
test_web_laravel_42 \
test_web_lumen_52 \
test_web_nette_24 \
test_web_slim_312 \
test_web_symfony_23 \
test_web_symfony_28 \
test_web_symfony_30 \
test_web_symfony_33 \
test_web_symfony_34 \
test_web_yii_2 \
test_web_wordpress_48 \
test_web_wordpress_55 \
test_web_wordpress_61 \
test_web_zend_1 \
test_web_custom
TEST_INTEGRATIONS_71 := \
test_integrations_deferred_loading \
test_integrations_amqp2 \
test_integrations_amqp35 \
test_integrations_curl \
test_integrations_memcache \
test_integrations_memcached \
test_integrations_mongodb1 \
test_integrations_monolog1 \
test_integrations_mysqli \
test_integrations_pdo \
test_integrations_elasticsearch1 \
test_integrations_guzzle5 \
test_integrations_guzzle6 \
test_integrations_pcntl \
test_integrations_phpredis3 \
test_integrations_phpredis4 \
test_integrations_phpredis5 \
test_integrations_predis1 \
test_integrations_sqlsrv \
test_opentracing_10
TEST_WEB_71 := \
test_metrics \
test_web_cakephp_28 \
test_web_cakephp_310 \
test_web_codeigniter_22 \
test_web_codeigniter_31 \
test_web_laravel_42 \
test_web_laravel_57 \
test_web_laravel_58 \
test_web_lumen_52 \
test_web_lumen_56 \
test_web_lumen_58 \
test_web_nette_24 \
test_web_nette_30 \
test_web_slim_312 \
test_web_symfony_23 \
test_web_symfony_28 \
test_web_symfony_30 \
test_web_symfony_33 \
test_web_symfony_34 \
test_web_symfony_40 \
test_web_symfony_42 \
test_web_yii_2 \
test_web_wordpress_48 \
test_web_wordpress_55 \
test_web_wordpress_61 \
test_web_zend_1 \
test_web_custom
TEST_INTEGRATIONS_72 := \
test_integrations_deferred_loading \
test_integrations_amqp2 \
test_integrations_amqp35 \
test_integrations_curl \
test_integrations_memcache \
test_integrations_memcached \
test_integrations_mongodb1 \
test_integrations_monolog1 \
test_integrations_monolog2 \
test_integrations_mysqli \
test_integrations_pdo \
test_integrations_elasticsearch1 \
test_integrations_guzzle5 \
test_integrations_guzzle6 \
test_integrations_guzzle7 \
test_integrations_pcntl \
test_integrations_phpredis3 \
test_integrations_phpredis4 \
test_integrations_phpredis5 \
test_integrations_predis1 \
test_integrations_sqlsrv \
test_opentracing_10
TEST_WEB_72 := \
test_metrics \
test_web_cakephp_310 \
test_web_codeigniter_22 \
test_web_codeigniter_31 \
test_web_drupal_89 \
test_web_laravel_42 \
test_web_laravel_57 \
test_web_laravel_58 \
test_web_lumen_52 \
test_web_lumen_56 \
test_web_lumen_58 \
test_web_nette_24 \
test_web_nette_30 \
test_web_slim_312 \
test_web_slim_4 \
test_web_symfony_23 \
test_web_symfony_28 \
test_web_symfony_30 \
test_web_symfony_33 \
test_web_symfony_34 \
test_web_symfony_40 \
test_web_symfony_42 \
test_web_symfony_44 \
test_web_symfony_50 \
test_web_symfony_51 \
test_web_symfony_52 \
test_web_wordpress_48 \
test_web_wordpress_55 \
test_web_wordpress_61 \
test_web_yii_2 \
test_web_zend_1 \
test_web_custom
TEST_INTEGRATIONS_73 :=\
test_integrations_deferred_loading \
test_integrations_amqp2 \
test_integrations_amqp35 \
test_integrations_curl \
test_integrations_memcache \
test_integrations_memcached \
test_integrations_mongodb1 \
test_integrations_monolog1 \
test_integrations_monolog2 \
test_integrations_mysqli \
test_integrations_pdo \
test_integrations_elasticsearch7 \
test_integrations_guzzle5 \
test_integrations_guzzle6 \
test_integrations_guzzle7 \
test_integrations_pcntl \
test_integrations_phpredis3 \
test_integrations_phpredis4 \
test_integrations_phpredis5 \
test_integrations_predis1 \
test_integrations_sqlsrv \
test_opentracing_10
TEST_WEB_73 := \
test_metrics \
test_web_cakephp_310 \
test_web_codeigniter_22 \
test_web_codeigniter_31 \
test_web_drupal_89 \
test_web_laminas_14 \
test_web_laravel_57 \
test_web_laravel_58 \
test_web_laravel_8x \
test_web_lumen_52 \
test_web_lumen_56 \
test_web_lumen_58 \
test_web_lumen_81 \
test_web_magento_23 \
test_web_nette_24 \
test_web_nette_30 \
test_web_slim_312 \
test_web_slim_4 \
test_web_symfony_34 \
test_web_symfony_40 \
test_web_symfony_42 \
test_web_symfony_44 \
test_web_symfony_50 \
test_web_symfony_51 \
test_web_symfony_52 \
test_web_wordpress_48 \
test_web_wordpress_55 \
test_web_wordpress_61 \
test_web_yii_2 \
test_web_zend_1 \
test_web_custom
TEST_INTEGRATIONS_74 := \
test_integrations_deferred_loading \
test_integrations_amqp2 \
test_integrations_amqp35 \
test_integrations_curl \
test_integrations_memcache \
test_integrations_memcached \
test_integrations_mongodb1 \
test_integrations_monolog1 \
test_integrations_monolog2 \
test_integrations_mysqli \
test_opentelemetry_1 \
test_integrations_pdo \
test_integrations_elasticsearch7 \
test_integrations_elasticsearch8 \
test_integrations_guzzle5 \
test_integrations_guzzle6 \
test_integrations_guzzle7 \
test_integrations_pcntl \
test_integrations_phpredis3 \
test_integrations_phpredis4 \
test_integrations_phpredis5 \
test_integrations_predis1 \
test_integrations_roadrunner \
test_integrations_sqlsrv \
test_opentracing_10
TEST_WEB_74 := \
test_metrics \
test_web_cakephp_310 \
test_web_cakephp_45 \
test_web_codeigniter_22 \
test_web_codeigniter_31 \
test_web_drupal_89 \
test_web_drupal_95 \
test_web_laminas_14 \
test_web_laravel_57 \
test_web_laravel_58 \
test_web_laravel_8x \
test_web_lumen_52 \
test_web_lumen_56 \
test_web_lumen_58 \
test_web_lumen_81 \
test_web_magento_23 \
test_web_nette_24 \
test_web_nette_30 \
test_web_slim_312 \
test_web_slim_4 \
test_web_symfony_34 \
test_web_symfony_40 \
test_web_symfony_44 \
test_web_symfony_50 \
test_web_symfony_51 \
test_web_symfony_52 \
test_web_wordpress_48 \
test_web_wordpress_55 \
test_web_wordpress_59 \
test_web_wordpress_61 \
test_web_yii_2 \
test_web_zend_1 \
test_web_custom
# NOTE: test_integrations_phpredis5 is not included in the PHP 8.0 integrations tests because of this bug that only
# shows up in debug builds of PHP (https://github.com/phpredis/phpredis/issues/1869).
# Since we run tests in CI using php debug builds, we run test_integrations_phpredis5 in a separate non-debug container.
TEST_INTEGRATIONS_80 := \
test_integrations_deferred_loading \
test_integrations_amqp2 \
test_integrations_amqp35 \
test_integrations_curl \
test_integrations_laminaslog2 \
test_integrations_memcache \
test_integrations_memcached \
test_integrations_mongodb1 \
test_integrations_monolog1 \
test_integrations_monolog2 \
test_integrations_mysqli \
test_opentelemetry_1 \
test_integrations_pdo \
test_integrations_elasticsearch7 \
test_integrations_googlespanner \
test_integrations_guzzle5 \
test_integrations_guzzle6 \
test_integrations_guzzle7 \
test_integrations_pcntl \
test_integrations_phpredis5 \
test_integrations_predis1 \
test_integrations_sqlsrv \
test_integrations_swoole_5 \
test_opentracing_10
TEST_WEB_80 := \
test_metrics \
test_web_cakephp_45 \
test_web_codeigniter_22 \
test_web_codeigniter_31 \
test_web_drupal_95 \
test_web_laminas_rest_19 \
test_web_laminas_14 \
test_web_laminas_20 \
test_web_laravel_8x \
test_web_laravel_9x \
test_web_lumen_81 \
test_web_lumen_90 \
test_web_nette_24 \
test_web_nette_30 \
test_web_slim_312 \
test_web_slim_4 \
test_web_symfony_44 \
test_web_symfony_51 \
test_web_symfony_52 \
test_web_wordpress_59 \
test_web_wordpress_61 \
test_web_yii_2 \
test_web_zend_1_21 \
test_web_custom
TEST_INTEGRATIONS_81 := \
test_integrations_amqp2 \
test_integrations_amqp35 \
test_integrations_curl \
test_integrations_deferred_loading \
test_integrations_laminaslog2 \
test_integrations_memcache \
test_integrations_memcached \
test_integrations_mongodb1 \
test_integrations_monolog1 \
test_integrations_monolog2 \
test_integrations_monolog3 \
test_integrations_mysqli \
test_integrations_openai \
test_opentelemetry_1 \
test_opentelemetry_beta \
test_integrations_googlespanner \
test_integrations_guzzle7 \
test_integrations_pcntl \
test_integrations_pdo \
test_integrations_elasticsearch7 \
test_integrations_phpredis5 \
test_integrations_predis1 \
test_integrations_sqlsrv \
test_integrations_swoole_5 \
test_opentracing_10
TEST_WEB_81 := \
test_metrics \
test_web_cakephp_45 \
test_web_cakephp_50 \
test_web_codeigniter_22 \
test_web_codeigniter_31 \
test_web_drupal_95 \
test_web_drupal_101 \
test_web_laminas_rest_19 \
test_web_laminas_20 \
test_web_laravel_8x \
test_web_laravel_9x \
test_web_laravel_10x \
test_web_lumen_81 \
test_web_lumen_90 \
test_web_magento_24 \
test_web_nette_24 \
test_web_nette_30 \
test_web_slim_312 \
test_web_slim_4 \
test_web_symfony_52 \
test_web_wordpress_59 \
test_web_wordpress_61 \
test_web_custom \
test_web_zend_1_21
# test_web_yii_2 \
TEST_INTEGRATIONS_82 := \
test_integrations_amqp2 \
test_integrations_amqp35 \
test_integrations_curl \
test_integrations_deferred_loading \
test_integrations_laminaslog2 \
test_integrations_memcache \
test_integrations_memcached \
test_integrations_mongodb1 \
test_integrations_monolog1 \
test_integrations_monolog2 \
test_integrations_monolog3 \
test_integrations_mysqli \
test_integrations_openai \
test_opentelemetry_1 \
test_opentelemetry_beta \
test_integrations_googlespanner \
test_integrations_guzzle7 \
test_integrations_pcntl \
test_integrations_pdo \
test_integrations_elasticsearch7 \
test_integrations_elasticsearch8 \
test_integrations_phpredis5 \
test_integrations_predis1 \
test_integrations_frankenphp \
test_integrations_roadrunner \
test_integrations_sqlsrv \
test_integrations_swoole_5 \
test_opentracing_10
TEST_WEB_82 := \
test_metrics \
test_web_cakephp_45 \
test_web_cakephp_50 \
test_web_codeigniter_22 \
test_web_codeigniter_31 \
test_web_drupal_95 \
test_web_drupal_101 \
test_web_laminas_rest_19 \
test_web_laminas_20 \
test_web_laravel_8x \
test_web_laravel_9x \
test_web_laravel_10x \
test_web_laravel_11x \
test_web_laravel_octane \
test_web_lumen_81 \
test_web_lumen_90 \
test_web_lumen_100 \
test_web_magento_24 \
test_web_nette_24 \
test_web_nette_30 \
test_web_slim_312 \
test_web_slim_4 \
test_web_symfony_52 \
test_web_symfony_62 \
test_web_symfony_70 \
test_web_wordpress_59 \
test_web_wordpress_61 \
test_web_custom \
test_web_zend_1_21
# test_web_yii_2 \
TEST_INTEGRATIONS_83 := \
test_integrations_amqp2 \
test_integrations_amqp35 \
test_integrations_curl \
test_integrations_deferred_loading \
test_integrations_laminaslog2 \
test_integrations_memcache \
test_integrations_memcached \
test_integrations_mongodb1 \
test_integrations_monolog1 \
test_integrations_monolog2 \
test_integrations_monolog3 \
test_integrations_mysqli \
test_integrations_openai \
test_opentelemetry_1 \
test_opentelemetry_beta \