Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6' ]

name:
- linux
Expand Down
10 changes: 9 additions & 1 deletion tests/spx_auto_start_005.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
--TEST--
Auto start disabled, full report & span report keys printed
--INI--
spx.data_dir="{PWD}/tmp_data_dir_auto_start_005"
--ENV--
return <<<END
SPX_ENABLED=1
Expand Down Expand Up @@ -28,4 +30,10 @@ for ($i = 0; $i < 3; $i++) {
--EXPECTF--
spx-full-%s
spx-full-%s
spx-full-%s
spx-full-%s
--CLEAN--
<?php

exec(sprintf('rm -rf %s', escapeshellarg(__DIR__ . '/tmp_data_dir_auto_start_005')));

?>
9 changes: 8 additions & 1 deletion tests/spx_auto_start_007.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Auto start disabled, full report & span report keys printed
--CGI--
--INI--
spx.debug=1
spx.data_dir="{PWD}/tmp_data_dir_auto_start_007"
spx.http_enabled=1
spx.http_key="dev"
spx.http_ip_whitelist="127.0.0.1"
Expand Down Expand Up @@ -33,4 +34,10 @@ for ($i = 0; $i < 3; $i++) {
--EXPECTF--
spx-full-%s
spx-full-%s
spx-full-%s
spx-full-%s
--CLEAN--
<?php

exec(sprintf('rm -rf %s', escapeshellarg(__DIR__ . '/tmp_data_dir_auto_start_007')));

?>
7 changes: 7 additions & 0 deletions tests/spx_full_report_custom_metadata.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"full" report custom metadata
--INI--
log_errors=on
spx.data_dir="{PWD}/tmp_data_dir_full_report_custom_metadata"
--ENV--
return <<<END
SPX_ENABLED=1
Expand Down Expand Up @@ -155,3 +156,9 @@ Notice: SPX: spx_profiler_full_report_set_custom_metadata_str(): too large $cust
,"zm"
]
}
--CLEAN--
<?php

exec(sprintf('rm -rf %s', escapeshellarg(__DIR__ . '/tmp_data_dir_full_report_custom_metadata')));

?>
8 changes: 8 additions & 0 deletions tests/spx_full_report_data.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
--TEST--
"full" report data
--INI--
spx.data_dir="{PWD}/tmp_data_dir_full_report_data"
--ENV--
return <<<END
SPX_ENABLED=1
Expand Down Expand Up @@ -78,3 +80,9 @@ b|2|%S|
%s/tests/spx_full_report_data.php:9:foo
%s/spx_full_report_data.php:5:bar
%s/spx_full_report_data.php:2:baz
--CLEAN--
<?php

exec(sprintf('rm -rf %s', escapeshellarg(__DIR__ . '/tmp_data_dir_full_report_data')));

?>
7 changes: 7 additions & 0 deletions tests/spx_ini_params_no_unnecessary_access_check.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ INI profiling parameters: no unnecessary access check (no related log expected)
--CGI--
--INI--
spx.debug=1
spx.data_dir="{PWD}/tmp_data_dir_ini_params_no_unnecessary_access_check"
spx.http_profiling_enabled=1
spx.http_enabled=1
spx.http_key="dev"
Expand All @@ -16,3 +17,9 @@ echo 'Normal output';
SPX-Debug-Profiling-Triggered: 1
--EXPECT--
Normal output
--CLEAN--
<?php

exec(sprintf('rm -rf %s', escapeshellarg(__DIR__ . '/tmp_data_dir_ini_params_no_unnecessary_access_check')));

?>
4 changes: 2 additions & 2 deletions tests/spx_ini_params_not_overridden.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ INI profiling parameters: not overridden by query string (bad auth)s
--CGI--
--INI--
spx.debug=1
spx.data_dir="{PWD}/tmp_data_dir_ini_params_not_overridden"
spx.http_profiling_enabled=1
spx.http_enabled=1
spx.http_key="dev"
Expand All @@ -25,7 +26,6 @@ Normal output
--CLEAN--
<?php

$data_dir = ini_get('spx.data_dir');
exec(sprintf('rm -rf %s', escapeshellarg($data_dir)));
exec(sprintf('rm -rf %s', escapeshellarg(__DIR__ . '/tmp_data_dir_ini_params_not_overridden')));

?>
4 changes: 2 additions & 2 deletions tests/spx_ini_params_profiling_enabled.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ INI profiling parameters: profiling enabled
--CGI--
--INI--
spx.debug=1
spx.data_dir="{PWD}/tmp_data_dir_ini_params_profiling_enabled"
spx.http_profiling_enabled=1
--FILE--
<?php
Expand All @@ -15,7 +16,6 @@ Normal output
--CLEAN--
<?php

$data_dir = ini_get('spx.data_dir');
exec(sprintf('rm -rf %s', escapeshellarg($data_dir)));
exec(sprintf('rm -rf %s', escapeshellarg(__DIR__ . '/tmp_data_dir_ini_params_profiling_enabled')));

?>
4 changes: 2 additions & 2 deletions tests/spx_ui_report_delete_all.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ UI: delete all reports
spx.http_enabled=1
spx.http_key="dev"
spx.http_ip_whitelist="127.0.0.1"
spx.data_dir="{PWD}/tmp_data_dir"
spx.data_dir="{PWD}/tmp_data_dir_delete_all"
log_errors=on
--FILE--
<?php
Expand Down Expand Up @@ -34,4 +34,4 @@ $clean();
--EXPECTF--
{"success": true}
Remaining files:
%s/tmp_data_dir/keep.txt
%s/tmp_data_dir_delete_all/keep.txt
2 changes: 1 addition & 1 deletion tests/spx_ui_report_delete_all_empty.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ UI: delete all reports (empty directory)
spx.http_enabled=1
spx.http_key="dev"
spx.http_ip_whitelist="127.0.0.1"
spx.data_dir="{PWD}/tmp_data_dir"
spx.data_dir="{PWD}/tmp_data_dir_delete_all_empty"
log_errors=on
--FILE--
<?php
Expand Down
2 changes: 1 addition & 1 deletion tests/spx_ui_report_delete_confinement.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ UI: delete confinement check
spx.http_enabled=1
spx.http_key="dev"
spx.http_ip_whitelist="127.0.0.1"
spx.data_dir="{PWD}/tmp_data_dir"
spx.data_dir="{PWD}/tmp_data_dir_delete_confinement"
log_errors=on
--FILE--
<?php
Expand Down
2 changes: 1 addition & 1 deletion tests/spx_ui_report_delete_nonexistent.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ UI: delete non-existent report
spx.http_enabled=1
spx.http_key="dev"
spx.http_ip_whitelist="127.0.0.1"
spx.data_dir="{PWD}/tmp_data_dir"
spx.data_dir="{PWD}/tmp_data_dir_delete_nonexistent"
log_errors=on
--FILE--
<?php
Expand Down
2 changes: 1 addition & 1 deletion tests/spx_ui_report_delete_one.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ UI: delete foo report
spx.http_enabled=1
spx.http_key="dev"
spx.http_ip_whitelist="127.0.0.1"
spx.data_dir="{PWD}/tmp_data_dir"
spx.data_dir="{PWD}/tmp_data_dir_delete_one"
log_errors=on
--FILE--
<?php
Expand Down
Loading