Compare commits
278 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf934fb90b | ||
|
|
f497023529 | ||
|
|
6ee8cb107d | ||
|
|
7330df29ae | ||
|
|
a314034df7 | ||
|
|
e78beb7e8a | ||
|
|
4628e1cbb3 | ||
|
|
0b8fdfc13f | ||
|
|
dd0b6056a6 | ||
|
|
b9d5108479 | ||
|
|
566ae6d648 | ||
|
|
fdd0f5c6d1 | ||
|
|
f4435c54f6 | ||
|
|
5c765b0b86 | ||
|
|
01efc7eeb7 | ||
|
|
8b01a910f6 | ||
|
|
22a966553b | ||
|
|
8bc6d4ab3c | ||
|
|
e28ab9feaf | ||
|
|
916bf5ef25 | ||
|
|
9dea655699 | ||
|
|
160210de1f | ||
|
|
85b8fa1561 | ||
|
|
390552847f | ||
|
|
041a10ab71 | ||
|
|
a6f0208080 | ||
|
|
afc3319808 | ||
|
|
04e34a9785 | ||
|
|
669d64fccd | ||
|
|
d34da778eb | ||
|
|
2e7f7004bc | ||
|
|
924b3f1ebf | ||
|
|
6bee435df4 | ||
|
|
914a1632dd | ||
|
|
3a68779c1b | ||
|
|
6e1a5fe51f | ||
|
|
a63d7ccbe4 | ||
|
|
2c05f1a225 | ||
|
|
f1866f7675 | ||
|
|
47bab9f402 | ||
|
|
131812eb54 | ||
|
|
d22ab87bd3 | ||
|
|
5172376256 | ||
|
|
4a48da0cf4 | ||
|
|
372e3102bd | ||
|
|
b6a42d4fae | ||
|
|
c42e629d12 | ||
|
|
eb241892bb | ||
|
|
ea65b2f735 | ||
|
|
84de65a0b2 | ||
|
|
a9e05b8296 | ||
|
|
db31e1536d | ||
|
|
1536c6160d | ||
|
|
f1a480380a | ||
|
|
edbde811fc | ||
|
|
e38d5bedc2 | ||
|
|
5ee3eb0a29 | ||
|
|
12f25faebe | ||
|
|
506d650e9e | ||
|
|
0229f0a924 | ||
|
|
88c627b624 | ||
|
|
f6d4ddd838 | ||
|
|
7bb2550573 | ||
|
|
bbb5009e80 | ||
|
|
1ca04b1f70 | ||
|
|
dff1263dab | ||
|
|
f50fd289ed | ||
|
|
2cc521ee61 | ||
|
|
7c87cbcf35 | ||
|
|
a5e4944c0f | ||
|
|
59b63bc26d | ||
|
|
c364e89793 | ||
|
|
3a88d83254 | ||
|
|
0015567d24 | ||
|
|
30d79511bf | ||
|
|
e6a12eceb4 | ||
|
|
b05ca034c9 | ||
|
|
b9da25a040 | ||
|
|
f23f336477 | ||
|
|
41168d7dd5 | ||
|
|
493ebd2b41 | ||
|
|
a351cdd3ba | ||
|
|
e1e10bbd75 | ||
|
|
88a7740dfb | ||
|
|
b318833d1d | ||
|
|
296485afac | ||
|
|
d280772507 | ||
|
|
29fcf362a1 | ||
|
|
28710178d5 | ||
|
|
b20f9c7e29 | ||
|
|
dfe945e04c | ||
|
|
ed1455e68f | ||
|
|
2ecb8426c8 | ||
|
|
a92ac2c2c6 | ||
|
|
165e824630 | ||
|
|
24128fc243 | ||
|
|
e2942f164c | ||
|
|
d8189a32ec | ||
|
|
744d380253 | ||
|
|
ad9aace274 | ||
|
|
42cac172f3 | ||
|
|
89d094f990 | ||
|
|
f2b8d5406e | ||
|
|
4e3de6da21 | ||
|
|
8242022047 | ||
|
|
d582c84f5a | ||
|
|
73abf2bda8 | ||
|
|
d58fe95958 | ||
|
|
8257565f1e | ||
|
|
8bc425049e | ||
|
|
502ef8ee6d | ||
|
|
934a1334d4 | ||
|
|
999fc361d1 | ||
|
|
1aa0cd3020 | ||
|
|
ab9a509ded | ||
|
|
1569432b97 | ||
|
|
44c73e0bb0 | ||
|
|
d719cb2a40 | ||
|
|
650056633f | ||
|
|
326cfa2025 | ||
|
|
42498edb51 | ||
|
|
6ee7341e31 | ||
|
|
92343153de | ||
|
|
09dda94575 | ||
|
|
6c594d4266 | ||
|
|
64dbfad097 | ||
|
|
092d4eacad | ||
|
|
2f51c1cea7 | ||
|
|
f4627c0119 | ||
|
|
a5bce454bc | ||
|
|
2ac16b4feb | ||
|
|
0462cbbcc8 | ||
|
|
d3a4bc7c5d | ||
|
|
87b6be4094 | ||
|
|
964155f6f6 | ||
|
|
389be3a5af | ||
|
|
3a513f7741 | ||
|
|
4762cba5b8 | ||
|
|
58f06fec29 | ||
|
|
d8ec55f206 | ||
|
|
1c21aecdcb | ||
|
|
4db83fd42b | ||
|
|
a177e0865c | ||
|
|
c20fd451a8 | ||
|
|
15949b11d8 | ||
|
|
3048d6753a | ||
|
|
7fc086e792 | ||
|
|
3046b4d707 | ||
|
|
4d388174a5 | ||
|
|
bda8ebc88d | ||
|
|
ae90e14b49 | ||
|
|
55f5eefb3f | ||
|
|
3ddc3f1f53 | ||
|
|
080a3574e9 | ||
|
|
50fd4f6c3b | ||
|
|
676373d32a | ||
|
|
e68f0c1ad0 | ||
|
|
d4bbd9569f | ||
|
|
db6856ef47 | ||
|
|
7fa2427eb7 | ||
|
|
2d889bca8b | ||
|
|
6f8d84dbc3 | ||
|
|
045be30ab5 | ||
|
|
153f7fed30 | ||
|
|
5d71f521a1 | ||
|
|
2a74fb3cdc | ||
|
|
18498c11ea | ||
|
|
ca12daceac | ||
|
|
a2e8b3ffb4 | ||
|
|
6a4489701c | ||
|
|
c26817bfbd | ||
|
|
402bd85cc9 | ||
|
|
c4da765b71 | ||
|
|
0c0d9ad583 | ||
|
|
29afd4c7fb | ||
|
|
415e2e4038 | ||
|
|
f466eb0775 | ||
|
|
9afcd28ee6 | ||
|
|
f81c3fcc57 | ||
|
|
157fc269a3 | ||
|
|
4f5390a40d | ||
|
|
7899b11cb1 | ||
|
|
669990ddd1 | ||
|
|
e4f0c5f788 | ||
|
|
6820316a92 | ||
|
|
20f6e77a72 | ||
|
|
2cee8b9ed7 | ||
|
|
ba4f9cc7be | ||
|
|
4d9515ea7c | ||
|
|
9758c83067 | ||
|
|
31ec58a747 | ||
|
|
2c4a2aa320 | ||
|
|
e4c69e609b | ||
|
|
e007f901f8 | ||
|
|
0943b37e69 | ||
|
|
d65daf9f8f | ||
|
|
fd7c47bb91 | ||
|
|
4470c5fec8 | ||
|
|
081e03ddc0 | ||
|
|
c4b5638538 | ||
|
|
c2825d0346 | ||
|
|
130da0b0b0 | ||
|
|
7fcd9e553a | ||
|
|
8ecf60f515 | ||
|
|
3b48647c21 | ||
|
|
09ed6afa51 | ||
|
|
3ae1b271ed | ||
|
|
5fdaf18860 | ||
|
|
95982a1c3c | ||
|
|
3602260228 | ||
|
|
753edc4e1c | ||
|
|
b6ba411800 | ||
|
|
084914dfdf | ||
|
|
4972815427 | ||
|
|
e6671137cd | ||
|
|
16164afac9 | ||
|
|
918ac8834a | ||
|
|
03b83fb293 | ||
|
|
2e943c8a1d | ||
|
|
2ca8dcc896 | ||
|
|
84f73d952b | ||
|
|
111bab9c27 | ||
|
|
547738f354 | ||
|
|
f95218a616 | ||
|
|
1c7849239c | ||
|
|
1f09021a4a | ||
|
|
caa4594972 | ||
|
|
b6dd727ea3 | ||
|
|
9876d4b554 | ||
|
|
f6b1ea4990 | ||
|
|
3a29cf1d63 | ||
|
|
f61e10589e | ||
|
|
14c4658425 | ||
|
|
82da68b23e | ||
|
|
404b804616 | ||
|
|
9c6b50367d | ||
|
|
2234680bf6 | ||
|
|
5029fc62e7 | ||
|
|
2cf8eed156 | ||
|
|
ab84278515 | ||
|
|
c318e1c07f | ||
|
|
9aadf99d39 | ||
|
|
bc9e566e38 | ||
|
|
7ec6c6f214 | ||
|
|
d2a33177a7 | ||
|
|
7918bd4cc4 | ||
|
|
a89ce4375b | ||
|
|
553f5d16cf | ||
|
|
420c570b09 | ||
|
|
d99e57fb68 | ||
|
|
9aec757040 | ||
|
|
7cbf772db5 | ||
|
|
70e6bc7825 | ||
|
|
63d1401f0e | ||
|
|
3908736fd9 | ||
|
|
e7a5b8b6ec | ||
|
|
4628a69c1d | ||
|
|
e45b81b8a2 | ||
|
|
ef7be984ac | ||
|
|
290f28394c | ||
|
|
d0cbc9c46a | ||
|
|
4db4ce29b3 | ||
|
|
daee43f7a1 | ||
|
|
c82e6509d6 | ||
|
|
d21d59fdee | ||
|
|
14d9bc8d81 | ||
|
|
c3d8bc31e9 | ||
|
|
61d0555fe5 | ||
|
|
106d565ffd | ||
|
|
716a2635eb | ||
|
|
5d2f5ac6eb | ||
|
|
c2193e9844 | ||
|
|
c501adc0f9 | ||
|
|
7954f94868 | ||
|
|
3fad54cefe | ||
|
|
54e667ed2b | ||
|
|
ce1acaa6fb | ||
|
|
2a730dc94a |
118
ChangeLog
118
ChangeLog
@@ -1,5 +1,123 @@
|
||||
PHORONIX TEST SUITE CHANGE-LOG
|
||||
|
||||
Phoronix Test Suite 6.6.1
|
||||
29 September 2016
|
||||
|
||||
- pts-core: Various BSD improvements
|
||||
- pts-core: Add list-not-installed-tests command (alias: list-uninstalled-tests)
|
||||
- pts-core: Detection for qupzilla browser when no alternative exists
|
||||
- pts-core: Add "phoronix-test-suite php-conf" sub-command to dump more useful PHP information for debugging
|
||||
- pts-core: Add python-scipy and python-sklearn external dependencies
|
||||
- phodevi: Support for reporting memory frequency when overclocked if reported via "Configured Clock Speed" in dmidecode for RAM
|
||||
|
||||
Phoronix Test Suite 6.6.0-Loppa
|
||||
6 September 2016
|
||||
|
||||
- pts_Graph: On multi-way comparisons, always condense line graphs to modified box plots
|
||||
|
||||
Phoronix Test Suite 6.6.0 Milestone 3
|
||||
26 August 2016
|
||||
|
||||
- pts-core: Add OpenMandriva/urpmi PHP dependency helper to launcher
|
||||
- pts-core: After running tests, if no browser/display is available, offer to show results via CLI graph/text rendering
|
||||
- pts-core: Add a SVG DOM HTML back-end for lowering common SVG into pure HTML for cases like email clients where no SVG is supported
|
||||
- html_results_export: New module exposed via EXPORT_RESULTS_HTML_EMAIL_TO and EXPORT_RESULTS_HTML_FILE_TO env vars for exporting HTML results
|
||||
- pts_Graph: When highlighting graph values, darken the color rather than use static color
|
||||
|
||||
Phoronix Test Suite 6.6.0 Milestone 2
|
||||
7 August 2016
|
||||
|
||||
- deploy: Update Debian packaging script
|
||||
- pts-core: Fix for upload-test-suite (on OpenBenchmarking.org side too)
|
||||
- pts-core: Show local suites in list-suites
|
||||
- pts-core: Ensure DragonFlyBSD pkg installation is done automatically
|
||||
- pts-core: Restructure bash on windows check
|
||||
- pts-core: Initial work on CLI terminal colored text output
|
||||
- phoromatic: Web UI styling improvements
|
||||
- phodevi: Show mdstat RAID Details when available
|
||||
- pts_Graph: Show extra disk details on system graph
|
||||
|
||||
Phoronix Test Suite 6.6.0 Milestone 1
|
||||
6 July 2016
|
||||
|
||||
- pts-core: Add OpenCV to external dependencies list
|
||||
- pts-core: Disable test cache share when run in stress-run mode
|
||||
- phoromatic: Allow custom versions to be manually specified on test suite web UI page
|
||||
- pts_Graph: Show min/max results on multi-way comparisons
|
||||
- pts_Graph: Color string tweaks
|
||||
- phodevi: Fix to allow GPU temperature sensor to work with AMDGPU-PRO driver stack
|
||||
|
||||
Phoronix Test Suite 6.4.0-Hasvik
|
||||
2 June 2016
|
||||
|
||||
[Only minor changes since 6.4 M4]
|
||||
|
||||
Phoronix Test Suite 6.4.0 Milestone 4
|
||||
31 May 2016
|
||||
|
||||
- pts-core: Automatically add used extra OpenBenchmarking.org repositories to the linked list
|
||||
- pts-core: Don't load empty tests on finish-run command
|
||||
- pts-core: Add perl-digest-md5 to external dependencies list
|
||||
- pts-core: Prevent duplicate tests/setting combinations from entering the same test run manager queue
|
||||
- pts-core: Fix for IE not scaling SVGs in the results viewer
|
||||
- pts-core: Finish new pts_test_suite API, port build-suite to it
|
||||
- phoromatic: Support editing and deleting tests in local suites from the Phoromatic Server UI
|
||||
- phodevi: More detection improvements for NVMe devices on Linux
|
||||
|
||||
Phoronix Test Suite 6.4.0 Milestone 3
|
||||
26 May 2016
|
||||
|
||||
- pts-core: XML formatting fix for non-OpenBenchmarking.org deployments
|
||||
- pts-core: Do more to avoid zombie processes in stress-run manager
|
||||
- pts-core: More robustness of the results parser with spaces (or lack of) near colons
|
||||
- pts-core: Rewritten pts_test_suite internals
|
||||
- phodevi: Support for reading AMDGPU OverDrive overclock offset
|
||||
- phoromatic: Add generalized "Testing" page to Phoromatic Server
|
||||
- watchdog: new PTS module for checking sensor readings to suspend/quit testing if exceeded
|
||||
|
||||
Phoronix Test Suite 6.4.0 Milestone 2
|
||||
6 May 2016
|
||||
|
||||
- pts-core: Allow XML formatting from the Phoromatic Server web interface
|
||||
- pts-core: Reformat stress-run log messages
|
||||
- pts-core: Add "redis-server" as a potential external dependency for providing Redis
|
||||
- pts-core: Statically set dynamic_run_count_on_length_or_less to 60
|
||||
- pts-core: Adaptively increase regression threshold level in points_of_possible_interest() when too many results are being flagged
|
||||
- phoromatic: Fix selecting the same test itself on the "build suite" page
|
||||
- phoromatic: Do hard deletes when deleting results from admin area or results page
|
||||
- phoromatic: Add basic support for deleting "local suites" from Phoromatic web UI
|
||||
- phoromatic: Allow exporting system test run/build errors to the exported public results viewer
|
||||
- phoromatic: Add PTS_NO_REBOOT_ON_NETWORK_FAILURE environment variable for clients where if network failure occurs, Phoromatic clients will not reboot
|
||||
- phodevi: Add ambient.temp sensor for reporting ambient temperature, currently supports temperv14 USB sensors
|
||||
|
||||
Phoronix Test Suite 6.4.0 Milestone 1
|
||||
25 April 2016
|
||||
|
||||
- pts-core: Many improvements to stress-run functionality
|
||||
- pts-core: Add Midori to supported browser list
|
||||
- pts-core: Add default logging support while running stress-run using phoronix-test-suite-stress.log filename
|
||||
- pts-core: Additional fallback for locating if running PTS as a user from their home directory
|
||||
- pts-core: Append date to phoronix-test-suite-stress-XXX.log when running stress-run
|
||||
- phoromatic: Initial server-side implementation of new stress-run support via Phoromatic Server when going to "Run A Benchmark" and opting for stress mode
|
||||
- phoromatic: Initial client-side implementation of new stress-run support
|
||||
- phoromatic: Add basic email notification support to the Phoromatic export results viewer
|
||||
- phoromatic: Say "Stress Testing - XXX" as Phoromatic status messages when in stress-run mode
|
||||
- phoromatic: Add links to schedules/tickets from dashboard and system pages for active schedule/ticket on that system at the moment
|
||||
- phoromatic: Fix for handling post-run event script
|
||||
- phoromatic: Only run tests once each time called upon in stress-run mode
|
||||
- phoromatic: Show systems in groups on benchmark ticketing page
|
||||
- phoromatic: Don't reset fields when building suite and adding additional tests
|
||||
|
||||
Phoronix Test Suite 6.2.2
|
||||
9 March 2016
|
||||
|
||||
- pts-core: Fix for crash in stress-run mode
|
||||
- pts-core: Add OpenSUSE dynamic reverse dependency handler
|
||||
- pts-core: For the new result viewer, add Epiphany to the web browser list
|
||||
- pts-core: Void Linux external dependency support
|
||||
- pts-core: Alpine Linux (APK) external dependency support
|
||||
- phoromatic: Don't use a proxy (if available) when trying to connect from Phoromatic client to server
|
||||
|
||||
Phoronix Test Suite 6.2.1
|
||||
23 February 2016
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Phoronix Test Suite 6.2.1
|
||||
# Phoronix Test Suite 6.6.1
|
||||
http://www.phoronix-test-suite.com/
|
||||
|
||||
The **Phoronix Test Suite** is the most comprehensive testing and benchmarking
|
||||
platform available for Linux, Solaris, Mac OS X, and BSD operating systems. The
|
||||
platform available for Linux, Solaris, OS X, and BSD operating systems. The
|
||||
Phoronix Test Suite allows for carrying out tests in a fully automated manner
|
||||
from test installation to execution and reporting. All tests are meant to be
|
||||
easily reproducible, easy-to-use, and support fully automated execution. The
|
||||
@@ -27,7 +27,7 @@ able to upload their test results, profiles, and suites to OpenBenchmarking.org.
|
||||
A test profile is a single test that can be executed by the Phoronix Test Suite
|
||||
-- with a series of options possible within every test -- and a test suite is a
|
||||
seamless collection of test profiles and/or additional test suites. A test
|
||||
profile consists of a set of bash/shell scripts and XML files while a test suite
|
||||
profile consists of a set of Bash/shell scripts and XML files while a test suite
|
||||
is a single XML file.
|
||||
|
||||
[OpenBenchmarking.org](http://www.openbenchmarking.org/) also allows for
|
||||
@@ -61,7 +61,7 @@ architectures.
|
||||
The Phoronix Test Suite can be installed for system-wide usage or run locally
|
||||
without installation from the extracted tar.gz/zip package. The only hard
|
||||
dependency on the Phoronix Test Suite is having command-line support for PHP
|
||||
(PHP 5.3+) installed. A complete PHP stack (e.g. with web-server) is **not**
|
||||
(PHP 5.3+) installed. A complete PHP stack (e.g. with web server) is **not**
|
||||
needed, but merely the PHP command-line support, which is widely available from
|
||||
operating system package managers under the name `php`, `php5-cli`, or `php5`.
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2008 - 2015, Phoronix Media
|
||||
Copyright (C) 2008 - 2015, Michael Larabel
|
||||
Copyright (C) 2008 - 2016, Phoronix Media
|
||||
Copyright (C) 2008 - 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -23,7 +23,7 @@
|
||||
if(!is_executable("phoronix-test-suite") || !is_dir("pts-core/"))
|
||||
{
|
||||
echo "\nYou must run this script from the root directory of the phoronix-test-suite/ folder!\n";
|
||||
echo "Example: php5 deploy/deb-package/build-package-deb.php\n";
|
||||
echo "Example: php deploy/deb-package/build-package-deb.php\n";
|
||||
exit(0);
|
||||
}
|
||||
if(!is_executable('/usr/bin/dpkg'))
|
||||
@@ -63,8 +63,8 @@ $control_file .= "Section: Utilities\n";
|
||||
$control_file .= "Installed-Size: " . shell_exec("cd /tmp/pts-deb-builder/; du -s | cut -f 1");
|
||||
$control_file .= "Priority: optional\n";
|
||||
$control_file .= "Architecture: all\n";
|
||||
$control_file .= "Depends: php5-cli, php5-gd, php5-json\n";
|
||||
$control_file .= "Recommends: build-essential\n";
|
||||
$control_file .= "Depends: php-cli|php5-cli,php5-xml|php-xml\n";
|
||||
$control_file .= "Recommends: build-essential, php-gd|php5-gd\n";
|
||||
$control_file .= "Maintainer: Phoronix Media <trondheim-pts@phoronix-test-suite.com>\n";
|
||||
$control_file .= "Description: An Automated, Open-Source Testing Framework\n " . @str_replace("\n", " ", file_get_contents('pts-core/static/short-description.txt')) . "\n";
|
||||
$control_file .= "Homepage: http://www.phoronix-test-suite.com/ \n";
|
||||
|
||||
@@ -16,6 +16,10 @@ PHORONIX TEST SUITE PUBLIC TODO LIST:
|
||||
- Incremental result uploads support
|
||||
- Check with Phodevi's parsers what other tools support JSON outputs - e.g. http://karelzak.blogspot.com/2015/06/json-output-for-basic-tools.html for cleaner parsing
|
||||
|
||||
- Figure out why TestClientVersion in result file XML is missing after adding multiple systems, the previous ones are then blank
|
||||
- Restore the ReferenceID support in the results XML
|
||||
- Improve titles on tables like in: http://openbenchmarking.org/result/1603172-GA-AMDTONGA973
|
||||
|
||||
### PTS-GRAPH ###
|
||||
|
||||
- Rotated text alignment for some PNG graphixs is sometimes off by 90/180 degrees compared to SVG, e.g. http://openbenchmarking.org/s/Compiler
|
||||
@@ -70,6 +74,7 @@ PHORONIX TEST SUITE PUBLIC TODO LIST:
|
||||
- https://wiki.mikejung.biz/Benchmarking
|
||||
- http://dacapobench.org/
|
||||
- https://github.com/soumith/convnet-benchmarks
|
||||
- https://github.com/cavazos-lab/FinanceBench
|
||||
|
||||
### WEB SOCKET / HTML5 USER INTERFACE WORK ###
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH phoronix-test-suite 1 "www.phoronix-test-suite.com" "6.2.1"
|
||||
.TH phoronix-test-suite 1 "www.phoronix-test-suite.com" "6.6.1"
|
||||
.SH NAME
|
||||
phoronix-test-suite \- The Phoronix Test Suite is an extensible open-source platform for performing testing and performance evaluation.
|
||||
.SH SYNOPSIS
|
||||
@@ -6,7 +6,7 @@ phoronix-test-suite \- The Phoronix Test Suite is an extensible open-source plat
|
||||
.br
|
||||
.B phoronix-test-suite benchmark [test | suite]
|
||||
.SH DESCRIPTION
|
||||
The **Phoronix Test Suite** is the most comprehensive testing and benchmarking platform available for Linux, Solaris, Mac OS X, and BSD operating systems. The Phoronix Test Suite allows for carrying out tests in a fully automated manner from test installation to execution and reporting. All tests are meant to be easily reproducible, easy-to-use, and support fully automated execution. The Phoronix Test Suite is open-source under the GNU GPLv3 license and is developed by Phoronix Media in cooperation with partners.
|
||||
The **Phoronix Test Suite** is the most comprehensive testing and benchmarking platform available for Linux, Solaris, OS X, and BSD operating systems. The Phoronix Test Suite allows for carrying out tests in a fully automated manner from test installation to execution and reporting. All tests are meant to be easily reproducible, easy-to-use, and support fully automated execution. The Phoronix Test Suite is open-source under the GNU GPLv3 license and is developed by Phoronix Media in cooperation with partners.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.SH TEST INSTALLATION
|
||||
@@ -110,6 +110,9 @@ This option will print information that is useful to developers when debugging p
|
||||
.B interactive
|
||||
A simple text-driven interactive interface to the Phoronix Test Suite.
|
||||
.TP
|
||||
.B php-conf
|
||||
This option will print information that is useful to developers when debugging problems with the Phoronix Test Suite and/or test profiles and test suites.
|
||||
.TP
|
||||
.B system-info
|
||||
Display the installed system hardware and software information as detected by the Phoronix Test Suite Phodevi Library.
|
||||
.TP
|
||||
@@ -141,6 +144,9 @@ This option will list all test profiles that are currently installed on the syst
|
||||
.B list-missing-dependencies
|
||||
This option will list all of the packages / external test dependencies that are missing from the system that the Phoronix Test Suite may potentially need by select test profiles.
|
||||
.TP
|
||||
.B list-not-installed-tests
|
||||
This option will list all test profiles that are supported and available but presently NOT installed on the system.
|
||||
.TP
|
||||
.B list-possible-dependencies
|
||||
This option will list all of the packages / external test dependencies that are are potentially used by the Phoronix Test Suite.
|
||||
.TP
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@
|
||||
<body>
|
||||
<h1>Setup Overview</h1>
|
||||
<p>The Phoronix Test Suite supports Linux, Apple Mac OS X, Microsoft Windows, Solaris, Hurd, BSD, and other operating system environments. The only Linux distribution-specific code deals with the external dependencies support feature that are set by individual test profiles. If you are not running one of the supported Linux distributions, Solaris, BSD, or Mac OS X, you may need to install a package manually (as instructed by the Phoronix Test Suite) in order for a test to run. An example of an external dependency would be GCC and the OpenGL Utility Toolkit being needed for test profiles that build an OpenGL benchmark from source-code.</p>
|
||||
<p>Among the distributions where the Phoronix Test Suite has been officially tested include Ubuntu, Fedora, Mandriva / Mageia, Gentoo, PCLinuxOS, Arch Linux, Pardus, OpenSuSE, Optware, webOS, Zenwalk, CentOS, Red Hat Enterprise Linux, Oracle Linux, Scientific Linux, Debian, Mint, MEPIS, and Amazon Linux EC2.</p>
|
||||
<p>Among the distributions where the Phoronix Test Suite has been officially tested include Ubuntu, Fedora, Mandriva / Mageia, Gentoo, PCLinuxOS, Arch Linux, Pardus, OpenSuSE, Optware, webOS, Zenwalk, CentOS, Red Hat Enterprise Linux, Oracle Linux, Scientific Linux, Debian, Mint, MEPIS, Alpine Linux, Void Linux, Intel Clear Linux, and Amazon Linux EC2.</p>
|
||||
<p>Among the tested BSD distributions are FreeBSD, PC-BSD, NetBSD, OpenBSD, Debian GNU/kFreeBSD, and DragonflyBSD. Tested Solaris distributions include OpenSolaris, Solaris Express 11, Oracle Solaris 11, OpenIndiana, Illumos, and Nexenta.</p>
|
||||
<h1>Dependencies</h1>
|
||||
<p>The only required dependency for the Phoronix Test Suite is PHP 5.3 or newer. On Linux distributions, the needed package is commonly called <em>php5-cli</em> or <em>php-cli</em> or <em>php</em>. It is important to note that only PHP for the command-line is needed and not a web server (Apache) or other packages commonly associated with PHP and its usage by web-sites. The PHP5 version required is PHP 5.3+ and can also be found at <a href="http://www.php.net/">www.php.net</a>.</p>
|
||||
|
||||
@@ -1 +1 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>External Dependencies</title></head><body><p>The Phoronix Test Suite has a feature known as "External Dependencies" where the Phoronix Test Suite can attempt to automatically install some of the test-specific dependencies on supported distributions. If running on a distribution where there is currently no External Dependencies profile, the needed package name(s) are listed for manual installation.</p><p>Below are a list of the operating systems that currently have external dependencies support within the Phoronix Test Suite for the automatic installation of needed test files.<hr><ul></ul><li>Amazon</li><li>Angstrom</li><li>Arch Linux</li><li>CentOS</li><li>ClearOS</li><li>ClearOS Core Server</li><li>Debian</li><li>DragonFlyBSD</li><li>Fedora</li><li>Fluxbuntu</li><li>FreeBSD</li><li>GNU KFreeBSD</li><li>Gentoo</li><li>Goobuntu</li><li>HP</li><li>Joli Cloud</li><li>Linaro</li><li>Linux Mint</li><li>MEPIS</li><li>Mac OS X</li><li>MacPorts</li><li>Mageia</li><li>Mandriva</li><li>MeeGo</li><li>Moblin</li><li>Mythbuntu</li><li>NetBSD</li><li>Nexenta Core</li><li>OLPC</li><li>OpenIndiana</li><li>OpenMandriva</li><li>OpenSolaris</li><li>OpenSuSE</li><li>Optware</li><li>Oracle Server</li><li>PCLinuxOS</li><li>PTS Desktop Live</li><li>PTS Linux Live</li><li>Palm</li><li>Pardus Linux</li><li>Red Hat Enterprise</li><li>Red Hat Enterprise Server</li><li>SUSE</li><li>SUSE Linux</li><li>Scientific</li><li>ScientificSL</li><li>Ubuntu</li><li>Zenwalk</li><li>gNewSense</li></p></body></html>
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>External Dependencies</title></head><body><p>The Phoronix Test Suite has a feature known as "External Dependencies" where the Phoronix Test Suite can attempt to automatically install some of the test-specific dependencies on supported distributions. If running on a distribution where there is currently no External Dependencies profile, the needed package name(s) are listed for manual installation.</p><p>Below are a list of the operating systems that currently have external dependencies support within the Phoronix Test Suite for the automatic installation of needed test files.<hr><ul></ul><li>Alpine Linux</li><li>Amazon</li><li>Angstrom</li><li>Arch Linux</li><li>CentOS</li><li>ClearOS</li><li>ClearOS Core Server</li><li>Debian</li><li>DragonFlyBSD</li><li>Fedora</li><li>Fluxbuntu</li><li>FreeBSD</li><li>GNU KFreeBSD</li><li>Gentoo</li><li>Goobuntu</li><li>HP</li><li>Joli Cloud</li><li>Linaro</li><li>Linux Mint</li><li>MEPIS</li><li>Mac OS X</li><li>MacPorts</li><li>Mageia</li><li>Mandriva</li><li>MeeGo</li><li>Moblin</li><li>Mythbuntu</li><li>NetBSD</li><li>Nexenta Core</li><li>OLPC</li><li>OpenIndiana</li><li>OpenMandriva</li><li>OpenSolaris</li><li>OpenSuSE</li><li>Optware</li><li>Oracle Server</li><li>PCLinuxOS</li><li>PTS Desktop Live</li><li>PTS Linux Live</li><li>Palm</li><li>Pardus Linux</li><li>Red Hat Enterprise</li><li>Red Hat Enterprise Server</li><li>SUSE</li><li>SUSE Linux</li><li>Scientific</li><li>ScientificSL</li><li>Solus</li><li>Solus Linux</li><li>Ubuntu</li><li>Void Linux</li><li>Zenwalk</li><li>gNewSense</li></p></body></html>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
The Phoronix Test Suite itself is an open-source framework for conducting automated tests along with reporting of test results, detection of installed system software/hardware, and other features. Modules for the Phoronix Test Suite also allow for integration with git-bisect and other revision control systems for per-commit regression testing, system sensor monitoring, and other extras.
|
||||
|
||||
This framework is designed to be an extensible architecture so that new test profiles and suites can be easily added to represent performance benchmarks, unit tests, and other quantitative and qualitative (e.g. image quality comparison) measurements. Available through OpenBenchmarking.org, a collaborative storage platform developed in conjunction with the Phoronix Test Suite, are more than 200 individual test profiles and more than 60 test suites available by default from the Phoronix Test Suite. Independent users are also able to upload their test results, profiles, and suites to OpenBenchmarking.org. A test profile is a single test that can be executed by the Phoronix Test Suite -- with a series of options possible within every test -- and a test suite is a seamless collection of test profiles and/or additional test suites. A test profile consists of a set of bash/shell scripts and XML files while a test suite is a single XML file.
|
||||
This framework is designed to be an extensible architecture so that new test profiles and suites can be easily added to represent performance benchmarks, unit tests, and other quantitative and qualitative (e.g. image quality comparison) measurements. Available through OpenBenchmarking.org, a collaborative storage platform developed in conjunction with the Phoronix Test Suite, are more than 200 individual test profiles and more than 60 test suites available by default from the Phoronix Test Suite. Independent users are also able to upload their test results, profiles, and suites to OpenBenchmarking.org. A test profile is a single test that can be executed by the Phoronix Test Suite -- with a series of options possible within every test -- and a test suite is a seamless collection of test profiles and/or additional test suites. A test profile consists of a set of Bash/shell scripts and XML files while a test suite is a single XML file.
|
||||
|
||||
[OpenBenchmarking.org](http://www.openbenchmarking.org/) also allows for conducting side-by-side result comparisons, a central location for storing and sharing test results, and collaborating over test data. [Phoromatic](http://www.phoromatic.com/) is a complementary platform to OpenBenchmarking.org and the Phoronix Test Suite for interfacing with Phoronix Test Suite client(s) to automatically execute test runs on a timed, per-commit, or other trigger-driven basis. Phoromatic is designed for enterprise and allows for the easy management of multiple networked systems running Phoronix Test Suite clients via a single web-based interface.
|
||||
|
||||
@@ -12,7 +12,7 @@ Full details on the Phoronix Test Suite setup and usage is available from the in
|
||||
|
||||
The Phoronix Test Suite is supported on Linux, *BSD, Solaris, Mac OS X, and Windows systems. However, the most full-featured and well supported operating system for conducting the tests is Linux with some non-basic functionality not being available under all platforms. The Phoronix Test Suite software/framework is compatible with all major CPU architectures (e.g. i686, x86_64, ARM, PowerPC), but not all of the test profiles/suites are compatible with all architectures.
|
||||
|
||||
The Phoronix Test Suite can be installed for system-wide usage or run locally without installation from the extracted tar.gz/zip package. The only hard dependency on the Phoronix Test Suite is having command-line support for PHP (PHP 5.3+) installed. A complete PHP stack (e.g. with web-server) is **not** needed, but merely the PHP command-line support, which is widely available from operating system package managers under the name `php`, `php5-cli`, or `php5`.
|
||||
The Phoronix Test Suite can be installed for system-wide usage or run locally without installation from the extracted tar.gz/zip package. The only hard dependency on the Phoronix Test Suite is having command-line support for PHP (PHP 5.3+) installed. A complete PHP stack (e.g. with web server) is **not** needed, but merely the PHP command-line support, which is widely available from operating system package managers under the name `php`, `php5-cli`, or `php5`.
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
@@ -44,12 +44,18 @@ fi
|
||||
if [ ! "X$PHP_BIN" = "X" ] && [ -x $PHP_BIN ]
|
||||
then
|
||||
export PHP_BIN=$PHP_BIN
|
||||
elif [ -x /usr/bin/php7 ] || [ -x /usr/local/bin/php7 ] || [ -x /usr/pkg/bin/php7 ]
|
||||
then
|
||||
export PHP_BIN="php7"
|
||||
elif [ -x /usr/bin/php5 ] || [ -x /usr/local/bin/php5 ] || [ -x /usr/pkg/bin/php5 ]
|
||||
then
|
||||
export PHP_BIN="php5"
|
||||
elif [ -x /usr/bin/php ] || [ -x /usr/local/bin/php ] || [ -x /usr/pkg/bin/php ]
|
||||
then
|
||||
export PHP_BIN="php"
|
||||
elif [ -x /usr/php7/bin/php ]
|
||||
then
|
||||
export PHP_BIN="/usr/php7/bin/php"
|
||||
elif [ -x /usr/php5/bin/php ]
|
||||
then
|
||||
export PHP_BIN="/usr/php5/bin/php"
|
||||
@@ -65,6 +71,9 @@ then
|
||||
elif which php >/dev/null 2>&1 ;
|
||||
then
|
||||
export PHP_BIN="php"
|
||||
elif which php7 >/dev/null 2>&1 ;
|
||||
then
|
||||
export PHP_BIN="php7"
|
||||
elif which php5 >/dev/null 2>&1 ;
|
||||
then
|
||||
export PHP_BIN="php5"
|
||||
@@ -99,7 +108,7 @@ elif [ -x /usr/bin/apt-get ]
|
||||
then
|
||||
# Debian / Ubuntu Based Systems
|
||||
echo "The command to likely run for your operating system is: "
|
||||
echo "# apt-get install php5-cli"
|
||||
echo "# apt-get install php-cli php-xml"
|
||||
echo " "
|
||||
elif [ -x /usr/bin/dnf ]
|
||||
then
|
||||
@@ -129,7 +138,7 @@ elif [ -x /usr/local/sbin/pkg ] || [ -x /usr/sbin/pkg ]
|
||||
then
|
||||
# DragonFlyBSD and others
|
||||
echo "The command to likely run for your operating system is: "
|
||||
echo "# pkg install php5 php5-dom php5-zip php5-json php5-simplexml"
|
||||
echo "# pkg install php70 php70-dom php70-zip php70-json php70-simplexml"
|
||||
echo " "
|
||||
elif [ -x /usr/local/swupd ]
|
||||
then
|
||||
@@ -143,6 +152,36 @@ then
|
||||
echo "The command to likely run for your operating system is: "
|
||||
echo "# pkg_add php php-zip"
|
||||
echo " "
|
||||
elif [ -x /usr/sbin/equo ]
|
||||
then
|
||||
# Sabayon
|
||||
echo "The command to likely run for your operating system is: "
|
||||
echo "# equo install dev-lang/php"
|
||||
echo " "
|
||||
elif [ -x /usr/bin/xbps-install ] || [ -x /usr/sbin/xbps-install ]
|
||||
then
|
||||
# Void Linux
|
||||
echo "The command to likely run for your operating system is: "
|
||||
echo "# xbps-install -Sy php unzip"
|
||||
echo " "
|
||||
elif [ -x /usr/sbin/netpkg ]
|
||||
then
|
||||
# Zenwalk / Slackware
|
||||
echo "The command to likely run for your operating system is: "
|
||||
echo "# netpkg php"
|
||||
echo " "
|
||||
elif [ -x /sbin/apk ]
|
||||
then
|
||||
# Alpine Linux
|
||||
echo "The command to likely run for your operating system is: "
|
||||
echo "# apk add php php-dom php-zip php-json"
|
||||
echo " "
|
||||
elif [ -x /usr/bin/urpmi ]
|
||||
then
|
||||
# OpenMandriva Linux
|
||||
echo "The command to likely run for your operating system is: "
|
||||
echo "# urpmi php-cli"
|
||||
echo " "
|
||||
fi
|
||||
|
||||
exit
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2008 - 2015, Phoronix Media
|
||||
Copyright (C) 2008 - 2015, Michael Larabel
|
||||
Copyright (C) 2008 - 2016, Phoronix Media
|
||||
Copyright (C) 2008 - 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -37,8 +37,12 @@ class build_suite implements pts_option_interface
|
||||
$possible_suites = pts_openbenchmarking::available_suites();
|
||||
$possible_tests = pts_openbenchmarking::available_tests();
|
||||
|
||||
$suite_writer = new pts_test_suite_writer();
|
||||
$suite_writer->add_suite_information($suite_name, '1.0.0', $suite_maintainer, $suite_test_type, $suite_description);
|
||||
$new_suite = new pts_test_suite();
|
||||
$new_suite->set_title($suite_name);
|
||||
$new_suite->set_version('1.0.0');
|
||||
$new_suite->set_maintainer($suite_maintainer);
|
||||
$new_suite->set_suite_type($suite_test_type);
|
||||
$new_suite->set_description($suite_description);
|
||||
|
||||
foreach($r as $test_object)
|
||||
{
|
||||
@@ -51,12 +55,12 @@ class build_suite implements pts_option_interface
|
||||
for($i = 0; $i < count($args); $i++)
|
||||
{
|
||||
// Not binding the test profile version to this suite, otherwise change false to true
|
||||
$suite_writer->add_to_suite($test_object->get_identifier(false), $args[$i], $description[$i]);
|
||||
$new_suite->add_to_suite($test_object, $args[$i], $description[$i]);
|
||||
}
|
||||
}
|
||||
else if($test_object instanceof pts_test_suite)
|
||||
{
|
||||
$suite_writer->add_to_suite($test_object->get_identifier(), null, null);
|
||||
$new_suite->add_suite_tests_to_suite($test_object);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,12 +78,13 @@ class build_suite implements pts_option_interface
|
||||
|
||||
for($i = 0; $i < count($args); $i++)
|
||||
{
|
||||
$suite_writer->add_to_suite($test_to_add, $args[$i], $description[$i]);
|
||||
$new_suite->add_to_suite($test_profile, $args[$i], $description[$i]);
|
||||
}
|
||||
break;
|
||||
case 'Add Sub-Suite':
|
||||
$suite_to_add = pts_user_io::prompt_text_menu('Enter test suite', $possible_suites);
|
||||
$suite_writer->add_to_suite($suite_to_add, null, null);
|
||||
$test_suite = new pts_test_suite($suite_to_add);
|
||||
$new_suite->add_suite_tests_to_suite($test_suite);
|
||||
break;
|
||||
}
|
||||
echo PHP_EOL . 'Available Options:' . PHP_EOL;
|
||||
@@ -87,13 +92,9 @@ class build_suite implements pts_option_interface
|
||||
}
|
||||
while($input_option != 'Save & Exit');
|
||||
|
||||
$suite_identifier = $suite_writer->clean_save_name_string($suite_name);
|
||||
$save_to = PTS_TEST_SUITE_PATH . 'local/' . $suite_identifier . '/suite-definition.xml';
|
||||
mkdir(dirname($save_to));
|
||||
|
||||
if($suite_writer->save_xml($save_to) != false)
|
||||
if($new_suite->save_xml($suite_name) != false)
|
||||
{
|
||||
echo PHP_EOL . PHP_EOL . 'Saved To: ' . $save_to . PHP_EOL . 'To run this suite, type: phoronix-test-suite benchmark ' . $suite_identifier . PHP_EOL . PHP_EOL;
|
||||
echo PHP_EOL . PHP_EOL . 'Saved -- to run this suite, type: phoronix-test-suite benchmark ' . $new_suite->get_identifier() . PHP_EOL . PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,11 @@ class debug_render_test implements pts_option_interface
|
||||
pts_network::download_file('http://linuxbenchmarking.com/misc/mega-render-test-310815.tar.bz2', $render_dir . 'mega-render-test.tar.bz2');
|
||||
pts_compression::archive_extract($render_dir . 'mega-render-test.tar.bz2');
|
||||
}
|
||||
define('PATH_TO_EXPORTED_PHOROMATIC_DATA', $render_dir . 'mega-render-test-310815/');
|
||||
|
||||
if(!defined('PATH_TO_EXPORTED_PHOROMATIC_DATA'))
|
||||
{
|
||||
define('PATH_TO_EXPORTED_PHOROMATIC_DATA', $render_dir . 'mega-render-test-310815/');
|
||||
}
|
||||
|
||||
error_reporting(E_ALL);
|
||||
ini_set('memory_limit','2048M');
|
||||
|
||||
@@ -45,6 +45,12 @@ class finish_run implements pts_option_interface
|
||||
|
||||
foreach($result_file->get_result_objects() as $pos => $result_object)
|
||||
{
|
||||
// Don't load null test profile identifier tests into the run queue
|
||||
if($result_object->test_profile->get_identifier() == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$this_result_object_identifiers = $result_object->test_result_buffer->get_identifiers();
|
||||
|
||||
foreach($system_identifiers as $system_identifier)
|
||||
|
||||
@@ -53,8 +53,13 @@ class info implements pts_option_interface
|
||||
echo 'Suite Type: ' . $o->get_suite_type() . PHP_EOL;
|
||||
echo 'Unique Tests: ' . $o->get_unique_test_count() . PHP_EOL;
|
||||
echo 'Suite Description: ' . $o->get_description() . PHP_EOL;
|
||||
echo PHP_EOL;
|
||||
echo $o->pts_format_contained_tests_string();
|
||||
echo PHP_EOL . 'Contained Tests: ' . PHP_EOL;
|
||||
$test_table = array();
|
||||
foreach($o->get_contained_test_result_objects() as $result_obj)
|
||||
{
|
||||
$test_table[] = array($result_obj->test_profile->get_title(), $result_obj->get_arguments_description());
|
||||
}
|
||||
echo pts_user_io::display_text_table($test_table, ' ', 1);
|
||||
echo PHP_EOL;
|
||||
}
|
||||
else if($o instanceof pts_test_profile)
|
||||
|
||||
@@ -31,7 +31,7 @@ class list_available_suites implements pts_option_interface
|
||||
}
|
||||
public static function run($r)
|
||||
{
|
||||
$available_suites = pts_openbenchmarking::available_suites(false);
|
||||
$available_suites = array_merge(pts_openbenchmarking::available_suites(false), pts_tests::local_suites());
|
||||
pts_client::$display->generic_heading('Available Suites');
|
||||
|
||||
if(count($available_suites) > 0)
|
||||
|
||||
@@ -49,9 +49,9 @@ class list_available_tests implements pts_option_interface
|
||||
$test_count++;
|
||||
}
|
||||
|
||||
foreach(pts_file_io::glob(PTS_TEST_PROFILE_PATH . 'local/*/test-definition.xml') as $path)
|
||||
foreach(pts_tests::local_tests() as $identifier)
|
||||
{
|
||||
$test_profile = new pts_test_profile('local/' . basename(dirname($path)));
|
||||
$test_profile = new pts_test_profile($identifier);
|
||||
|
||||
if($test_profile->get_title() != null && $test_profile->is_supported(false))
|
||||
{
|
||||
|
||||
82
pts-core/commands/list_not_installed_tests.php
Normal file
82
pts-core/commands/list_not_installed_tests.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2016, Phoronix Media
|
||||
Copyright (C) 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class list_not_installed_tests implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'Information';
|
||||
const doc_description = 'This option will list all test profiles that are supported and available but presently NOT installed on the system.';
|
||||
|
||||
public static function command_aliases()
|
||||
{
|
||||
return array('list_uninstalled_tests');
|
||||
}
|
||||
public static function run($r)
|
||||
{
|
||||
pts_client::$display->generic_heading('Available Tests Not Installed');
|
||||
$test_count = 0;
|
||||
foreach(pts_openbenchmarking::available_tests(false) as $identifier)
|
||||
{
|
||||
$repo = substr($identifier, 0, strpos($identifier, '/'));
|
||||
$id = substr($identifier, strlen($repo) + 1);
|
||||
$repo_index = pts_openbenchmarking::read_repository_index($repo);
|
||||
|
||||
if((!empty($repo_index['tests'][$id]['supported_platforms']) && !in_array(phodevi::operating_system(), $repo_index['tests'][$id]['supported_platforms'])) || empty($repo_index['tests'][$id]['title']))
|
||||
{
|
||||
// Don't show unsupported tests
|
||||
continue;
|
||||
}
|
||||
|
||||
$test_profile = new pts_test_profile($identifier);
|
||||
if($test_profile->is_test_installed())
|
||||
{
|
||||
// Only show uninstalled tests
|
||||
continue;
|
||||
}
|
||||
|
||||
echo sprintf('%-30ls - %-35ls %-9ls', $identifier, $repo_index['tests'][$id]['title'], $repo_index['tests'][$id]['test_type']) . PHP_EOL;
|
||||
$test_count++;
|
||||
}
|
||||
|
||||
foreach(pts_tests::local_tests() as $identifier)
|
||||
{
|
||||
$test_profile = new pts_test_profile($identifier);
|
||||
if($test_profile->is_test_installed())
|
||||
{
|
||||
// Only show uninstalled tests
|
||||
continue;
|
||||
}
|
||||
|
||||
if($test_profile->get_title() != null && $test_profile->is_supported(false))
|
||||
{
|
||||
echo sprintf('%-30ls - %-35ls %-9ls', $test_profile->get_identifier(), $test_profile->get_title(), $test_profile->get_test_hardware_type()) . PHP_EOL;
|
||||
$test_count++;
|
||||
}
|
||||
}
|
||||
|
||||
if($test_count == 0)
|
||||
{
|
||||
echo PHP_EOL . 'No tests found. Please check that you have Internet connectivity to download test profile data from OpenBenchmarking.org. The Phoronix Test Suite has documentation on configuring the network setup, proxy settings, and PHP network options. Please contact Phoronix Media if you continuing to experience problems.' . PHP_EOL . PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
87
pts-core/commands/php_conf.php
Normal file
87
pts-core/commands/php_conf.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2016, Phoronix Media
|
||||
Copyright (C) 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class php_conf implements pts_option_interface
|
||||
{
|
||||
const doc_section = 'System';
|
||||
const doc_description = 'This option will print information that is useful to developers when debugging problems with the Phoronix Test Suite and/or test profiles and test suites.';
|
||||
|
||||
public static function run($r)
|
||||
{
|
||||
$table = array();
|
||||
$table[] = array('PHP:', PTS_PHP_VERSION);
|
||||
$table[] = array('PHP VERSION ID: ', PHP_VERSION_ID);
|
||||
$table[] = array('PHP BINARY: ', getenv('PHP_BIN'));
|
||||
echo PHP_EOL . pts_user_io::display_text_table($table, null, 0) . PHP_EOL;
|
||||
echo PHP_EOL;
|
||||
echo 'MAIN CAPABILITY CHECK: ' . PHP_EOL;
|
||||
pts_client::program_requirement_checks(false, true);
|
||||
|
||||
// TODO: ultimately centralize this below list so it doesn't go stale
|
||||
// TODO: when making it uniform, change function_exists() calls to say pts_function_check() that will read the cached list
|
||||
$functions_to_check = array(
|
||||
'posix_getpid',
|
||||
'posix_getuid',
|
||||
'posix_getpwuid',
|
||||
'posix_isatty',
|
||||
'posix_kill',
|
||||
'posix_setsid',
|
||||
'preg_replace',
|
||||
'socket_create_listen',
|
||||
'pcntl_fork',
|
||||
'pcntl_signal',
|
||||
'ssh2_connect',
|
||||
'sqlite_escape_string',
|
||||
'gzinflate',
|
||||
'gzdeflate',
|
||||
'gzcompress',
|
||||
'imagecreatefromstring',
|
||||
'imagecreatefrompng',
|
||||
'filter_var',
|
||||
'ctype_digit',
|
||||
'ctype_alnum',
|
||||
'finfo_open',
|
||||
'hash_file',
|
||||
'cli_set_process_title',
|
||||
'curl_init',
|
||||
'stream_context_set_params',
|
||||
'imagepng',
|
||||
'imagecreatefromgif',
|
||||
'zip_open',
|
||||
'imagettftext',
|
||||
'imageantialias',
|
||||
'json_decode',
|
||||
'simplexml_load_string',
|
||||
'timezone_name_from_abbr'
|
||||
);
|
||||
sort($functions_to_check);
|
||||
$table = array();
|
||||
foreach($functions_to_check as $func)
|
||||
{
|
||||
$table[] = array($func, (function_exists($func) ? 'PRESENT' : 'MISSING'));
|
||||
}
|
||||
echo 'OPTIONAL FUNCTION CHECKS: ';
|
||||
echo PHP_EOL . pts_user_io::display_text_table($table, null, 0) . PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2008 - 2015, Phoronix Media
|
||||
Copyright (C) 2008 - 2015, Michael Larabel
|
||||
Copyright (C) 2008 - 2016, Phoronix Media
|
||||
Copyright (C) 2008 - 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -44,25 +44,25 @@ class result_file_to_suite implements pts_option_interface
|
||||
$suite_maintainer = pts_user_io::prompt_user_input('Enter suite maintainer name');
|
||||
$suite_description = pts_user_io::prompt_user_input('Enter suite description');
|
||||
|
||||
$suite_writer = new pts_test_suite_writer();
|
||||
$suite_writer->add_suite_information($suite_name, '1.0.0', $suite_maintainer, $suite_test_type, $suite_description);
|
||||
$new_suite = new pts_test_suite();
|
||||
$new_suite->set_title($suite_name);
|
||||
$new_suite->set_version('1.0.0');
|
||||
$new_suite->set_maintainer($suite_maintainer);
|
||||
$new_suite->set_suite_type($suite_test_type);
|
||||
$new_suite->set_description($suite_description);
|
||||
|
||||
|
||||
// Read results file
|
||||
$result_file = new pts_result_file($result_file);
|
||||
|
||||
foreach($result_file->get_result_objects() as $result_object)
|
||||
{
|
||||
$suite_writer->add_to_suite_from_result_object($result_object);
|
||||
$test = new pts_test_profile($result_object->test_profile->get_identifier());
|
||||
$new_suite->add_to_suite($test, $result_object->get_arguments(), $result_object->get_arguments_description());
|
||||
}
|
||||
|
||||
// Finish it off
|
||||
$suite_identifier = pts_test_run_manager::clean_save_name($suite_name);
|
||||
mkdir(PTS_TEST_SUITE_PATH . 'local/' . $suite_identifier);
|
||||
$save_to = PTS_TEST_SUITE_PATH . 'local/' . $suite_identifier . '/suite-definition.xml';
|
||||
|
||||
if($suite_writer->save_xml($save_to) != false)
|
||||
if($new_suite->save_xml($suite_name) != false)
|
||||
{
|
||||
echo PHP_EOL . PHP_EOL . 'Saved To: ' . $save_to . PHP_EOL . 'To run this suite, type: phoronix-test-suite benchmark ' . $suite_identifier . PHP_EOL . PHP_EOL;
|
||||
echo PHP_EOL . PHP_EOL . 'Saved -- to run this suite, type: phoronix-test-suite benchmark ' . $new_suite->get_identifier() . PHP_EOL . PHP_EOL;
|
||||
}
|
||||
}
|
||||
public static function invalid_command($passed_args = null)
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2015, Phoronix Media
|
||||
Copyright (C) 2015, Michael Larabel
|
||||
Copyright (C) 2015 - 2016, Phoronix Media
|
||||
Copyright (C) 2015 - 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -33,7 +33,7 @@ class stress_run implements pts_option_interface
|
||||
}
|
||||
public static function run($to_run)
|
||||
{
|
||||
pts_test_run_manager::set_batch_mode(array(
|
||||
$test_run_manager = new pts_stress_run_manager(array(
|
||||
'UploadResults' => false,
|
||||
'SaveResults' => false,
|
||||
'PromptForTestDescription' => false,
|
||||
@@ -45,13 +45,34 @@ class stress_run implements pts_option_interface
|
||||
|
||||
$tests_to_run_concurrently = 2;
|
||||
|
||||
echo PHP_EOL . 'STRESS-RUN ENVIRONMENT VARIABLES:' . PHP_EOL;
|
||||
|
||||
if(($j = getenv('PTS_CONCURRENT_TEST_RUNS')) && is_numeric($j) && $j > 1)
|
||||
{
|
||||
$tests_to_run_concurrently = $j;
|
||||
echo 'PTS_CONCURRENT_TEST_RUNS set; running ' . $tests_to_run_concurrently . ' tests concurrently.' . PHP_EOL;
|
||||
echo PHP_EOL . 'PTS_CONCURRENT_TEST_RUNS set; running ' . $tests_to_run_concurrently . ' tests concurrently.' . PHP_EOL . PHP_EOL;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo PHP_EOL . 'PTS_CONCURRENT_TEST_RUNS: Set the PTS_CONCURRENT_TEST_RUNS environment variable to specify how many tests should be run concurrently during the stress-run process. If not specified, defaults to 2.' . PHP_EOL . PHP_EOL;
|
||||
}
|
||||
|
||||
$test_run_manager = new pts_test_run_manager(true);
|
||||
// Run the actual tests
|
||||
$total_loop_time = pts_client::read_env('TOTAL_LOOP_TIME');
|
||||
if($total_loop_time == 'infinite')
|
||||
{
|
||||
$total_loop_time = 'infinite';
|
||||
echo PHP_EOL . 'TOTAL_LOOP_TIME set; running tests in an infinite loop until otherwise triggered' . PHP_EOL . PHP_EOL;
|
||||
}
|
||||
else if($total_loop_time && is_numeric($total_loop_time) && $total_loop_time > 1)
|
||||
{
|
||||
echo PHP_EOL . 'TOTAL_LOOP_TIME set; running tests for ' . $total_loop_time . ' minutes' . PHP_EOL . PHP_EOL;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo PHP_EOL . 'TOTAL_LOOP_TIME: Set the TOTAL_LOOP_TIME environment variable if wishing to specify (in minutes) how long to run the stress-run process.' . PHP_EOL . PHP_EOL;
|
||||
$total_loop_time = false;
|
||||
}
|
||||
|
||||
/*
|
||||
if(count($to_run) < $tests_to_run_concurrently)
|
||||
@@ -72,22 +93,6 @@ class stress_run implements pts_option_interface
|
||||
return false;
|
||||
}
|
||||
|
||||
// Run the actual tests
|
||||
$total_loop_time = pts_client::read_env('TOTAL_LOOP_TIME');
|
||||
if($total_loop_time == 'infinite')
|
||||
{
|
||||
$total_loop_time = 'infinite';
|
||||
echo 'TOTAL_LOOP_TIME set; running tests in an infinite loop until otherwise triggered' . PHP_EOL;
|
||||
}
|
||||
else if($total_loop_time && is_numeric($total_loop_time) && $total_loop_time > 9)
|
||||
{
|
||||
$total_loop_time = $total_loop_time * 60;
|
||||
echo 'TOTAL_LOOP_TIME set; running tests for ' . ($total_loop_time / 60) . ' minutes' . PHP_EOL;
|
||||
}
|
||||
else
|
||||
{
|
||||
$total_loop_time = false;
|
||||
}
|
||||
//$test_run_manager->pre_execution_process();
|
||||
$test_run_manager->multi_test_stress_run_execute($tests_to_run_concurrently, $total_loop_time);
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2009 - 2015, Phoronix Media
|
||||
Copyright (C) 2009 - 2015, Michael Larabel
|
||||
Copyright (C) 2009 - 2016, Phoronix Media
|
||||
Copyright (C) 2009 - 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -34,8 +34,7 @@ class system_sensors implements pts_option_interface
|
||||
|
||||
if($supported_devices === NULL)
|
||||
{
|
||||
self::print_sensor($sensor, NULL);
|
||||
continue;
|
||||
$supported_devices = array(null);
|
||||
}
|
||||
|
||||
foreach($supported_devices as $device)
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2010 - 2015, Phoronix Media
|
||||
Copyright (C) 2010 - 2015, Michael Larabel
|
||||
Copyright (C) 2010 - 2016, Phoronix Media
|
||||
Copyright (C) 2010 - 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -39,10 +39,10 @@ class upload_test_suite implements pts_option_interface
|
||||
{
|
||||
pts_client::$display->generic_heading($r[0]);
|
||||
|
||||
if(pts_validation::validate_test_suite($test_suite))
|
||||
if(pts_validation::validate_test_suite($test_suite) && $test_suite->get_file_location() != null)
|
||||
{
|
||||
$zip_file = PTS_OPENBENCHMARKING_SCRATCH_PATH . $test_suite->get_identifier(false) . '-' . $test_suite->get_version() . '.zip';
|
||||
$zip_created = pts_compression::zip_archive_create($zip_file, $test_suite->xml_parser->getFileLocation());
|
||||
$zip_created = pts_compression::zip_archive_create($zip_file, $test_suite->get_file_location());
|
||||
|
||||
if($zip_created == false)
|
||||
{
|
||||
@@ -50,11 +50,6 @@ class upload_test_suite implements pts_option_interface
|
||||
return false;
|
||||
}
|
||||
|
||||
$zip = new ZipArchive();
|
||||
$zip->open($zip_file);
|
||||
$zip->renameName(basename($test_suite->xml_parser->getFileLocation()), 'suite-definition.xml');
|
||||
$zip->close();
|
||||
|
||||
$commit_description = pts_user_io::prompt_user_input('Enter a test commit description', false);
|
||||
|
||||
echo PHP_EOL;
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2015 - 2016, Phoronix Media
|
||||
Copyright (C) 2015 - 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class opensuse_dependency_handler implements pts_dependency_handler
|
||||
{
|
||||
public static function what_provides($files_needed)
|
||||
{
|
||||
$packages_needed = array();
|
||||
foreach(pts_arrays::to_array($files_needed) as $file)
|
||||
{
|
||||
if(pts_client::executable_in_path('zypper'))
|
||||
{
|
||||
$zypper_provides = self::run_zypper_provides($file);
|
||||
if($zypper_provides != null)
|
||||
{
|
||||
$packages_needed[$file] = $zypper_provides;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $packages_needed;
|
||||
}
|
||||
protected static function run_zypper_provides($arg)
|
||||
{
|
||||
$line = shell_exec('zypper search --provides --match-exact ' . $arg . ' 2>/dev/null');
|
||||
|
||||
if(($x = strpos($line, '-----')) == false)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
$line = substr($line, $x);
|
||||
$line = substr($line, strpos($line, "\n") + 2);
|
||||
$line = trim(substr($line, 0, strpos($line, PHP_EOL)));
|
||||
$parts = explode('|', $line);
|
||||
|
||||
if(isset($parts[1]))
|
||||
{
|
||||
return trim($parts[1]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
7
pts-core/external-test-dependencies/scripts/install-alpine-packages.sh
Executable file
7
pts-core/external-test-dependencies/scripts/install-alpine-packages.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Alpine Linux package installation
|
||||
|
||||
echo "Please enter your root password below:" 1>&2
|
||||
su root -c "apk add -v $*"
|
||||
exit
|
||||
@@ -3,5 +3,5 @@
|
||||
# Arch package installation
|
||||
|
||||
echo "Please enter your root password below:" 1>&2
|
||||
su root -c "pacman -Sy --noconfirm $*"
|
||||
su root -c "pacman -Sy --noconfirm --needed $*"
|
||||
exit
|
||||
|
||||
@@ -1,43 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
#dports pkg
|
||||
pkg install $*
|
||||
pkg install -y $*
|
||||
|
||||
|
||||
# Old dropped DragonFly pkgsrc support from older releases
|
||||
# DragonFlyBSD pkgsrc package installation
|
||||
exit
|
||||
|
||||
echo "For now with this test profile script, please run: phoronix-test-suite install-dependencies xxx as root."
|
||||
|
||||
# Check that pkgsrc is setup, below code should work for making sure good state with at least DragonFlyBSD
|
||||
if [ -d /usr/pkgsrc ] && [ ! -d /usr/pkgsrc/devel ];
|
||||
then
|
||||
cd /usr
|
||||
|
||||
if [ -d /usr/pkgsrc/.git ];
|
||||
then
|
||||
make pkgsrc-update
|
||||
else
|
||||
make pkgsrc-create
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d /usr/pkgsrc ]
|
||||
then
|
||||
for portdir in $*
|
||||
do
|
||||
if [ -d /usr/pkgsrc/$portdir ];
|
||||
then
|
||||
cd /usr/pkgsrc/$portdir
|
||||
bmake install clean BATCH="yes"
|
||||
fi
|
||||
done
|
||||
elif [ -x /usr/local/sbin/pkg ]
|
||||
then
|
||||
for portdir in $*
|
||||
do
|
||||
# DragonFlyBSD 3.6 now uses dports by default and this method seems to work fine for hitting most packages based upon earlier pkgsrc basename
|
||||
pkg install -y `basename $portdir`
|
||||
done
|
||||
fi
|
||||
|
||||
7
pts-core/external-test-dependencies/scripts/install-solus-packages.sh
Executable file
7
pts-core/external-test-dependencies/scripts/install-solus-packages.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Pardus package installation
|
||||
|
||||
echo "Please enter your root password below:" 1>&2
|
||||
su root -c "pisi install --ignore-safety --yes-all $*"
|
||||
exit
|
||||
7
pts-core/external-test-dependencies/scripts/install-void-packages.sh
Executable file
7
pts-core/external-test-dependencies/scripts/install-void-packages.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Void Linux package installation
|
||||
|
||||
echo "Please enter your root password below:" 1>&2
|
||||
su root -c "xbps-install -Sy $*"
|
||||
exit
|
||||
200
pts-core/external-test-dependencies/xml/alpine-packages.xml
Normal file
200
pts-core/external-test-dependencies/xml/alpine-packages.xml
Normal file
@@ -0,0 +1,200 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet type="text/xsl" href="xsl/pts-exdep-viewer.xsl" ?>
|
||||
<PhoronixTestSuite>
|
||||
<ExternalDependencies>
|
||||
<Information>
|
||||
<Name>Alpine Linux</Name>
|
||||
<Aliases></Aliases>
|
||||
<PackageManager>apk</PackageManager>
|
||||
</Information>
|
||||
<Package>
|
||||
<GenericName>common-dependencies</GenericName>
|
||||
<PackageName>unzip</PackageName>
|
||||
<FileCheck>unzip</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>gtk-development</GenericName>
|
||||
<PackageName>gtk+ gtk+2.0 gtk+3.0</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>sdl2-development</GenericName>
|
||||
<PackageName>sdl sdl_image sdl_mixer</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>sdl-development</GenericName>
|
||||
<PackageName>sdl sdl_image sdl_mixer</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>glut</GenericName>
|
||||
<PackageName>freeglut</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>libpng-development</GenericName>
|
||||
<PackageName>libpng</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>openssl-development</GenericName>
|
||||
<PackageName>openssl</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>build-utilities</GenericName>
|
||||
<PackageName>gcc make build-base automake autoconf</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>cairo-development</GenericName>
|
||||
<PackageName>cairo</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>xorg-development</GenericName>
|
||||
<PackageName>xorg-server</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>tiff</GenericName>
|
||||
<PackageName>tiff</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>bison</GenericName>
|
||||
<PackageName>bison</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>flex</GenericName>
|
||||
<PackageName>flex</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>imlib2-development</GenericName>
|
||||
<PackageName>imlib2</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>java</GenericName>
|
||||
<PackageName>java-common</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>portaudio-development</GenericName>
|
||||
<PackageName>portaudio</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>fortran-compiler</GenericName>
|
||||
<PackageName>gfortran</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>glew</GenericName>
|
||||
<PackageName>glew</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>bc</GenericName>
|
||||
<PackageName>bc</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>scons</GenericName>
|
||||
<PackageName>scons</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>smartmontools</GenericName>
|
||||
<PackageName>smartmontools</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>zlib-development</GenericName>
|
||||
<PackageName>zlib</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>jpeg-development</GenericName>
|
||||
<PackageName>libjpeg-turbo</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>libaio-development</GenericName>
|
||||
<PackageName>libaio</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>pcre</GenericName>
|
||||
<PackageName>pcre</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>perl</GenericName>
|
||||
<PackageName>perl</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>vorbis-development</GenericName>
|
||||
<PackageName>libvorbis</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>p7zip</GenericName>
|
||||
<PackageName>p7zip</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>autoconf</GenericName>
|
||||
<PackageName>autoconf</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>libtool</GenericName>
|
||||
<PackageName>libtool</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>ncurses-development</GenericName>
|
||||
<PackageName>ncurses</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>popt</GenericName>
|
||||
<PackageName>popt</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>curl</GenericName>
|
||||
<PackageName>curl</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>fftw3-development</GenericName>
|
||||
<PackageName>fftw</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>cmake</GenericName>
|
||||
<PackageName>cmake</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>boost-development</GenericName>
|
||||
<PackageName>boost</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>bzip2-development</GenericName>
|
||||
<PackageName>bzip2</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>tcl</GenericName>
|
||||
<PackageName>tcl</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>glibc-development</GenericName>
|
||||
<PackageName>libc-dev</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python</GenericName>
|
||||
<PackageName>python</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>yasm</GenericName>
|
||||
<PackageName>yasm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>gmp-library</GenericName>
|
||||
<PackageName>gmp</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>subversion</GenericName>
|
||||
<PackageName>subversion</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>git</GenericName>
|
||||
<PackageName>git</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>tinyxml</GenericName>
|
||||
<PackageName>libtinyxml</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>attr</GenericName>
|
||||
<PackageName>attr</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>httpd</GenericName>
|
||||
<PackageName>apache2</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
@@ -36,7 +36,7 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>build-utilities</GenericName>
|
||||
<PackageName>gcc</PackageName>
|
||||
<PackageName>gcc make autoconf</PackageName>
|
||||
<FileCheck>g++</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
@@ -73,7 +73,7 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>fortran-compiler</GenericName>
|
||||
<PackageName>gcc-fortran</PackageName>
|
||||
<PackageName>gcc-fortran-multilib</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>glew</GenericName>
|
||||
@@ -230,5 +230,25 @@
|
||||
<GenericName>httpd</GenericName>
|
||||
<PackageName>apache</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>redis-server</GenericName>
|
||||
<PackageName>redis</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>opencv</GenericName>
|
||||
<PackageName>opencv</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>perl-digest-md5</GenericName>
|
||||
<PackageName>perl-digest-md5-file perl6-digest-md5</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-scipy</GenericName>
|
||||
<PackageName>python2-scipy</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-sklearn</GenericName>
|
||||
<PackageName>python2-scikit-learn</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<ExternalDependencies>
|
||||
<Information>
|
||||
<Name>DragonFlyBSD</Name>
|
||||
<PackageManager>pkg</PackageManager>
|
||||
</Information>
|
||||
<Package>
|
||||
<GenericName>common-dependencies</GenericName>
|
||||
|
||||
@@ -266,5 +266,25 @@
|
||||
<GenericName>golang</GenericName>
|
||||
<PackageName>golang</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>redis-server</GenericName>
|
||||
<PackageName>redis</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>opencv</GenericName>
|
||||
<PackageName>opencv-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>perl-digest-md5</GenericName>
|
||||
<PackageName>perl-Digest-MD5</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-scipy</GenericName>
|
||||
<PackageName>scipy</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-sklearn</GenericName>
|
||||
<PackageName>python-scikit-learn</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
@@ -408,7 +408,7 @@
|
||||
<GenericName>attr</GenericName>
|
||||
<Title>Attr</Title>
|
||||
<PossibleNames>attr, libattr1-dev</PossibleNames>
|
||||
<FileCheck>attr/xattr.h</FileCheck>
|
||||
<FileCheck>attr/xattr.h OR sys/xattr.h</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>httpd</GenericName>
|
||||
@@ -422,5 +422,35 @@
|
||||
<PossibleNames>golang, go-doc</PossibleNames>
|
||||
<FileCheck>/usr/bin/go</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>redis-server</GenericName>
|
||||
<Title>Redis</Title>
|
||||
<PossibleNames>redis, redis-server</PossibleNames>
|
||||
<FileCheck>/usr/bin/redis-server</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>opencv</GenericName>
|
||||
<Title>OpenCV</Title>
|
||||
<PossibleNames>opencv</PossibleNames>
|
||||
<FileCheck>opencv/cv.h OR opencv2/core.hpp</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>perl-digest-md5</GenericName>
|
||||
<Title>Perl interface to the MD5 Algorithm</Title>
|
||||
<PossibleNames>perl-Digest-MD5, perl-Digest-Perl-MD5, libdigest-md5</PossibleNames>
|
||||
<FileCheck>Digest/MD5.pm OR /usr/share/doc/perl-Digest-MD5 OR /usr/share/perl5/Digest/</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-scipy</GenericName>
|
||||
<Title>Python Scipy</Title>
|
||||
<PossibleNames>python-scipy</PossibleNames>
|
||||
<FileCheck>/usr/lib/python2.7/dist-packages/scipy</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-sklearn</GenericName>
|
||||
<Title>Python Sklearn</Title>
|
||||
<PossibleNames>python-sklearn</PossibleNames>
|
||||
<FileCheck>/usr/lib/python2.7/dist-packages/scikit_learn-0.17.egg-info</FileCheck>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
@@ -256,5 +256,25 @@
|
||||
<GenericName>golang</GenericName>
|
||||
<PackageName>dev-lang/go</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>redis-server</GenericName>
|
||||
<PackageName>dev-db/redis</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>opencv</GenericName>
|
||||
<PackageName>media-libs/opencv</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>perl-digest-md5</GenericName>
|
||||
<PackageName>perl-core/Digest-MD5</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-scipy</GenericName>
|
||||
<PackageName>sci-libs/scipy</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-sklearn</GenericName>
|
||||
<PackageName>sci-libs/scikits_learn</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
@@ -239,5 +239,17 @@
|
||||
<GenericName>golang</GenericName>
|
||||
<PackageName>golang</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>redis-server</GenericName>
|
||||
<PackageName>redis</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>opencv</GenericName>
|
||||
<PackageName>opencv-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>perl-digest-md5</GenericName>
|
||||
<PackageName>perl-Digest-MD5</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
@@ -262,5 +262,25 @@
|
||||
<GenericName>golang</GenericName>
|
||||
<PackageName>go-doc</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>redis-server</GenericName>
|
||||
<PackageName>redis</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>opencv</GenericName>
|
||||
<PackageName>opencv-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>perl-digest-md5</GenericName>
|
||||
<PackageName>perl-Digest-Perl-MD5</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-scipy</GenericName>
|
||||
<PackageName>python-scipy</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-sklearn</GenericName>
|
||||
<PackageName>scikit-learn</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
191
pts-core/external-test-dependencies/xml/solus-packages.xml
Normal file
191
pts-core/external-test-dependencies/xml/solus-packages.xml
Normal file
@@ -0,0 +1,191 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet type="text/xsl" href="xsl/pts-exdep-viewer.xsl" ?>
|
||||
<PhoronixTestSuite>
|
||||
<ExternalDependencies>
|
||||
<Information>
|
||||
<Name>Solus</Name>
|
||||
<Aliases>Solus Linux</Aliases>
|
||||
<PackageManager>pisi</PackageManager>
|
||||
</Information>
|
||||
<Package>
|
||||
<GenericName>gtk-development</GenericName>
|
||||
<PackageName>libgtk-2-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>sdl2-development</GenericName>
|
||||
<PackageName>sdl2-mixer-devel sdl2-ttf-devel sdl2-gfx-devel sdl2-devel sdl2-image-devel sdl2-net-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>sdl-development</GenericName>
|
||||
<PackageName>sdl1-devel sdl1-image-devel sdl1-ttf-devel sdl1-gfx-devel sdl1-image-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>glut</GenericName>
|
||||
<PackageName>freeglut-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>csh</GenericName>
|
||||
<PackageName>zsh</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>libpng-development</GenericName>
|
||||
<PackageName>libpng-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>openssl-development</GenericName>
|
||||
<PackageName>openssl-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>build-utilities</GenericName>
|
||||
<PackageName>gcc g++ libgomp autoconf automake m4 glibc-devel binutils make</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>tiff</GenericName>
|
||||
<PackageName>libtiff-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>bison</GenericName>
|
||||
<PackageName>bison</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>flex</GenericName>
|
||||
<PackageName>flex</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>imlib2-development</GenericName>
|
||||
<PackageName>imlib2-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>portaudio-development</GenericName>
|
||||
<PackageName>portaudio-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>fortran-compiler</GenericName>
|
||||
<PackageName>gfortran</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>glew</GenericName>
|
||||
<PackageName>glew-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>bc</GenericName>
|
||||
<PackageName>bc</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>scons</GenericName>
|
||||
<PackageName>scons</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>zlib-development</GenericName>
|
||||
<PackageName>zlib-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>jpeg-development</GenericName>
|
||||
<PackageName>openjpeg-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>libaio-development</GenericName>
|
||||
<PackageName>libaio-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>pcre</GenericName>
|
||||
<PackageName>libpcre-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>perl</GenericName>
|
||||
<PackageName>perl perl-module-build</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>libstdcpp5</GenericName>
|
||||
<PackageName>libstdc++</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>openal-development</GenericName>
|
||||
<PackageName>openal-soft-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>vorbis-development</GenericName>
|
||||
<PackageName>libvorbis-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>p7zip</GenericName>
|
||||
<PackageName>p7zip</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>autoconf</GenericName>
|
||||
<PackageName>autoconf</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>libtool</GenericName>
|
||||
<PackageName>libtool</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>ncurses-development</GenericName>
|
||||
<PackageName>ncurses-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>popt</GenericName>
|
||||
<PackageName>popt-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>curl</GenericName>
|
||||
<PackageName>curl-devel curl</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>fftw3-development</GenericName>
|
||||
<PackageName>fftw-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>lapack-development</GenericName>
|
||||
<PackageName>lapack-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>cmake</GenericName>
|
||||
<PackageName>cmake</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>boost-development</GenericName>
|
||||
<PackageName>libboost-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>bzip2-development</GenericName>
|
||||
<PackageName>bzip2-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>tcl</GenericName>
|
||||
<PackageName>tcl</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python</GenericName>
|
||||
<PackageName>python</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>yasm</GenericName>
|
||||
<PackageName>yasm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>gmp-library</GenericName>
|
||||
<PackageName>gmp-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>subversion</GenericName>
|
||||
<PackageName>subversion</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>git</GenericName>
|
||||
<PackageName>git-core</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>opencl</GenericName>
|
||||
<PackageName>ocl-icd-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>attr</GenericName>
|
||||
<PackageName>attr-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>golang</GenericName>
|
||||
<PackageName>golang golang-binary</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
@@ -47,7 +47,7 @@
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>libpng-development</GenericName>
|
||||
<PackageName>libpng12-dev</PackageName>
|
||||
<PackageName>libpng-dev</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>openssl-development</GenericName>
|
||||
@@ -311,5 +311,27 @@
|
||||
<GenericName>golang</GenericName>
|
||||
<PackageName>golang</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>redis-server</GenericName>
|
||||
<PackageName>redis-server</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>opencv</GenericName>
|
||||
<PackageName>libopencv-dev</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>perl-digest-md5</GenericName>
|
||||
<PackageName>libdigest-md5-file-perl libdigest-perl-md5-perl</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-scipy</GenericName>
|
||||
<PackageName>python-scipy</PackageName>
|
||||
<FileCheck>/usr/lib/python2.7/dist-packages/scipy</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-sklearn</GenericName>
|
||||
<PackageName>python-sklearn</PackageName>
|
||||
<FileCheck>/usr/lib/python2.7/dist-packages/sklearn/</FileCheck>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
252
pts-core/external-test-dependencies/xml/void-packages.xml
Normal file
252
pts-core/external-test-dependencies/xml/void-packages.xml
Normal file
@@ -0,0 +1,252 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet type="text/xsl" href="xsl/pts-exdep-viewer.xsl" ?>
|
||||
<PhoronixTestSuite>
|
||||
<ExternalDependencies>
|
||||
<Information>
|
||||
<Name>Void Linux</Name>
|
||||
<Aliases></Aliases>
|
||||
<PackageManager>xbps-install</PackageManager>
|
||||
</Information>
|
||||
<Package>
|
||||
<GenericName>common-dependencies</GenericName>
|
||||
<PackageName>unzip</PackageName>
|
||||
<FileCheck>unzip</FileCheck>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>gtk-development</GenericName>
|
||||
<PackageName>gtk+-devel gtk+3-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>sdl2-development</GenericName>
|
||||
<PackageName>SDL2-devel SDL2_gfx-devel SDL2_image-devel SDL2_ttf-devel SDL2_net-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>sdl-development</GenericName>
|
||||
<PackageName>SDL-devel SDL_gfx-devel SDL_image-devel SDL_ttf-devel SDL_net-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>glut</GenericName>
|
||||
<PackageName>libfreeglut-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>csh</GenericName>
|
||||
<PackageName>tcsh</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>libpng-development</GenericName>
|
||||
<PackageName>libpng-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>openssl-development</GenericName>
|
||||
<PackageName>libressl-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>build-utilities</GenericName>
|
||||
<PackageName>gcc gcc-c++ autoconf make libgomp-devel automake</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>cairo-development</GenericName>
|
||||
<PackageName>cairo-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>xorg-development</GenericName>
|
||||
<PackageName>xorg-server-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>tiff</GenericName>
|
||||
<PackageName>tiff-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>bison</GenericName>
|
||||
<PackageName>bison</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>flex</GenericName>
|
||||
<PackageName>flex</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>imlib2-development</GenericName>
|
||||
<PackageName>imlib2-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>java</GenericName>
|
||||
<PackageName>openjdk</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>portaudio-development</GenericName>
|
||||
<PackageName>portaudio-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>fortran-compiler</GenericName>
|
||||
<PackageName>gcc-fortran</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>glew</GenericName>
|
||||
<PackageName>glew-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>bc</GenericName>
|
||||
<PackageName>bc</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>freeimage</GenericName>
|
||||
<PackageName>freeimage-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>scons</GenericName>
|
||||
<PackageName>scons</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>smartmontools</GenericName>
|
||||
<PackageName>smartmontools</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>zlib-development</GenericName>
|
||||
<PackageName>zlib-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>jpeg-development</GenericName>
|
||||
<PackageName>libopenjpeg-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>libaio-development</GenericName>
|
||||
<PackageName>libaio-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>pcre</GenericName>
|
||||
<PackageName>libpcre</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>perl</GenericName>
|
||||
<PackageName>perl</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>xorg-video</GenericName>
|
||||
<PackageName>libXv-devel l;ibvdpau-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>libstdcpp5</GenericName>
|
||||
<PackageName>libstdc++-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>openal-development</GenericName>
|
||||
<PackageName>libopenal-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>vorbis-development</GenericName>
|
||||
<PackageName>libvorbis-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>jam</GenericName>
|
||||
<PackageName>jam</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>p7zip</GenericName>
|
||||
<PackageName>p7zip</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>autoconf</GenericName>
|
||||
<PackageName>autoconf</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>libtool</GenericName>
|
||||
<PackageName>libtool</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>ncurses-development</GenericName>
|
||||
<PackageName>ncurses-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>popt</GenericName>
|
||||
<PackageName>popt-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>numa-development</GenericName>
|
||||
<PackageName>libnuma-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>curl</GenericName>
|
||||
<PackageName>libcurl-devel curl</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>fftw3-development</GenericName>
|
||||
<PackageName>libfftw</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>blas-development</GenericName>
|
||||
<PackageName>blas-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>lapack-development</GenericName>
|
||||
<PackageName>lapack-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>openmpi-development</GenericName>
|
||||
<PackageName>libopenmpi</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>cmake</GenericName>
|
||||
<PackageName>cmake</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>boost-development</GenericName>
|
||||
<PackageName>boost boost-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>bzip2-development</GenericName>
|
||||
<PackageName>bzip2-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>tcl</GenericName>
|
||||
<PackageName>tcl tcl-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>glibc-development</GenericName>
|
||||
<PackageName>glibc-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>glibc-development</GenericName>
|
||||
<PackageName>glibc-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python</GenericName>
|
||||
<PackageName>python</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>python-numpy</GenericName>
|
||||
<PackageName>python-numpy</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>yasm</GenericName>
|
||||
<PackageName>yasm</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>gmp-library</GenericName>
|
||||
<PackageName>gmp-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>subversion</GenericName>
|
||||
<PackageName>subversion</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>git</GenericName>
|
||||
<PackageName>git</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>opencl</GenericName>
|
||||
<PackageName>opencl-headers</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>attr</GenericName>
|
||||
<PackageName>attr-devel</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>httpd</GenericName>
|
||||
<PackageName>apache</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>golang</GenericName>
|
||||
<PackageName>go</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
@@ -227,6 +227,13 @@
|
||||
<PackageName>gmp</PackageName>
|
||||
<FileCheck>/usr/include/gmp.h</FileCheck>
|
||||
</Package>
|
||||
<!-- lib3ds support for Zenwalk -->
|
||||
<Package>
|
||||
<GenericName>opencv</GenericName>
|
||||
<PackageName>opencv</PackageName>
|
||||
</Package>
|
||||
<Package>
|
||||
<GenericName>redis-server</GenericName>
|
||||
<PackageName>redis</PackageName>
|
||||
</Package>
|
||||
</ExternalDependencies>
|
||||
</PhoronixTestSuite>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2008 - 2012, Phoronix Media
|
||||
Copyright (C) 2008 - 2012, Michael Larabel
|
||||
Copyright (C) 2008 - 2016, Phoronix Media
|
||||
Copyright (C) 2008 - 2016, Michael Larabel
|
||||
graphics_override.php: Graphics AA/AF image quality setting override module
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -92,7 +92,7 @@ class graphics_event_checker extends pts_module_interface
|
||||
// vblank_mode=0 has long been set within pts-core, but put it here too just since there's these other checks here
|
||||
putenv('vblank_mode=0');
|
||||
}
|
||||
public static function __post_test_run(&$test_result)
|
||||
public static function __post_test_run($test_result)
|
||||
{
|
||||
if($test_result->test_profile->get_test_hardware_type() != 'Graphics')
|
||||
{
|
||||
|
||||
126
pts-core/modules/html_results_export.php
Normal file
126
pts-core/modules/html_results_export.php
Normal file
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2016, Phoronix Media
|
||||
Copyright (C) 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class html_results_export extends pts_module_interface
|
||||
{
|
||||
const module_name = 'Result Exporter To HTML';
|
||||
const module_version = '1.0.0';
|
||||
const module_description = 'This module allows basic exporting of results to HTML for saving either to a file locally (specified using the EXPORT_RESULTS_HTML_FILE_TO environment variable) or to a mail account (specified using the EXPORT_RESULTS_HTML_EMAIL_TO environment variable). EXPORT_RESULTS_HTML_EMAIL_TO supports multiple email addresses delimited by a comma.';
|
||||
const module_author = 'Michael Larabel';
|
||||
|
||||
public static function module_environmental_variables()
|
||||
{
|
||||
return array('EXPORT_RESULTS_HTML_EMAIL_TO', 'EXPORT_RESULTS_HTML_FILE_TO');
|
||||
}
|
||||
protected static function generate_html_email_results($result_file)
|
||||
{
|
||||
$html = '<html><head><title>' . $result_file->get_title() . ' - Phoronix Test Suite</title></head><body>';
|
||||
$html .= '<h1>' . $result_file->get_title() . '</h1>';
|
||||
$html .= '<p>' . $result_file->get_description() . '</p>';
|
||||
$extra_attributes = array();
|
||||
|
||||
// Systems
|
||||
$table = new pts_ResultFileSystemsTable($result_file);
|
||||
$html .= '<p style="text-align: center; overflow: auto;">' . pts_render::render_graph_inline_embed($table, $result_file, $extra_attributes, true, 'HTML') . '</p>';
|
||||
|
||||
// Result Overview
|
||||
$intent = null;
|
||||
$table = new pts_ResultFileTable($result_file, $intent);
|
||||
$html .= '<p style="text-align: center; overflow: auto;">' . pts_render::render_graph_inline_embed($table, $result_file, $extra_attributes, true, 'HTML') . '</p>';
|
||||
|
||||
// The Results
|
||||
foreach($result_file->get_result_objects() as $result_object)
|
||||
{
|
||||
$res = pts_render::render_graph_inline_embed($result_object, $result_file, $extra_attributes, true, 'HTML');
|
||||
|
||||
if($res == false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$html .= '<h2>' . $result_object->test_profile->get_title() . '</h2>';
|
||||
$html .= '<h3>' . $result_object->get_arguments_description() . '</h3>';
|
||||
$html .= '<p align="center">';
|
||||
$html .= $res;
|
||||
$html .= '</p>';
|
||||
unset($result_object);
|
||||
}
|
||||
|
||||
// Footer
|
||||
$html .= '<hr />
|
||||
<p><img src="http://www.phoronix-test-suite.com/web/pts-logo-60.png" /></p>
|
||||
<h6><em>The <a href="http://www.phoronix-test-suite.com/">Phoronix Test Suite</a>, <a href="http://www.phoromatic.com/">Phoromatic</a>, and <a href="http://openbenchmarking.org/">OpenBenchmarking.org</a> are products of <a href="http://www.phoronix-media.com/">Phoronix Media</a>.<br />The Phoronix Test Suite is open-source under terms of the GNU GPL. Commercial support, custom engineering, and other services are available by contacting Phoronix Media.<br />© ' . date('Y') . ' Phoronix Media.</em></h6>';
|
||||
$html .= '</body></html>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
public static function __event_results_saved($test_run_manager)
|
||||
{
|
||||
$html_file = pts_module::read_variable('EXPORT_RESULTS_HTML_FILE_TO');
|
||||
$emails = pts_strings::comma_explode(pts_module::read_variable('EXPORT_RESULTS_HTML_EMAIL_TO'));
|
||||
|
||||
$html_contents = self::generate_html_email_results($test_run_manager->result_file);
|
||||
|
||||
|
||||
if(!empty($html_file))
|
||||
{
|
||||
file_put_contents($html_file, $html_contents);
|
||||
echo 'HTML Result File To: ' . $html_file . PHP_EOL;
|
||||
}
|
||||
|
||||
if(!empty($emails))
|
||||
{
|
||||
//$pdf_contents = pts_result_file_output::result_file_to_pdf($test_run_manager->result_file, 'pts-test-results.pdf', 'S');
|
||||
//$pdf_contents = chunk_split(base64_encode($pdf_contents));
|
||||
|
||||
foreach($emails as $email)
|
||||
{
|
||||
|
||||
/*$boundary = md5(uniqid(time()));
|
||||
$headers = "From: Phoronix Test Suite <no-reply@phoromatic.com>\r\n";
|
||||
$headers .= "MIME-Version: 1.0\r\n";
|
||||
$headers .= "Content-Type: multipart/mixed; boundary=\"" . $boundary . "\"\r\n\r\n";
|
||||
$message = "This is a multi-part message in MIME format.\r\n";
|
||||
$message .= "--" . $boundary . "\r\n";
|
||||
$message .= "Content-Type: text/html; charset=utf-8\r\n";
|
||||
$message .= "Content-Transfer-Encoding: 7bit\r\n\r\n";
|
||||
$message .= $html_contents . "\r\n\r\n";
|
||||
$message .= "--" . $boundary . "\r\n";
|
||||
$message .= "Content-Type: application/pdf; name=\"pts-test-results.pdf\"\r\n";
|
||||
$message .= "Content-Transfer-Encoding: base64\r\n";
|
||||
$message .= "Content-Disposition: attachment; filename=\"pts-test-results.pdf\"\r\n\r\n";
|
||||
$message .= $pdf_contents . "\r\n\r\n";
|
||||
$message .= "--" . $boundary . "--";
|
||||
|
||||
mail($email, 'Phoronix Test Suite Result File: ' . $test_run_manager->result_file->get_title(), $message, $headers);
|
||||
echo 'HTML Results Emailed To: ' . $email . PHP_EOL; */
|
||||
$headers = "MIME-Version: 1.0\r\n";
|
||||
$headers .= "Content-type:text/html;charset=UTF-8\r\n";
|
||||
$headers .= "From: Phoromatic - Phoronix Test Suite <no-reply@phoromatic.com>\r\n";
|
||||
mail($email, 'Phoronix Test Suite Result File: ' . $test_run_manager->result_file->get_title(), $html_contents, $headers);
|
||||
echo 'HTML Results Emailed To: ' . $email . PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -38,6 +38,9 @@ class phoromatic extends pts_module_interface
|
||||
private static $p_save_identifier = null;
|
||||
private static $p_schedule_id = null;
|
||||
private static $p_trigger_id = null;
|
||||
private static $benchmark_ticket_id = null;
|
||||
private static $in_stress_mode = false;
|
||||
private static $has_run_server_setup_func = false;
|
||||
|
||||
private static $test_run_manager = null;
|
||||
|
||||
@@ -287,7 +290,7 @@ class phoromatic extends pts_module_interface
|
||||
$to_post['s'] = phodevi::system_software(true);
|
||||
$to_post['n'] = phodevi::read_property('system', 'hostname');
|
||||
$to_post['msi'] = PTS_MACHINE_SELF_ID;
|
||||
return pts_network::http_upload_via_post('http://' . $server_address . ':' . $server_http_port . '/phoromatic.php', $to_post);
|
||||
return pts_network::http_upload_via_post('http://' . $server_address . ':' . $server_http_port . '/phoromatic.php', $to_post, false);
|
||||
}
|
||||
protected static function update_system_status($current_task, $estimated_time_remaining = 0, $percent_complete = 0, $for_schedule = null, $estimate_to_next_comm = 0)
|
||||
{
|
||||
@@ -318,6 +321,7 @@ class phoromatic extends pts_module_interface
|
||||
'time' => $estimated_time_remaining,
|
||||
'pc' => $percent_complete,
|
||||
'sched' => (!empty($for_schedule) ? $for_schedule : self::$p_schedule_id),
|
||||
'bid' => (!empty(self::$benchmark_ticket_id) ? self::$benchmark_ticket_id : 0),
|
||||
'o' => $estimate_to_next_comm
|
||||
));
|
||||
}
|
||||
@@ -329,6 +333,8 @@ class phoromatic extends pts_module_interface
|
||||
}
|
||||
protected static function setup_server_addressing($server_string = null)
|
||||
{
|
||||
self::$has_run_server_setup_func = true;
|
||||
|
||||
if(isset($server_string[0]) && strpos($server_string[0], '/', strpos($server_string[0], ':')) > 6)
|
||||
{
|
||||
pts_client::$pts_logger && pts_client::$pts_logger->log('Attempting to connect to Phoromatic Server: ' . $server_string[0]);
|
||||
@@ -462,7 +468,7 @@ class phoromatic extends pts_module_interface
|
||||
|
||||
if(!$server_setup)
|
||||
{
|
||||
if(PTS_IS_DAEMONIZED_SERVER_PROCESS)
|
||||
if(getenv('PTS_NO_REBOOT_ON_NETWORK_FAILURE') == false && PTS_IS_DAEMONIZED_SERVER_PROCESS)
|
||||
{
|
||||
if(pts_client::executable_in_path('reboot'))
|
||||
{
|
||||
@@ -505,7 +511,7 @@ class phoromatic extends pts_module_interface
|
||||
}
|
||||
else if(PTS_IS_DAEMONIZED_SERVER_PROCESS && $times_failed > 10)
|
||||
{
|
||||
if(pts_client::executable_in_path('reboot'))
|
||||
if(getenv('PTS_NO_REBOOT_ON_NETWORK_FAILURE') == false && pts_client::executable_in_path('reboot'))
|
||||
{
|
||||
shell_exec('reboot');
|
||||
sleep(5);
|
||||
@@ -581,7 +587,7 @@ class phoromatic extends pts_module_interface
|
||||
{
|
||||
case 'install':
|
||||
phoromatic::update_system_status('Installing Tests');
|
||||
pts_suite_nye_XmlReader::set_temporary_suite('pre-seed', $json['phoromatic']['test_suite']);
|
||||
pts_test_suite::set_temporary_suite('pre-seed', $json['phoromatic']['test_suite']);
|
||||
pts_test_installer::standard_install('pre-seed', false, true);
|
||||
break;
|
||||
case 'benchmark':
|
||||
@@ -592,13 +598,14 @@ class phoromatic extends pts_module_interface
|
||||
$benchmark_timer = time();
|
||||
self::$is_running_as_phoromatic_node = true;
|
||||
$suite_identifier = sha1(time() . rand(2, 1000));
|
||||
pts_suite_nye_XmlReader::set_temporary_suite($suite_identifier, $json['phoromatic']['test_suite']);
|
||||
pts_test_suite::set_temporary_suite($suite_identifier, $json['phoromatic']['test_suite']);
|
||||
self::$p_save_identifier = $json['phoromatic']['trigger_id'];
|
||||
$phoromatic_results_identifier = self::$p_save_identifier;
|
||||
$phoromatic_save_identifier = $json['phoromatic']['save_identifier'];
|
||||
self::$p_schedule_id = isset($json['phoromatic']['schedule_id']) ? $json['phoromatic']['schedule_id'] : false;
|
||||
self::$p_trigger_id = self::$p_save_identifier;
|
||||
$benchmark_ticket_id = isset($json['phoromatic']['benchmark_ticket_id']) ? $json['phoromatic']['benchmark_ticket_id'] : null;
|
||||
self::$benchmark_ticket_id = $benchmark_ticket_id;
|
||||
phoromatic::update_system_status('Running Benchmarks For: ' . $phoromatic_save_identifier);
|
||||
|
||||
if(pts_strings::string_bool($json['phoromatic']['settings']['RunInstallCommand']))
|
||||
@@ -615,15 +622,47 @@ class phoromatic extends pts_module_interface
|
||||
}
|
||||
}
|
||||
$env_vars = isset($json['phoromatic']['environment_variables']) ? pts_strings::parse_value_string_vars($json['phoromatic']['environment_variables']) : array();
|
||||
$is_stress_run = isset($env_vars['PTS_CONCURRENT_TEST_RUNS']) && $env_vars['PTS_CONCURRENT_TEST_RUNS'] > 1;
|
||||
|
||||
// Do the actual running
|
||||
phodevi::clear_cache();
|
||||
self::$test_run_manager = new pts_test_run_manager(array(
|
||||
|
||||
if($is_stress_run)
|
||||
{
|
||||
self::$test_run_manager = new pts_stress_run_manager(array(
|
||||
'UploadResults' => false,
|
||||
'SaveResults' => false,
|
||||
'PromptForTestDescription' => false,
|
||||
'RunAllTestCombinations' => false,
|
||||
'PromptSaveName' => false,
|
||||
'PromptForTestIdentifier' => false,
|
||||
'OpenBrowser' => false
|
||||
), true);
|
||||
|
||||
if(self::$test_run_manager->initial_checks($suite_identifier, 'SHORT'))
|
||||
{
|
||||
if(self::$test_run_manager->load_tests_to_run($suite_identifier))
|
||||
{
|
||||
self::$test_run_manager->action_on_stress_log_set(array('phoromatic', 'upload_stress_log_sane'));
|
||||
self::$in_stress_mode = $phoromatic_save_identifier;
|
||||
self::$test_run_manager->multi_test_stress_run_execute($env_vars['PTS_CONCURRENT_TEST_RUNS'], $env_vars['TOTAL_LOOP_TIME']);
|
||||
self::$in_stress_mode = false;
|
||||
self::upload_stress_log(self::$test_run_manager->get_stress_log());
|
||||
}
|
||||
}
|
||||
self::$benchmark_ticket_id = null;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
self::$test_run_manager = new pts_test_run_manager(array(
|
||||
'UploadResults' => (isset($json['phoromatic']['settings']['UploadResultsToOpenBenchmarking']) && pts_strings::string_bool($json['phoromatic']['settings']['UploadResultsToOpenBenchmarking'])),
|
||||
'SaveResults' => true,
|
||||
'RunAllTestCombinations' => false,
|
||||
'OpenBrowser' => false
|
||||
), true);
|
||||
}
|
||||
|
||||
if(self::$test_run_manager->initial_checks($suite_identifier, 'SHORT'))
|
||||
{
|
||||
// Load the tests to run
|
||||
@@ -644,25 +683,9 @@ class phoromatic extends pts_module_interface
|
||||
// Save results?
|
||||
|
||||
// Run the actual tests
|
||||
if(isset($env_vars['PTS_CONCURRENT_TEST_RUNS']) && $env_vars['PTS_CONCURRENT_TEST_RUNS'] > 1)
|
||||
{
|
||||
$total_loop_time = isset($env_vars['TOTAL_LOOP_TIME']) ? $env_vars['TOTAL_LOOP_TIME'] : false;
|
||||
pts_client::$pts_logger->log('STRESS / MULTI-TEST EXECUTION STARTED @ ' . date('Y-m-d H:i:s'));
|
||||
pts_client::$pts_logger->log('CONCURRENT RUNS = ' . $env_vars['PTS_CONCURRENT_TEST_RUNS'] . ' TOTAL LOOP TIME = ' . $total_loop_time);
|
||||
$r = self::$test_run_manager->multi_test_stress_run_execute($env_vars['PTS_CONCURRENT_TEST_RUNS'], $total_loop_time);
|
||||
if($r == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
pts_client::$pts_logger->log('STRESS / MULTI-TEST EXECUTION ENDED @ ' . date('Y-m-d H:i:s'));
|
||||
}
|
||||
else
|
||||
{
|
||||
self::$test_run_manager->auto_save_results($phoromatic_save_identifier, $phoromatic_results_identifier, (isset($json['phoromatic']['test_description']) ? $json['phoromatic']['test_description'] : 'A Phoromatic run.'));
|
||||
self::$test_run_manager->pre_execution_process();
|
||||
self::$test_run_manager->call_test_runs();
|
||||
}
|
||||
self::$test_run_manager->auto_save_results($phoromatic_save_identifier, $phoromatic_results_identifier, (isset($json['phoromatic']['test_description']) ? $json['phoromatic']['test_description'] : 'A Phoromatic run.'));
|
||||
self::$test_run_manager->pre_execution_process();
|
||||
self::$test_run_manager->call_test_runs();
|
||||
|
||||
phoromatic::update_system_status('Benchmarks Completed For: ' . $phoromatic_save_identifier);
|
||||
self::$test_run_manager->post_execution_process();
|
||||
@@ -679,13 +702,14 @@ class phoromatic extends pts_module_interface
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($json['phoromatic']['post_install_set_context']))
|
||||
if(isset($json['phoromatic']['post_run_set_context']))
|
||||
{
|
||||
phoromatic::set_user_context($json['phoromatic']['post_install_set_context'], self::$p_trigger_id, self::$p_schedule_id, 'POST_RUN');
|
||||
phoromatic::set_user_context($json['phoromatic']['post_run_set_context'], self::$p_trigger_id, self::$p_schedule_id, 'POST_RUN');
|
||||
}
|
||||
}
|
||||
self::$p_schedule_id = null;
|
||||
self::$is_running_as_phoromatic_node = false;
|
||||
self::$benchmark_ticket_id = null;
|
||||
break;
|
||||
case 'reboot':
|
||||
echo PHP_EOL . 'Phoromatic received a remote command to reboot.' . PHP_EOL;
|
||||
@@ -857,6 +881,44 @@ class phoromatic extends pts_module_interface
|
||||
|
||||
return $res;
|
||||
}
|
||||
private static function upload_stress_log($stress_log)
|
||||
{
|
||||
// Upload Logs to Phoromatic
|
||||
if($stress_log == null || self::$benchmark_ticket_id == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$times_tried = 0;
|
||||
do
|
||||
{
|
||||
if($times_tried > 0)
|
||||
{
|
||||
sleep(rand(5, 20));
|
||||
}
|
||||
|
||||
$res = phoromatic::upload_to_remote_server(array(
|
||||
'r' => 'stress_log_upload',
|
||||
'bid' => self::$benchmark_ticket_id,
|
||||
'l' => $stress_log
|
||||
));
|
||||
|
||||
$times_tried++;
|
||||
}
|
||||
while($res == false && $times_tried < 4);
|
||||
|
||||
return $res;
|
||||
}
|
||||
public static function upload_stress_log_sane($stress_log)
|
||||
{
|
||||
static $last_log_upload = 0;
|
||||
|
||||
if(time() > ($last_log_upload + 60))
|
||||
{
|
||||
self::upload_stress_log($stress_log);
|
||||
$last_log_upload = time();
|
||||
}
|
||||
}
|
||||
public static function recent_phoromatic_server_results()
|
||||
{
|
||||
self::setup_server_addressing();
|
||||
@@ -982,6 +1044,13 @@ class phoromatic extends pts_module_interface
|
||||
}
|
||||
public static function __pre_test_install($test_identifier)
|
||||
{
|
||||
/* if(self::$has_run_server_setup_func == false)
|
||||
{
|
||||
self::setup_server_addressing();
|
||||
}
|
||||
*/
|
||||
// XXX finish wiring in the above code to various parts for making auto-reporting from clients
|
||||
|
||||
if(!self::$is_running_as_phoromatic_node)
|
||||
{
|
||||
return false;
|
||||
@@ -995,14 +1064,31 @@ class phoromatic extends pts_module_interface
|
||||
$last_update_time = time();
|
||||
}
|
||||
}
|
||||
public static function __pre_test_run(&$pts_test_result)
|
||||
public static function __pre_test_run($pts_test_result)
|
||||
{
|
||||
if(!self::$is_running_as_phoromatic_node)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
phoromatic::update_system_status('Running: ' . $pts_test_result->test_profile->get_identifier() . ($pts_test_result->get_arguments_description() != null ? ' [' . $pts_test_result->get_arguments_description() . ']' : null),
|
||||
if(self::$in_stress_mode)
|
||||
{
|
||||
static $time_in_stress_run = 0;
|
||||
|
||||
$msg = 'Stress-Run Testing';
|
||||
if(($time_in_stress_run + (60 * 60)) > time())
|
||||
{
|
||||
// Don't report this same string so often...
|
||||
return;
|
||||
}
|
||||
$time_in_stress_run = time();
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg = 'Running: ' . $pts_test_result->test_profile->get_identifier() . ($pts_test_result->get_arguments_description() != null ? ' [' . $pts_test_result->get_arguments_description() . ']' : null);
|
||||
}
|
||||
|
||||
phoromatic::update_system_status($msg,
|
||||
ceil(self::$test_run_manager->get_estimated_run_time() / 60),
|
||||
self::$test_run_manager->get_percent_complete(),
|
||||
null,
|
||||
|
||||
@@ -100,7 +100,7 @@ class system_monitor extends pts_module_interface
|
||||
|
||||
self::pts_start_monitoring();
|
||||
}
|
||||
catch (Exception $e)
|
||||
catch(Exception $e)
|
||||
{
|
||||
echo PHP_EOL . "Unloading system monitor: " . $e->getMessage();
|
||||
return pts_module::MODULE_UNLOAD;
|
||||
@@ -428,10 +428,10 @@ class system_monitor extends pts_module_interface
|
||||
|
||||
if(count(self::$to_monitor) == 0)
|
||||
{
|
||||
throw new Exception('nothing to monitor');
|
||||
throw new Exception('No Supported Sensors Selected To Monitor');
|
||||
sleep(2);
|
||||
}
|
||||
}
|
||||
|
||||
private static function create_sensor_instances(&$sensor, &$sensor_parameters, $create_all)
|
||||
{
|
||||
if($create_all)
|
||||
@@ -680,6 +680,9 @@ class system_monitor extends pts_module_interface
|
||||
{
|
||||
// TODO result count checks should probably be done before cloning the test_result
|
||||
// Copy the value each time as if you are directly writing the original data, each succeeding time in the loop the used arguments gets borked
|
||||
if(!is_object(self::$individual_test_run_request))
|
||||
return;
|
||||
|
||||
$test_result = clone self::$individual_test_run_request;
|
||||
|
||||
if (pts_module_manager::is_module_attached("matisk"))
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2008 - 2014, Phoronix Media
|
||||
Copyright (C) 2008 - 2014, Michael Larabel
|
||||
Copyright (C) 2008 - 2016, Phoronix Media
|
||||
Copyright (C) 2008 - 2016, Michael Larabel
|
||||
update_checker.php: This module checks to see if the Phoronix Test Suite -- and its tests and suites -- are up to date.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -24,7 +24,7 @@
|
||||
class update_checker extends pts_module_interface
|
||||
{
|
||||
const module_name = 'Update Checker';
|
||||
const module_version = '0.2.0';
|
||||
const module_version = '0.3.0';
|
||||
const module_description = 'This module checks to see if the Phoronix Test Suite -- and its tests and suites -- are up to date.';
|
||||
const module_author = 'Phoronix Media';
|
||||
|
||||
@@ -34,14 +34,11 @@ class update_checker extends pts_module_interface
|
||||
if(IS_FIRST_RUN_TODAY && pts_network::internet_support_available())
|
||||
{
|
||||
// Check For pts-core updates
|
||||
$latest_reported_version = pts_network::http_get_contents('http://www.phoronix-test-suite.com/LATEST');
|
||||
$current_e = explode('.', PTS_VERSION);
|
||||
$latest_e = explode('.', $latest_reported_version);
|
||||
|
||||
if($latest_reported_version != PTS_VERSION && $latest_e[0] >= $current_e[0] && ($latest_e[1] > $current_e[1] || ($latest_e[1] == $current_e[1] && $latest_e[2] >= $current_e[2])))
|
||||
$latest_reported_version = pts_network::http_get_contents('http://www.phoronix-test-suite.com/LATEST_CORE');
|
||||
if(is_numeric($latest_reported_version) && $latest_reported_version > PTS_CORE_VERSION)
|
||||
{
|
||||
// New version of PTS is available
|
||||
pts_client::$display->generic_heading('An outdated version of the Phoronix Test Suite is installed.' . PHP_EOL . 'The version in use is v' . PTS_VERSION . ', but the latest is v' . $latest_reported_version . '.' . PHP_EOL . 'Visit http://www.phoronix-test-suite.com/ to update this software.');
|
||||
pts_client::$display->generic_heading(strtoupper('An outdated version of the Phoronix Test Suite is installed.' . PHP_EOL . 'The version in use is ' . PTS_VERSION . ' (' . PTS_CORE_VERSION . '), but the latest is pts-core ' . $latest_reported_version . '.' . PHP_EOL . 'Visit http://www.phoronix-test-suite.com/ to update this software.'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
154
pts-core/modules/watchdog.php
Normal file
154
pts-core/modules/watchdog.php
Normal file
@@ -0,0 +1,154 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2016, Phoronix Media
|
||||
Copyright (C) 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class watchdog extends pts_module_interface
|
||||
{
|
||||
const module_name = 'System Event Watchdog';
|
||||
const module_version = '1.0.0';
|
||||
const module_description = 'This module has support for stopping/interrupting tests if various system issues occur, like a temperature sensor exceeds a defined threshold.';
|
||||
const module_author = 'Michael Larabel';
|
||||
|
||||
private static $to_monitor = null;
|
||||
private static $monitor_threshold = 0;
|
||||
|
||||
public static function module_environmental_variables()
|
||||
{
|
||||
return array('WATCHDOG_SENSOR', 'WATCHDOG_SENSOR_THRESHOLD');
|
||||
}
|
||||
|
||||
public static function __startup()
|
||||
{
|
||||
$sensor_list = pts_strings::comma_explode(pts_module::read_variable('WATCHDOG_SENSOR'));
|
||||
$to_monitor = array();
|
||||
// A LOT OF THIS CODE IN THIS FUNCTION PORTED OVER FROM system_monitor MODULE
|
||||
foreach($sensor_list as $sensor)
|
||||
{
|
||||
$sensor_split = pts_strings::trim_explode('.', $sensor);
|
||||
$type = &$sensor_split[0];
|
||||
$name = &$sensor_split[1];
|
||||
$parameter = &$sensor_split[2];
|
||||
|
||||
if(empty($to_monitor[$type][$name]))
|
||||
{
|
||||
$to_monitor[$type][$name] = array();
|
||||
}
|
||||
|
||||
if($parameter !== NULL)
|
||||
{
|
||||
$to_monitor[$type][$name][] = $parameter;
|
||||
}
|
||||
}
|
||||
foreach(phodevi::supported_sensors() as $sensor)
|
||||
{
|
||||
if(array_key_exists($sensor[0], $to_monitor) && array_key_exists($sensor[1], $to_monitor[$sensor[0]]))
|
||||
{
|
||||
$supported_devices = call_user_func(array($sensor[2], 'get_supported_devices'));
|
||||
$instance_no = 0;
|
||||
|
||||
if($supported_devices === NULL)
|
||||
{
|
||||
self::create_single_sensor_instance($sensor, 0, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($supported_devices as $device)
|
||||
{
|
||||
self::create_single_sensor_instance($sensor, $instance_no++, $device);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// END OF PORTED CODE FROM system_monitor
|
||||
|
||||
if(empty(self::$to_monitor))
|
||||
{
|
||||
echo PHP_EOL . 'UNLOADING WATCHDOG AS NO SENSORS TO MONITOR' . PHP_EOL;
|
||||
return pts_module::MODULE_UNLOAD;
|
||||
}
|
||||
|
||||
$watchdog_threshold = getenv('WATCHDOG_SENSOR_THRESHOLD');
|
||||
if(!is_numeric($watchdog_threshold) || $watchdog_threshold < 2)
|
||||
{
|
||||
echo PHP_EOL . 'UNLOADING WATCHDOG AS NO USEFUL DATA SET FOR WATCHDOG_SENSOR_THRESHOLD ENVIRONMENT VARIABLE' . PHP_EOL;
|
||||
return pts_module::MODULE_UNLOAD;
|
||||
}
|
||||
self::$monitor_threshold = $watchdog_threshold;
|
||||
|
||||
echo PHP_EOL . 'WATCHDOG ACTIVATED - TESTS WILL ABORT IF ANY SENSOR CROSSES: ' . self::$monitor_threshold . PHP_EOL;
|
||||
echo 'WATCHDOG MONITORING: ' . PHP_EOL;
|
||||
$monitors = array();
|
||||
foreach(self::$to_monitor as $sensor)
|
||||
{
|
||||
$monitors[] = array(strtoupper(phodevi::sensor_object_name($sensor)), phodevi::read_sensor($sensor), strtoupper(phodevi::read_sensor_object_unit($sensor)));
|
||||
}
|
||||
echo pts_user_io::display_text_table($monitors, ' ', 1) . PHP_EOL . PHP_EOL;
|
||||
}
|
||||
|
||||
public static function __pre_run_process()
|
||||
{
|
||||
self::check_watchdog();
|
||||
}
|
||||
public static function __pre_test_run()
|
||||
{
|
||||
self::check_watchdog();
|
||||
}
|
||||
public static function __interim_test_run()
|
||||
{
|
||||
self::check_watchdog();
|
||||
}
|
||||
protected static function check_watchdog()
|
||||
{
|
||||
foreach(self::$to_monitor as $sensor)
|
||||
{
|
||||
$val = phodevi::read_sensor($sensor);
|
||||
if($val > self::$monitor_threshold)
|
||||
{
|
||||
echo PHP_EOL . PHP_EOL . 'WATCHDOG: ' . strtoupper(phodevi::sensor_object_name($sensor)) . ' EXCEEDED THRESHOLD: ' . $val . ' ' . strtoupper(phodevi::read_sensor_object_unit($sensor)) . PHP_EOL;
|
||||
|
||||
$minutes_to_wait = 3;
|
||||
$freq_to_poll = 5;
|
||||
echo 'SUSPENDING TESTING; WILL WAIT UP TO ' . $minutes_to_wait . ' MINUTES TO SEE IF VALUE LOWERED. ' . PHP_EOL . PHP_EOL;
|
||||
for($i = 0; $i < ($minutes_to_wait * 60); $i += $freq_to_poll)
|
||||
{
|
||||
sleep($freq_to_poll);
|
||||
if(phodevi::read_sensor($sensor) < self::$monitor_threshold)
|
||||
{
|
||||
echo PHP_EOL . 'WATCHDOG RESTORING PROCESS: ' . strtoupper(phodevi::sensor_object_name($sensor)) . ': ' . phodevi::read_sensor($sensor) . ' ' . strtoupper(phodevi::read_sensor_object_unit($sensor)) . PHP_EOL;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
echo 'WATCHDOG: EXITING PROGRAM' . PHP_EOL;
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
private static function create_single_sensor_instance($sensor, $instance, $param)
|
||||
{
|
||||
if(call_user_func(array($sensor[2], 'parameter_check'), $param) === true)
|
||||
{
|
||||
$sensor_object = new $sensor[2]($instance, $param);
|
||||
self::$to_monitor[] = $sensor_object;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2009 - 2015, Phoronix Media
|
||||
Copyright (C) 2009 - 2015, Michael Larabel
|
||||
Copyright (C) 2009 - 2016, Phoronix Media
|
||||
Copyright (C) 2009 - 2016, Michael Larabel
|
||||
pts_concise_display_mode.php: The batch / concise display mode
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -128,7 +128,7 @@ class pts_concise_display_mode implements pts_display_mode_interface
|
||||
public function test_install_start($identifier)
|
||||
{
|
||||
$this->test_install_pos++;
|
||||
echo $this->tab . $identifier . ':' . PHP_EOL;
|
||||
echo $this->tab . pts_client::cli_colored_text($identifier, 'cyan') . ':' . PHP_EOL;
|
||||
echo $this->tab . $this->tab . 'Test Installation ' . $this->test_install_pos . ' of ' . $this->test_install_count . PHP_EOL;
|
||||
}
|
||||
public function test_install_downloads($test_install_request)
|
||||
@@ -220,7 +220,7 @@ class pts_concise_display_mode implements pts_display_mode_interface
|
||||
|
||||
$terminal_width = pts_client::terminal_width() > 1 ? pts_client::terminal_width() : $terminal_width;
|
||||
$text_width = $terminal_width - (strlen($this->tab) * 3);
|
||||
echo PHP_EOL . $this->tab . $this->tab . wordwrap('[NOTICE] ' . $message, $text_width, PHP_EOL . $this->tab . $this->tab) . PHP_EOL;
|
||||
echo PHP_EOL . $this->tab . $this->tab . pts_client::cli_colored_text(wordwrap('[NOTICE] ' . $message, $text_width, PHP_EOL . $this->tab . $this->tab), 'gray') . PHP_EOL;
|
||||
}
|
||||
public function test_install_progress_start($process)
|
||||
{
|
||||
@@ -275,7 +275,7 @@ class pts_concise_display_mode implements pts_display_mode_interface
|
||||
}
|
||||
public function test_install_error($error_string)
|
||||
{
|
||||
echo $this->tab . $this->tab . $this->tab . $error_string . PHP_EOL;
|
||||
echo $this->tab . $this->tab . $this->tab . pts_client::cli_colored_text($error_string, 'red') . PHP_EOL;
|
||||
}
|
||||
public function test_install_prompt($prompt_string)
|
||||
{
|
||||
@@ -294,14 +294,14 @@ class pts_concise_display_mode implements pts_display_mode_interface
|
||||
}
|
||||
public function test_run_start(&$test_run_manager, &$test_result)
|
||||
{
|
||||
echo PHP_EOL . PHP_EOL . $test_result->test_profile->get_title() . ($test_result->test_profile->get_app_version() != null ? ' ' . $test_result->test_profile->get_app_version() : null) . ':' . PHP_EOL . $this->tab . $test_result->test_profile->get_identifier();
|
||||
$test_title_string = $test_result->test_profile->get_title() . ($test_result->test_profile->get_app_version() != null ? ' ' . $test_result->test_profile->get_app_version() : null) . ':' . PHP_EOL . $this->tab . $test_result->test_profile->get_identifier();
|
||||
|
||||
if(($test_description = $test_result->get_arguments_description()) != false)
|
||||
{
|
||||
echo ' [' . pts_client::swap_variables($test_description, array('pts_client', 'environmental_variables')) . ']';
|
||||
$test_title_string .= ' [' . pts_client::swap_variables($test_description, array('pts_client', 'environmental_variables')) . ']';
|
||||
}
|
||||
|
||||
echo PHP_EOL;
|
||||
echo PHP_EOL . PHP_EOL . pts_client::cli_colored_text($test_title_string, 'cyan') . PHP_EOL;
|
||||
echo $this->tab . 'Test ' . $test_run_manager->get_test_run_position() . ' of ' . $test_run_manager->get_test_run_count_reported() . PHP_EOL;
|
||||
|
||||
$this->trial_run_count_current = 0;
|
||||
@@ -347,7 +347,7 @@ class pts_concise_display_mode implements pts_display_mode_interface
|
||||
}
|
||||
public function test_run_instance_error($error_string)
|
||||
{
|
||||
echo PHP_EOL . $this->tab . $this->tab . $error_string;
|
||||
echo PHP_EOL . $this->tab . $this->tab . pts_client::cli_colored_text($error_string, 'red');
|
||||
}
|
||||
public function test_run_instance_output(&$to_output)
|
||||
{
|
||||
@@ -415,7 +415,7 @@ class pts_concise_display_mode implements pts_display_mode_interface
|
||||
$end_print .= $this->tab . $this->tab . $result . PHP_EOL;
|
||||
}
|
||||
|
||||
$end_print .= PHP_EOL . $this->tab . pts_strings::result_quantifier_to_string($test_result->test_profile->get_result_quantifier()) . ': ' . $test_result->active->get_result() . ' ' . $test_result->test_profile->get_result_scale();
|
||||
$end_print .= PHP_EOL . $this->tab . pts_strings::result_quantifier_to_string($test_result->test_profile->get_result_quantifier()) . ': ' . pts_client::cli_colored_text($test_result->active->get_result() . ' ' . $test_result->test_profile->get_result_scale(), 'green');
|
||||
|
||||
if($test_result->active->get_min_result())
|
||||
{
|
||||
@@ -438,7 +438,7 @@ class pts_concise_display_mode implements pts_display_mode_interface
|
||||
}
|
||||
public function test_run_error($error_string)
|
||||
{
|
||||
echo $this->tab . $this->tab . $error_string . PHP_EOL;
|
||||
echo $this->tab . $this->tab . pts_client::cli_colored_text($error_string, 'red') . PHP_EOL;
|
||||
}
|
||||
public function generic_prompt($prompt_string)
|
||||
{
|
||||
@@ -460,7 +460,7 @@ class pts_concise_display_mode implements pts_display_mode_interface
|
||||
foreach(pts_strings::trim_explode(PHP_EOL, $string) as $line_count => $line_string)
|
||||
{
|
||||
// ($line_count > 0 ? $this->tab : null) .
|
||||
echo $line_string . PHP_EOL;
|
||||
echo pts_client::cli_colored_text($line_string, 'green') . PHP_EOL;
|
||||
}
|
||||
|
||||
if($ending_line_break)
|
||||
@@ -484,30 +484,30 @@ class pts_concise_display_mode implements pts_display_mode_interface
|
||||
}
|
||||
public function triggered_system_error($level, $message, $file, $line)
|
||||
{
|
||||
echo PHP_EOL . '[' . $level . '] ';
|
||||
$error_msg = PHP_EOL . '[' . $level . '] ';
|
||||
if(strpos($message, PHP_EOL) === false)
|
||||
{
|
||||
echo $message . ' ';
|
||||
$error_msg .= $message . ' ';
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach(pts_strings::trim_explode(PHP_EOL, $message) as $line_count => $line_string)
|
||||
{
|
||||
// ($line_count > 0 ? $this->tab : null)
|
||||
echo $line_string . PHP_EOL . str_repeat(' ', strlen($level) + 3);
|
||||
$error_msg .= $line_string . PHP_EOL . str_repeat(' ', strlen($level) + 3);
|
||||
}
|
||||
}
|
||||
|
||||
if($file != null)
|
||||
{
|
||||
echo 'in ' . basename($file, '.php');
|
||||
$error_msg .= 'in ' . basename($file, '.php');
|
||||
}
|
||||
if($line != 0)
|
||||
{
|
||||
echo ':' . $line;
|
||||
$error_msg .= ':' . $line;
|
||||
}
|
||||
|
||||
echo PHP_EOL;
|
||||
echo pts_client::cli_colored_text($error_msg, 'red') . PHP_EOL;
|
||||
}
|
||||
public function get_tab()
|
||||
{
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2015, Phoronix Media
|
||||
Copyright (C) 2015, Michael Larabel
|
||||
Copyright (C) 2015 - 2016, Phoronix Media
|
||||
Copyright (C) 2015 - 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -80,7 +80,7 @@ class pts_short_display_mode extends pts_concise_display_mode
|
||||
public function test_run_instance_header(&$test_result)
|
||||
{
|
||||
$this->trial_run_count_current++;
|
||||
echo $this->print_test_identifier_prefix($test_result) . 'Started Run ' . $this->trial_run_count_current . ' @ ' . date('H:i:s') . PHP_EOL;
|
||||
//echo $this->print_test_identifier_prefix($test_result) . 'Started Run ' . $this->trial_run_count_current . ' @ ' . date('H:i:s') . PHP_EOL;
|
||||
}
|
||||
public function test_run_instance_complete(&$test_result)
|
||||
{
|
||||
|
||||
@@ -278,6 +278,33 @@ class pts_client
|
||||
|
||||
return $runtime_variables;
|
||||
}
|
||||
public static function supports_colored_text_output()
|
||||
{
|
||||
return (function_exists('posix_isatty') && posix_isatty(STDOUT)) || (PTS_IS_CLIENT && getenv('LS_COLORS'));
|
||||
}
|
||||
public static function cli_colored_text($str, $color)
|
||||
{
|
||||
if(!self::supports_colored_text_output())
|
||||
{
|
||||
return $str;
|
||||
}
|
||||
|
||||
$colors = array(
|
||||
'black' => '0;30',
|
||||
'gray' => '1;30',
|
||||
'blue' => '0;34',
|
||||
'green' => '0;32',
|
||||
'red' => '0;31',
|
||||
'cyan' => '0;36',
|
||||
);
|
||||
|
||||
if(!isset($colors[$color]))
|
||||
{
|
||||
return $str;
|
||||
}
|
||||
|
||||
return "\033[" . $colors[$color] . 'm' . $str . "\033[0m";
|
||||
}
|
||||
public static function save_test_result($save_to = null, $save_results = null, $render_graphs = true, $result_identifier = null)
|
||||
{
|
||||
// Saves PTS result file
|
||||
@@ -460,7 +487,7 @@ class pts_client
|
||||
break;
|
||||
}
|
||||
}
|
||||
public static function program_requirement_checks($only_show_required = false)
|
||||
public static function program_requirement_checks($only_show_required = false, $always_report = false)
|
||||
{
|
||||
$extension_checks = pts_needed_extensions();
|
||||
|
||||
@@ -468,14 +495,21 @@ class pts_client
|
||||
$printed_optional_header = false;
|
||||
foreach($extension_checks as $extension)
|
||||
{
|
||||
if($extension[1] == false)
|
||||
if($extension[1] == false || $always_report)
|
||||
{
|
||||
if($always_report)
|
||||
{
|
||||
$printed_required_header = true;
|
||||
$printed_optional_header = true;
|
||||
echo ($extension[1] == false ? 'MISSING' : 'PRESENT') . ' - ';
|
||||
}
|
||||
|
||||
if($extension[0] == 1)
|
||||
{
|
||||
// Oops, this extension is required
|
||||
if($printed_required_header == false)
|
||||
{
|
||||
echo PHP_EOL . 'The following PHP extensions are REQUIRED by the Phoronix Test Suite:' . PHP_EOL . PHP_EOL;
|
||||
echo PHP_EOL . 'The following PHP extensions are REQUIRED:' . PHP_EOL . PHP_EOL;
|
||||
$printed_required_header = true;
|
||||
}
|
||||
}
|
||||
@@ -494,7 +528,7 @@ class pts_client
|
||||
}
|
||||
}
|
||||
|
||||
echo sprintf('%-8ls %-30ls' . PHP_EOL, $extension[2], $extension[3]);
|
||||
echo sprintf('%-9ls %-30ls' . PHP_EOL, $extension[2], $extension[3]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -502,7 +536,7 @@ class pts_client
|
||||
{
|
||||
echo PHP_EOL;
|
||||
|
||||
if($printed_required_header)
|
||||
if($printed_required_header && !$always_report)
|
||||
{
|
||||
exit;
|
||||
}
|
||||
@@ -1474,7 +1508,7 @@ class pts_client
|
||||
}
|
||||
else
|
||||
{
|
||||
$possible_browsers = array('firefox', 'mozilla', 'x-www-browser', 'open', 'xdg-open', 'iceweasel', 'konqueror', 'epiphany', 'google-chrome', 'midori');
|
||||
$possible_browsers = array('firefox', 'mozilla', 'x-www-browser', 'iceweasel', 'konqueror', 'epiphany', 'google-chrome', 'midori', 'epiphany-browser', 'epiphany', 'midori', 'qupzilla', 'open', 'xdg-open');
|
||||
|
||||
foreach($possible_browsers as &$b)
|
||||
{
|
||||
|
||||
@@ -91,7 +91,7 @@ class pts_documentation
|
||||
}
|
||||
public static function basic_description()
|
||||
{
|
||||
return 'The **Phoronix Test Suite** is the most comprehensive testing and benchmarking platform available for Linux, Solaris, Mac OS X, and BSD operating systems. The Phoronix Test Suite allows for carrying out tests in a fully automated manner from test installation to execution and reporting. All tests are meant to be easily reproducible, easy-to-use, and support fully automated execution. The Phoronix Test Suite is open-source under the GNU GPLv3 license and is developed by Phoronix Media in cooperation with partners.';
|
||||
return 'The **Phoronix Test Suite** is the most comprehensive testing and benchmarking platform available for Linux, Solaris, OS X, and BSD operating systems. The Phoronix Test Suite allows for carrying out tests in a fully automated manner from test installation to execution and reporting. All tests are meant to be easily reproducible, easy-to-use, and support fully automated execution. The Phoronix Test Suite is open-source under the GNU GPLv3 license and is developed by Phoronix Media in cooperation with partners.';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2014 - 2015, Phoronix Media
|
||||
Copyright (C) 2014 - 2015, Michael Larabel
|
||||
Copyright (C) 2014 - 2016, Phoronix Media
|
||||
Copyright (C) 2014 - 2016, Michael Larabel
|
||||
pts_logger.php: A simple log file generator
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -25,7 +25,7 @@ class pts_logger
|
||||
{
|
||||
private $log_file = null;
|
||||
|
||||
public function __construct($log_file = null)
|
||||
public function __construct($log_file = null, $file_name = null)
|
||||
{
|
||||
if($log_file == null)
|
||||
{
|
||||
@@ -34,7 +34,18 @@ class pts_logger
|
||||
else
|
||||
$log_file = PTS_USER_PATH;
|
||||
|
||||
$log_file .= (defined('PHOROMATIC_SERVER') ? 'phoromatic' : 'phoronix-test-suite') . '.log';
|
||||
if($file_name != null)
|
||||
{
|
||||
$log_file .= $file_name;
|
||||
}
|
||||
else if(defined('PHOROMATIC_SERVER'))
|
||||
{
|
||||
$log_file .= 'phoromatic.log';
|
||||
}
|
||||
else
|
||||
{
|
||||
$log_file .= 'phoronix-test-suite.log';
|
||||
}
|
||||
}
|
||||
|
||||
// if(file_exists($log_file))
|
||||
@@ -53,12 +64,12 @@ class pts_logger
|
||||
return;
|
||||
file_put_contents($this->log_file, null);
|
||||
}
|
||||
public function log($message)
|
||||
public function log($message, $date_prefix = true)
|
||||
{
|
||||
if($this->log_file == null)
|
||||
return;
|
||||
|
||||
file_put_contents($this->log_file, '[' . date('D M ' . str_pad(date('j'), 2, ' ', STR_PAD_LEFT) . ' H:i:s Y') . '] ' . $message . PHP_EOL, FILE_APPEND);
|
||||
file_put_contents($this->log_file, ($date_prefix ? '[' . date('M ' . str_pad(date('j'), 2, ' ', STR_PAD_LEFT) . ' H:i:s Y') . '] ' : null) . $message . PHP_EOL, FILE_APPEND);
|
||||
}
|
||||
public function get_log_file_size()
|
||||
{
|
||||
@@ -68,6 +79,10 @@ class pts_logger
|
||||
{
|
||||
return $this->log_file;
|
||||
}
|
||||
public function get_log()
|
||||
{
|
||||
return file_get_contents($this->get_log_file_location());
|
||||
}
|
||||
public static function add_to_log($message)
|
||||
{
|
||||
static $logger = null;
|
||||
|
||||
548
pts-core/objects/client/pts_stress_run_manager.php
Normal file
548
pts-core/objects/client/pts_stress_run_manager.php
Normal file
@@ -0,0 +1,548 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2015 - 2016, Phoronix Media
|
||||
Copyright (C) 2015 - 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class pts_stress_run_manager extends pts_test_run_manager
|
||||
{
|
||||
private $multi_test_stress_start_time;
|
||||
private $stress_tests_executed;
|
||||
private $sensor_data_archived;
|
||||
private $sensor_data_archived_units;
|
||||
private $loop_until_time;
|
||||
private $thread_collection_dir;
|
||||
private $sensors_to_monitor;
|
||||
private $stress_subsystems_active;
|
||||
private $stress_child_thread = false;
|
||||
private $stress_logger;
|
||||
private $stress_log_event_call = false;
|
||||
|
||||
public function multi_test_stress_run_execute($tests_to_run_concurrently = 3, $total_loop_time = false)
|
||||
{
|
||||
ini_set('memory_limit','8192M'); // XXX testing
|
||||
|
||||
$continue_test_flag = true;
|
||||
pts_client::$display->test_run_process_start($this);
|
||||
$this->allow_test_cache_share = false;
|
||||
$this->disable_dynamic_run_count();
|
||||
$this->multi_test_stress_run = $tests_to_run_concurrently;
|
||||
$possible_tests_to_run = $this->get_tests_to_run();
|
||||
if(is_numeric($total_loop_time))
|
||||
{
|
||||
$total_loop_time = $total_loop_time * 60;
|
||||
}
|
||||
$this->loop_until_time = is_numeric($total_loop_time) && $total_loop_time > 1 ? time() + $total_loop_time : false;
|
||||
$this->stress_tests_executed = array();
|
||||
$this->multi_test_stress_start_time = time();
|
||||
$this->thread_collection_dir = pts_client::create_temporary_directory('stress-threads');
|
||||
$this->sensors_to_monitor = array();
|
||||
$this->sensor_data_archived = array();
|
||||
$this->sensor_data_archived_units = array();
|
||||
$this->stress_logger = new pts_logger(null, 'phoronix-test-suite-stress-' . date('ymdHi') . '.log');
|
||||
$this->stress_logger->log('Log Initialized');
|
||||
putenv('FORCE_TIMES_TO_RUN=1');
|
||||
|
||||
// Determine how frequently to print reports / status updates
|
||||
$time_report_counter = time();
|
||||
if($total_loop_time == 'infinite')
|
||||
{
|
||||
$report_counter_frequency = 5 * 60;
|
||||
}
|
||||
else if($total_loop_time > (3 * 60 * 60))
|
||||
{
|
||||
$report_counter_frequency = 30 * 60;
|
||||
}
|
||||
else if($total_loop_time > (60 * 60))
|
||||
{
|
||||
$report_counter_frequency = 10 * 60;
|
||||
}
|
||||
else if($total_loop_time > (20 * 60))
|
||||
{
|
||||
$report_counter_frequency = 5 * 60;
|
||||
}
|
||||
else if($total_loop_time > (10 * 60))
|
||||
{
|
||||
$report_counter_frequency = 2 * 60;
|
||||
}
|
||||
else
|
||||
{
|
||||
$report_counter_frequency = 60;
|
||||
}
|
||||
|
||||
// SIGTERM handling
|
||||
if(function_exists('pcntl_signal'))
|
||||
{
|
||||
declare(ticks = 1);
|
||||
pcntl_signal(SIGTERM, array($this, 'sig_handler'));
|
||||
pcntl_signal(SIGHUP, array($this, 'sig_handler'));
|
||||
pcntl_signal(SIGINT, array($this, 'sig_handler'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->stress_print_and_log('PHP PCNTL support is needed if wishing to gracefully interrupt testing with signals.' . PHP_EOL);
|
||||
}
|
||||
|
||||
// SENSOR SETUP WORK
|
||||
$sensor_interval_frequency = is_numeric($total_loop_time) && $total_loop_time > 1 ? max($total_loop_time / 1000, 3) : 6;
|
||||
$sensor_time_since_last_poll = time();
|
||||
foreach(phodevi::supported_sensors(array('cpu_temp', 'cpu_usage', 'gpu_usage', 'gpu_temp', 'hdd_read_speed', 'hdd_write_speed', 'memory_usage', 'swap_usage', 'sys_temp')) as $sensor)
|
||||
{
|
||||
$supported_devices = call_user_func(array($sensor[2], 'get_supported_devices'));
|
||||
|
||||
if($supported_devices === NULL)
|
||||
{
|
||||
$supported_devices = array(null);
|
||||
}
|
||||
|
||||
foreach($supported_devices as $device)
|
||||
{
|
||||
$sensor_object = new $sensor[2](0, $device);
|
||||
if(phodevi::read_sensor($sensor_object) != -1)
|
||||
{
|
||||
array_push($this->sensors_to_monitor, $sensor_object);
|
||||
$this->sensor_data_archived[phodevi::sensor_object_name($sensor_object)] = array();
|
||||
$this->sensor_data_archived_units[phodevi::sensor_object_name($sensor_object)] = phodevi::read_sensor_object_unit($sensor_object);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$table = array();
|
||||
foreach(phodevi::system_hardware(false) as $component => $value)
|
||||
{
|
||||
$table[] = array($component . ': ', $value);
|
||||
}
|
||||
foreach(phodevi::system_software(false) as $component => $value)
|
||||
{
|
||||
$table[] = array($component . ': ', $value);
|
||||
}
|
||||
$this->stress_print_and_log('SYSTEM INFORMATION: ' . PHP_EOL . pts_user_io::display_text_table($table, ' ', 1) . PHP_EOL . PHP_EOL);
|
||||
|
||||
// BEGIN THE LOOP
|
||||
while(!empty($possible_tests_to_run))
|
||||
{
|
||||
if($continue_test_flag == false)
|
||||
break;
|
||||
|
||||
if(($time_report_counter + $report_counter_frequency) <= time() && count(pts_file_io::glob($this->thread_collection_dir . '*')) > 0)
|
||||
{
|
||||
// ISSUE STATUS REPORT
|
||||
$this->stress_print_and_log($this->stress_status_report());
|
||||
$time_report_counter = time();
|
||||
}
|
||||
|
||||
$this->stress_subsystems_active = array();
|
||||
$test_identifiers_active = array();
|
||||
|
||||
while(($waited_pid = pcntl_waitpid(-1, $status, WNOHANG)) > 0)
|
||||
{
|
||||
pts_file_io::unlink($this->thread_collection_dir . $waited_pid);
|
||||
}
|
||||
|
||||
foreach(pts_file_io::glob($this->thread_collection_dir . '*') as $pid_file)
|
||||
{
|
||||
$pid = basename($pid_file);
|
||||
$waited_pid = pcntl_waitpid($pid, $status, WNOHANG);
|
||||
|
||||
if(!file_exists('/proc/' . $pid))
|
||||
{
|
||||
unlink($pid_file);
|
||||
continue;
|
||||
}
|
||||
|
||||
$test = new pts_test_profile(file_get_contents($pid_file));
|
||||
|
||||
// Count the number of tests per stress subsystems active
|
||||
if(!isset($this->stress_subsystems_active[$test->get_test_hardware_type()]))
|
||||
{
|
||||
$this->stress_subsystems_active[$test->get_test_hardware_type()] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->stress_subsystems_active[$test->get_test_hardware_type()] += 1;
|
||||
}
|
||||
|
||||
if(!in_array($test->get_identifier(), $test_identifiers_active))
|
||||
{
|
||||
$test_identifiers_active[] = $test->get_identifier();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!empty($possible_tests_to_run) && count(pts_file_io::glob($this->thread_collection_dir . '*')) < $this->multi_test_stress_run && (!$total_loop_time || $total_loop_time == 'infinite' || $this->loop_until_time > time()))
|
||||
{
|
||||
shuffle($possible_tests_to_run);
|
||||
|
||||
$test_to_run = false;
|
||||
$test_run_index = -1;
|
||||
|
||||
if(getenv('DONT_BALANCE_TESTS_FOR_SUBSYSTEMS') == false)
|
||||
{
|
||||
// Try to pick a test for a hardware subsystem not yet being explicitly utilized
|
||||
foreach($possible_tests_to_run as $i => $test)
|
||||
{
|
||||
$hw_subsystem_type = $test->test_profile->get_test_hardware_type();
|
||||
|
||||
if(!isset($this->stress_subsystems_active[$hw_subsystem_type]) && !$this->skip_test_check($test))
|
||||
{
|
||||
$test_run_index = $i;
|
||||
$test_to_run = $test;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($test_run_index == -1 && getenv('DONT_TRY_TO_ENSURE_TESTS_ARE_UNIQUE') == false)
|
||||
{
|
||||
// Try to pick a test from a test profile not currently active
|
||||
foreach($possible_tests_to_run as $i => $test)
|
||||
{
|
||||
if(!in_array($test->test_profile->get_identifier(), $test_identifiers_active) && !$this->skip_test_check($test))
|
||||
{
|
||||
$test_run_index = $i;
|
||||
$test_to_run = $test;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($test_run_index == -1)
|
||||
{
|
||||
// Last resort, just randomly pick a true "random" test
|
||||
$test_run_index = array_rand(array_keys($possible_tests_to_run));
|
||||
$test_to_run = $possible_tests_to_run[$test_run_index];
|
||||
|
||||
if($this->skip_test_check($test_to_run))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$pid = pcntl_fork();
|
||||
if($pid == -1)
|
||||
{
|
||||
$this->stress_print_and_log('Forking Failure.');
|
||||
}
|
||||
if($pid)
|
||||
{
|
||||
// parent
|
||||
$test_identifier = $test_to_run->test_profile->get_identifier();
|
||||
file_put_contents($this->thread_collection_dir . $pid, $test_identifier);
|
||||
|
||||
if(!isset($this->stress_tests_executed[$test_identifier]))
|
||||
{
|
||||
$this->stress_tests_executed[$test_identifier] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->stress_tests_executed[$test_identifier]++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// child
|
||||
$this->stress_child_thread = true;
|
||||
echo 'Starting: ' . $test_to_run->test_profile->get_identifier() . ($test_to_run->get_arguments_description() != null ? ' [' . $test_to_run->get_arguments_description() . ']' : null) . PHP_EOL;
|
||||
$continue_test_flag = $this->process_test_run_request($test_to_run);
|
||||
echo PHP_EOL . 'Ended: ' . $test_to_run->test_profile->get_identifier() . ($test_to_run->get_arguments_description() != null ? ' [' . $test_to_run->get_arguments_description() . ']' : null) . PHP_EOL;
|
||||
pts_file_io::unlink($this->thread_collection_dir . getmypid());
|
||||
echo PHP_EOL;
|
||||
exit(0);
|
||||
}
|
||||
if($total_loop_time == false)
|
||||
{
|
||||
unset($possible_tests_to_run[$test_run_index]);
|
||||
}
|
||||
else if($total_loop_time == 'infinite')
|
||||
{
|
||||
//$this->stress_print_and_log('Continuing to test indefinitely' . PHP_EOL);
|
||||
}
|
||||
else
|
||||
{
|
||||
if($this->loop_until_time > time())
|
||||
{
|
||||
$time_left = ceil(($this->loop_until_time - time()) / 60);
|
||||
// echo 'Continuing to test for ' . $time_left . ' more minutes' . PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(is_numeric($this->loop_until_time) && $this->loop_until_time < time())
|
||||
{
|
||||
// Time to Quit
|
||||
$this->stress_print_and_log('TEST TIME EXPIRED; NO NEW TESTS WILL EXECUTE; CURRENT TESTS WILL FINISH' . PHP_EOL);
|
||||
// This halt-testing touch will let tests exit early (i.e. between multiple run steps)
|
||||
file_put_contents(PTS_USER_PATH . 'halt-testing', 'stress-run is done... This text really is not important, just checking for file presence.');
|
||||
// Final report
|
||||
$this->stress_print_and_log($this->final_stress_report());
|
||||
break;
|
||||
}
|
||||
|
||||
if($sensor_time_since_last_poll + $sensor_interval_frequency < time())
|
||||
{
|
||||
// Time to do a sensor reading
|
||||
foreach($this->sensors_to_monitor as &$sensor_object)
|
||||
{
|
||||
$this->sensor_data_archived[phodevi::sensor_object_name($sensor_object)][] = phodevi::read_sensor($sensor_object);
|
||||
}
|
||||
$sensor_time_since_last_poll = time();
|
||||
}
|
||||
}
|
||||
|
||||
putenv('FORCE_TIMES_TO_RUN');
|
||||
pts_file_io::delete($this->thread_collection_dir, null, true);
|
||||
|
||||
foreach($this->get_tests_to_run() as $run_request)
|
||||
{
|
||||
// Remove cache shares
|
||||
foreach(pts_file_io::glob($run_request->test_profile->get_install_dir() . 'cache-share-*.pt2so') as $cache_share_file)
|
||||
{
|
||||
unlink($cache_share_file);
|
||||
}
|
||||
}
|
||||
|
||||
// Wait for child processes to complete
|
||||
//pcntl_waitpid(-1, $status);
|
||||
|
||||
// Restore default handlers
|
||||
pcntl_signal(SIGTERM, SIG_DFL);
|
||||
pcntl_signal(SIGINT, SIG_DFL);
|
||||
pcntl_signal(SIGHUP, SIG_DFL);
|
||||
|
||||
return true;
|
||||
}
|
||||
protected function skip_test_check(&$test)
|
||||
{
|
||||
$hw_subsystem_type = $test->test_profile->get_test_hardware_type();
|
||||
$subsystem_limit_check = getenv('LIMIT_STRESS_' . strtoupper($hw_subsystem_type) . '_TESTS_COUNT');
|
||||
|
||||
if(isset($this->stress_subsystems_active[$hw_subsystem_type]) && $subsystem_limit_check && $subsystem_limit_check <= $this->stress_subsystems_active[$hw_subsystem_type])
|
||||
{
|
||||
// e.g. LIMIT_STRESS_GRAPHICS_TESTS_COUNT=2, don't want more than that number per subsystem concurrently
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
public function action_on_stress_log_set($call)
|
||||
{
|
||||
if(is_callable($call))
|
||||
{
|
||||
$this->stress_log_event_call = $call;
|
||||
}
|
||||
}
|
||||
protected function stress_print_and_log($msg)
|
||||
{
|
||||
if($this->stress_logger && $msg != null)
|
||||
{
|
||||
echo $msg;
|
||||
$this->stress_logger->log($msg, false);
|
||||
}
|
||||
if($this->stress_log_event_call)
|
||||
{
|
||||
call_user_func($this->stress_log_event_call, $this->stress_logger->get_log());
|
||||
}
|
||||
}
|
||||
public function get_stress_log()
|
||||
{
|
||||
return $this->stress_logger->get_log();
|
||||
}
|
||||
public function sig_handler($signo)
|
||||
{
|
||||
// Time to Quit
|
||||
// This halt-testing touch will let tests exit early (i.e. between multiple run steps)
|
||||
file_put_contents(PTS_USER_PATH . 'halt-testing', 'stress-run is done... This text really is not important, just checking for file presence.');
|
||||
|
||||
if($this->stress_child_thread == false)
|
||||
{
|
||||
$this->stress_print_and_log('SIGNAL RECEIVED; QUITTING...' . PHP_EOL);
|
||||
// Final report
|
||||
$this->stress_print_and_log($this->final_stress_report());
|
||||
}
|
||||
exit();
|
||||
}
|
||||
protected function stress_status_report()
|
||||
{
|
||||
return $this->final_stress_report(false);
|
||||
// XXX the below code has been phased out for a unified report called by final_stress_report();
|
||||
|
||||
$report_buffer = PHP_EOL . '###### STRESS RUN CURRENT STATUS ' . date('H:i M j') . ' ####' . PHP_EOL;
|
||||
$report_buffer .= 'ELAPSED TIME: ' . pts_strings::format_time(time() - $this->multi_test_stress_start_time) . PHP_EOL;
|
||||
if($this->loop_until_time > time())
|
||||
{
|
||||
$report_buffer .= 'TIME REMAINING: ' . pts_strings::format_time($this->loop_until_time - time()) . PHP_EOL;
|
||||
}
|
||||
else if($total_loop_time == 'infinite')
|
||||
{
|
||||
$report_buffer .= 'INFINITE TESTING; TESTING UNTIL INTERRUPTED' . PHP_EOL;
|
||||
}
|
||||
else
|
||||
{
|
||||
$report_buffer .= 'WAITING FOR CURRENT TEST RUN QUEUE TO FINISH.' . PHP_EOL;
|
||||
}
|
||||
$report_buffer .= 'NUMBER OF CONCURRENT TESTS PERMITTED: ' . $this->multi_test_stress_run . PHP_EOL . PHP_EOL;
|
||||
$report_buffer .= 'TESTS CURRENTLY ACTIVE: ' . PHP_EOL;
|
||||
|
||||
$table = array();
|
||||
foreach(pts_file_io::glob($this->thread_collection_dir . '*') as $pid_file)
|
||||
{
|
||||
$test = pts_file_io::file_get_contents($pid_file);
|
||||
$table[] = array($test, '[PID: ' . basename($pid_file) . ']');
|
||||
}
|
||||
$report_buffer .= pts_user_io::display_text_table($table, ' - ', 2) . PHP_EOL;
|
||||
|
||||
$report_buffer .= 'TEST SUBSYSTEMS ACTIVE: ' . PHP_EOL;
|
||||
foreach($this->stress_subsystems_active as $type => $count)
|
||||
{
|
||||
$report_buffer .= ' - ' . $type . PHP_EOL;
|
||||
}
|
||||
|
||||
$report_buffer .= 'CURRENT SYSTEM SENSORS: ' . PHP_EOL;
|
||||
$table = array();
|
||||
foreach($this->sensors_to_monitor as &$sensor_object)
|
||||
{
|
||||
// Hacky way to avoid reporting individual CPU core usages each time, save it for summaries
|
||||
if(strpos(phodevi::sensor_object_name($sensor_object), 'CPU Usage (CPU') !== false)
|
||||
continue;
|
||||
|
||||
$sensor_val = phodevi::read_sensor($sensor_object);
|
||||
|
||||
if($sensor_val > 0)
|
||||
{
|
||||
$table[] = array(phodevi::sensor_object_name($sensor_object) . ': ', pts_math::set_precision($sensor_val, 2), phodevi::read_sensor_object_unit($sensor_object));
|
||||
}
|
||||
}
|
||||
$report_buffer .= pts_user_io::display_text_table($table, ' - ', 2) . PHP_EOL;
|
||||
$report_buffer .= '######' . PHP_EOL;
|
||||
return $report_buffer;
|
||||
}
|
||||
protected function final_stress_report($is_final = true)
|
||||
{
|
||||
if(!$is_final)
|
||||
{
|
||||
$report_buffer = PHP_EOL . '###### STRESS RUN INTERIM REPORT ####' . PHP_EOL;
|
||||
}
|
||||
else
|
||||
{
|
||||
$report_buffer = PHP_EOL . '###### SUMMARY REPORT ####' . PHP_EOL;
|
||||
}
|
||||
|
||||
$report_buffer .= strtoupper(date('F j H:i T')) . PHP_EOL;
|
||||
$report_buffer .= 'START TIME: ' . date('F j H:i T', $this->multi_test_stress_start_time) . PHP_EOL;
|
||||
$report_buffer .= 'ELAPSED TIME: ' . pts_strings::format_time(time() - $this->multi_test_stress_start_time) . PHP_EOL;
|
||||
if($this->loop_until_time > time())
|
||||
{
|
||||
$report_buffer .= 'TIME REMAINING: ' . pts_strings::format_time($this->loop_until_time - time()) . PHP_EOL;
|
||||
}
|
||||
else
|
||||
{
|
||||
$report_buffer .= 'WAITING FOR CURRENT TEST RUN QUEUE TO FINISH.' . PHP_EOL;
|
||||
}
|
||||
$report_buffer .= 'SYSTEM IP: ' . pts_network::get_local_ip() . PHP_EOL;
|
||||
$report_buffer .= 'HOSTNAME: ' . phodevi::read_property('system', 'hostname') . PHP_EOL;
|
||||
$report_buffer .= '# OF CONCURRENT TESTS: ' . $this->multi_test_stress_run . PHP_EOL . PHP_EOL;
|
||||
|
||||
if(!$is_final)
|
||||
{
|
||||
$report_buffer .= 'TESTS CURRENTLY ACTIVE: ' . PHP_EOL;
|
||||
|
||||
$table = array();
|
||||
foreach(pts_file_io::glob($this->thread_collection_dir . '*') as $pid_file)
|
||||
{
|
||||
$test = pts_file_io::file_get_contents($pid_file);
|
||||
$table[] = array($test, '[PID: ' . basename($pid_file) . ']');
|
||||
}
|
||||
$report_buffer .= pts_user_io::display_text_table($table, ' - ', 2) . PHP_EOL;
|
||||
}
|
||||
|
||||
$report_buffer .= PHP_EOL . 'TESTS IN RUN QUEUE: ' . PHP_EOL . PHP_EOL;
|
||||
$tiq = array();
|
||||
foreach($this->get_tests_to_run() as $i => $test)
|
||||
{
|
||||
$bar = strtoupper($test->test_profile->get_title()) . ' [' . $test->test_profile->get_identifier() . ']';
|
||||
if(!isset($tiq[$bar]))
|
||||
{
|
||||
$tiq[$bar] = array();
|
||||
}
|
||||
|
||||
array_push($tiq[$bar], $test->get_arguments_description());
|
||||
}
|
||||
foreach($tiq as $test => $args)
|
||||
{
|
||||
$report_buffer .= $test . PHP_EOL;
|
||||
foreach($args as $arg)
|
||||
{
|
||||
if(!empty($arg))
|
||||
{
|
||||
$report_buffer .= ' ' . $arg . PHP_EOL;
|
||||
}
|
||||
}
|
||||
$report_buffer .= PHP_EOL;
|
||||
}
|
||||
|
||||
|
||||
$report_buffer .= 'SYSTEM INFORMATION: ' . PHP_EOL;
|
||||
$table = array();
|
||||
foreach(phodevi::system_hardware(false) as $component => $value)
|
||||
{
|
||||
$table[] = array($component . ': ', $value);
|
||||
}
|
||||
foreach(phodevi::system_software(false) as $component => $value)
|
||||
{
|
||||
$table[] = array($component . ': ', $value);
|
||||
}
|
||||
$report_buffer .= pts_user_io::display_text_table($table, ' ', 1) . PHP_EOL . PHP_EOL;
|
||||
|
||||
if(!empty($this->stress_tests_executed))
|
||||
{
|
||||
$table = array(array('TESTS EXECUTED', 'TIMES CALLED'));
|
||||
ksort($this->stress_tests_executed);
|
||||
|
||||
foreach($this->stress_tests_executed as $test => $times)
|
||||
{
|
||||
$table[] = array($test . ': ', $times);
|
||||
}
|
||||
$report_buffer .= pts_user_io::display_text_table($table, ' - ', 2) . PHP_EOL . PHP_EOL;
|
||||
}
|
||||
|
||||
$report_buffer .= 'SENSOR DATA: ' . PHP_EOL;
|
||||
$table = array(array('SENSOR', 'MIN', 'AVG', 'MAX'));
|
||||
foreach($this->sensor_data_archived as $sensor_name => &$sensor_data)
|
||||
{
|
||||
if(empty($sensor_data))
|
||||
continue;
|
||||
|
||||
$max_val = max($sensor_data);
|
||||
|
||||
if($max_val > 0)
|
||||
{
|
||||
$table[] = array($sensor_name . ': ',
|
||||
pts_math::set_precision(min($sensor_data), 2),
|
||||
pts_math::set_precision(array_sum($sensor_data) / count($sensor_data), 2),
|
||||
pts_math::set_precision($max_val, 2),
|
||||
$this->sensor_data_archived_units[$sensor_name]);
|
||||
}
|
||||
}
|
||||
$report_buffer .= pts_user_io::display_text_table($table, ' ', 2) . PHP_EOL;
|
||||
$report_buffer .= '######' . PHP_EOL;
|
||||
return $report_buffer;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -56,13 +56,12 @@ class pts_test_execution
|
||||
return false;
|
||||
}
|
||||
|
||||
$active_result_buffer = new pts_test_result_buffer_active();
|
||||
$test_run_request->active = &$active_result_buffer;
|
||||
$test_run_request->active = new pts_test_result_buffer_active();
|
||||
$execute_binary = $test_run_request->test_profile->get_test_executable();
|
||||
$times_to_run = $test_run_request->test_profile->get_times_to_run();
|
||||
$ignore_runs = $test_run_request->test_profile->get_runs_to_ignore();
|
||||
$test_type = $test_run_request->test_profile->get_test_hardware_type();
|
||||
$allow_cache_share = $test_run_request->test_profile->allow_cache_share();
|
||||
$allow_cache_share = $test_run_request->test_profile->allow_cache_share() && $test_run_manager->allow_test_cache_share();
|
||||
$min_length = $test_run_request->test_profile->get_min_length();
|
||||
$max_length = $test_run_request->test_profile->get_max_length();
|
||||
|
||||
@@ -86,6 +85,7 @@ class pts_test_execution
|
||||
|
||||
$time_test_start = time();
|
||||
pts_client::$display->test_run_start($test_run_manager, $test_run_request);
|
||||
sleep(1);
|
||||
|
||||
if(!$cache_share_present)
|
||||
{
|
||||
@@ -179,6 +179,7 @@ class pts_test_execution
|
||||
|
||||
if($restored_from_cache == false)
|
||||
{
|
||||
sleep(1);
|
||||
$test_run_command = 'cd ' . $to_execute . ' && ' . $execute_binary_prepend . './' . $execute_binary . ' ' . $pts_test_arguments . ' 2>&1';
|
||||
|
||||
pts_client::test_profile_debug_message('Test Run Command: ' . $test_run_command);
|
||||
@@ -284,7 +285,7 @@ class pts_test_execution
|
||||
else
|
||||
{
|
||||
// TODO integrate active_result into active buffer
|
||||
$active_result_buffer->add_trial_run_result($test_run_request->active->active_result, $test_run_request->active->active_min_result, $test_run_request->active->active_max_result);
|
||||
$test_run_request->active->add_trial_run_result($test_run_request->active->active_result, $test_run_request->active->active_min_result, $test_run_request->active->active_max_result);
|
||||
}
|
||||
}
|
||||
else if($test_run_request->test_profile->get_display_format() != 'NO_RESULT')
|
||||
@@ -310,21 +311,21 @@ class pts_test_execution
|
||||
}
|
||||
}
|
||||
|
||||
if($is_expected_last_run && $active_result_buffer->get_trial_run_count() > floor(($i - 2) / 2) && !$cache_share_present && $test_run_manager->do_dynamic_run_count())
|
||||
if($is_expected_last_run && $test_run_request->active->get_trial_run_count() > floor(($i - 2) / 2) && !$cache_share_present && $test_run_manager->do_dynamic_run_count())
|
||||
{
|
||||
// The later check above ensures if the test is failing often the run count won't uselessly be increasing
|
||||
// Should we increase the run count?
|
||||
$increase_run_count = false;
|
||||
|
||||
if($defined_times_to_run == ($i + 1) && $active_result_buffer->get_trial_run_count() > 0 && $active_result_buffer->get_trial_run_count() < $defined_times_to_run && $i < 64)
|
||||
if($defined_times_to_run == ($i + 1) && $test_run_request->active->get_trial_run_count() > 0 && $test_run_request->active->get_trial_run_count() < $defined_times_to_run && $i < 64)
|
||||
{
|
||||
// At least one run passed, but at least one run failed to produce a result. Increase count to try to get more successful runs
|
||||
$increase_run_count = $defined_times_to_run - $active_result_buffer->get_trial_run_count();
|
||||
$increase_run_count = $defined_times_to_run - $test_run_request->active->get_trial_run_count();
|
||||
}
|
||||
else if($active_result_buffer->get_trial_run_count() >= 2)
|
||||
else if($test_run_request->active->get_trial_run_count() >= 2)
|
||||
{
|
||||
// Dynamically increase run count if needed for statistical significance or other reasons
|
||||
$increase_run_count = $test_run_manager->increase_run_count_check($active_result_buffer, $defined_times_to_run, $test_run_time);
|
||||
$increase_run_count = $test_run_manager->increase_run_count_check($test_run_request->active, $defined_times_to_run, $test_run_time);
|
||||
|
||||
if($increase_run_count === -1)
|
||||
{
|
||||
@@ -402,19 +403,19 @@ class pts_test_execution
|
||||
}
|
||||
if(is_file($test_directory . 'post-test-exit-status'))
|
||||
{
|
||||
// If the post script writes its exit status to ~/post-test-exit-status, if it's non-zero the test run failed
|
||||
$exit_status = pts_file_io::file_get_contents($test_directory . 'post-test-exit-status');
|
||||
unlink($test_directory . 'post-test-exit-status');
|
||||
// If the post script writes its exit status to ~/post-test-exit-status, if it's non-zero the test run failed
|
||||
$exit_status = pts_file_io::file_get_contents($test_directory . 'post-test-exit-status');
|
||||
unlink($test_directory . 'post-test-exit-status');
|
||||
|
||||
if($exit_status != 0)
|
||||
{
|
||||
self::test_run_instance_error($test_run_manager, $test_run_request, 'The post run script exited with a non-zero exit status.' . PHP_EOL);
|
||||
$abort_testing=true;
|
||||
}
|
||||
if($exit_status != 0)
|
||||
{
|
||||
self::test_run_instance_error($test_run_manager, $test_run_request, 'The post run script exited with a non-zero exit status.' . PHP_EOL);
|
||||
$abort_testing = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($abort_testing)
|
||||
if($abort_testing && !is_dir('/mnt/c/Windows')) // bash on Windows has issues where this is always called, looks like bad exit status on Windows
|
||||
{
|
||||
self::test_run_error($test_run_manager, $test_run_request, 'This test execution has been abandoned.');
|
||||
return false;
|
||||
@@ -552,7 +553,7 @@ class pts_test_execution
|
||||
// Result Calculation
|
||||
$test_run_request->set_used_arguments_description($arguments_description);
|
||||
$test_run_request->set_used_arguments($extra_arguments);
|
||||
pts_test_result_parser::calculate_end_result($test_run_request, $active_result_buffer); // Process results
|
||||
pts_test_result_parser::calculate_end_result($test_run_request, $test_run_request->active); // Process results
|
||||
|
||||
pts_client::$display->test_run_end($test_run_request);
|
||||
|
||||
@@ -570,7 +571,7 @@ class pts_test_execution
|
||||
|
||||
// Remove lock
|
||||
pts_client::release_lock($lock_file);
|
||||
return $active_result_buffer;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ class pts_test_notes_manager
|
||||
$test_types = array();
|
||||
$test_tags = array();
|
||||
|
||||
foreach($test_result_objects as $test_result)
|
||||
foreach($test_result_objects as &$test_result)
|
||||
{
|
||||
pts_arrays::unique_push($test_types, $test_result->test_profile->get_test_hardware_type());
|
||||
|
||||
|
||||
@@ -23,42 +23,44 @@
|
||||
class pts_test_run_manager
|
||||
{
|
||||
public $result_file = null;
|
||||
private $is_new_result_file = true;
|
||||
protected $is_new_result_file = true;
|
||||
|
||||
private $tests_to_run = array();
|
||||
private $failed_tests_to_run = array();
|
||||
private $last_test_run_index = 0;
|
||||
private $test_run_pos = 0;
|
||||
private $test_run_count = 0;
|
||||
protected $tests_to_run = array();
|
||||
protected $hashes_of_tests_to_run = array();
|
||||
protected $failed_tests_to_run = array();
|
||||
protected $last_test_run_index = 0;
|
||||
protected $test_run_pos = 0;
|
||||
protected $test_run_count = 0;
|
||||
|
||||
private $file_name = null;
|
||||
private $file_name_title = null;
|
||||
private $results_identifier = null;
|
||||
private $run_description = null;
|
||||
protected $file_name = null;
|
||||
protected $file_name_title = null;
|
||||
protected $results_identifier = null;
|
||||
protected $run_description = null;
|
||||
|
||||
private $force_save_results = false;
|
||||
private $prompt_save_results = true;
|
||||
private $post_run_message = null;
|
||||
private $pre_run_message = null;
|
||||
private $allow_sharing_of_results = true;
|
||||
private $auto_upload_to_openbenchmarking = false;
|
||||
private $is_pcqs = false;
|
||||
private $openbenchmarking_results_data = false;
|
||||
protected $force_save_results = false;
|
||||
protected $prompt_save_results = true;
|
||||
protected $post_run_message = null;
|
||||
protected $pre_run_message = null;
|
||||
protected $allow_sharing_of_results = true;
|
||||
protected $auto_upload_to_openbenchmarking = false;
|
||||
protected $is_pcqs = false;
|
||||
protected $openbenchmarking_results_data = false;
|
||||
|
||||
private $do_dynamic_run_count = false;
|
||||
private $dynamic_run_count_on_length_or_less;
|
||||
private $dynamic_run_count_std_deviation_threshold;
|
||||
private $dynamic_run_count_export_script;
|
||||
private $multi_test_stress_run = false;
|
||||
protected $do_dynamic_run_count = false;
|
||||
protected $dynamic_run_count_on_length_or_less;
|
||||
protected $dynamic_run_count_std_deviation_threshold;
|
||||
protected $dynamic_run_count_export_script;
|
||||
protected $multi_test_stress_run = false;
|
||||
protected $allow_test_cache_share = true;
|
||||
|
||||
private static $test_run_process_active = false;
|
||||
private $batch_mode = false;
|
||||
private $auto_mode = false;
|
||||
protected static $test_run_process_active = false;
|
||||
protected $batch_mode = false;
|
||||
protected $auto_mode = false;
|
||||
|
||||
public function __construct($batch_mode = false, $auto_mode = false)
|
||||
{
|
||||
$this->do_dynamic_run_count = pts_config::read_bool_config('PhoronixTestSuite/Options/TestResultValidation/DynamicRunCount', 'TRUE');
|
||||
$this->dynamic_run_count_on_length_or_less = pts_config::read_user_config('PhoronixTestSuite/Options/TestResultValidation/LimitDynamicToTestLength', 20);
|
||||
$this->dynamic_run_count_on_length_or_less = 60; //pts_config::read_user_config('PhoronixTestSuite/Options/TestResultValidation/LimitIncreasingRunCountForTestsOverLength', 60);
|
||||
$this->dynamic_run_count_std_deviation_threshold = pts_config::read_user_config('PhoronixTestSuite/Options/TestResultValidation/StandardDeviationThreshold', 3.50);
|
||||
$this->dynamic_run_count_export_script = pts_config::read_user_config('PhoronixTestSuite/Options/TestResultValidation/ExportResultsTo', null);
|
||||
|
||||
@@ -80,6 +82,10 @@ class pts_test_run_manager
|
||||
{
|
||||
return $this->do_dynamic_run_count;
|
||||
}
|
||||
public function allow_test_cache_share()
|
||||
{
|
||||
return $this->allow_test_cache_share;
|
||||
}
|
||||
public function disable_dynamic_run_count()
|
||||
{
|
||||
$this->do_dynamic_run_count = false;
|
||||
@@ -159,9 +165,12 @@ class pts_test_run_manager
|
||||
}
|
||||
protected function add_test_result_object(&$test_result)
|
||||
{
|
||||
if($this->validate_test_to_run($test_result->test_profile))
|
||||
$hash = $test_result->get_comparison_hash(true, false);
|
||||
|
||||
if($this->validate_test_to_run($test_result->test_profile) && !isset($this->hashes_of_tests_to_run[$hash]))
|
||||
{
|
||||
pts_arrays::unique_push($this->tests_to_run, $test_result);
|
||||
$this->hashes_of_tests_to_run[$hash] = $hash;
|
||||
$this->tests_to_run[] = $test_result;
|
||||
}
|
||||
}
|
||||
public function get_tests_to_run()
|
||||
@@ -172,7 +181,7 @@ class pts_test_run_manager
|
||||
{
|
||||
$identifiers = array();
|
||||
|
||||
foreach($this->tests_to_run as $test_run_request)
|
||||
foreach($this->tests_to_run as &$test_run_request)
|
||||
{
|
||||
$identifiers[] = $test_run_request->test_profile->get_identifier();
|
||||
}
|
||||
@@ -189,9 +198,9 @@ class pts_test_run_manager
|
||||
}
|
||||
|
||||
$estimated_time = 0;
|
||||
for($i = $index; $i < count($this->tests_to_run); $i++)
|
||||
foreach(array_slice($this->tests_to_run, $index) as $test_run_request)
|
||||
{
|
||||
$estimated_time += $this->tests_to_run[$i]->test_profile->get_estimated_run_time();
|
||||
$estimated_time += $test_run_request->test_profile->get_estimated_run_time();
|
||||
}
|
||||
|
||||
return $estimated_time;
|
||||
@@ -621,7 +630,7 @@ class pts_test_run_manager
|
||||
return;
|
||||
}
|
||||
|
||||
$active_result_buffer = pts_test_execution::run_test($this, $test_run_request);
|
||||
pts_test_execution::run_test($this, $test_run_request);
|
||||
|
||||
if(pts_file_io::unlink(PTS_USER_PATH . 'halt-testing'))
|
||||
{
|
||||
@@ -658,7 +667,7 @@ class pts_test_run_manager
|
||||
if(!empty($test_identifier))
|
||||
{
|
||||
$test_run_request->test_result_buffer = new pts_test_result_buffer();
|
||||
$test_run_request->test_result_buffer->add_test_result($this->results_identifier, $test_run_request->active->get_result(), $active_result_buffer->get_values_as_string(), self::process_json_report_attributes($test_run_request), $test_run_request->active->get_min_result(), $test_run_request->active->get_max_result());
|
||||
$test_run_request->test_result_buffer->add_test_result($this->results_identifier, $test_run_request->active->get_result(), $test_run_request->active->get_values_as_string(), self::process_json_report_attributes($test_run_request), $test_run_request->active->get_min_result(), $test_run_request->active->get_max_result());
|
||||
$this->result_file->add_result($test_run_request);
|
||||
|
||||
if($test_run_request->secondary_linked_results != null && is_array($test_run_request->secondary_linked_results))
|
||||
@@ -814,7 +823,7 @@ class pts_test_run_manager
|
||||
$test_hardware_types = array();
|
||||
$test_internal_tags = array();
|
||||
|
||||
foreach($this->tests_to_run as $test_to_run)
|
||||
foreach($this->tests_to_run as &$test_to_run)
|
||||
{
|
||||
$test_external_dependencies = array_merge($test_external_dependencies, $test_to_run->test_profile->get_external_dependencies());
|
||||
$test_internal_tags = array_merge($test_internal_tags, $test_to_run->test_profile->get_internal_tags());
|
||||
@@ -901,6 +910,12 @@ class pts_test_run_manager
|
||||
{
|
||||
$notes['graphics-af'] = $af;
|
||||
}
|
||||
|
||||
$oc_offset = phodevi::read_property('gpu', 'oc-offset-string');
|
||||
if(!empty($oc_offset))
|
||||
{
|
||||
$notes['graphics-oc'] = $oc_offset;
|
||||
}
|
||||
}
|
||||
|
||||
if(phodevi::read_property('system', 'kernel-parameters'))
|
||||
@@ -949,7 +964,18 @@ class pts_test_run_manager
|
||||
}
|
||||
else
|
||||
{
|
||||
pts_client::display_web_page(PTS_SAVE_RESULTS_PATH . $this->get_file_name() . '/index.html', null, true, false);
|
||||
if((pts_client::read_env('DISPLAY') == false && pts_client::read_env('WAYLAND_DISPLAY') == false) && !defined('PHOROMATIC_PROCESS'))
|
||||
{
|
||||
$txt_results = pts_user_io::prompt_bool_input('Do you want to view the text results of the testing', true);
|
||||
if($txt_results)
|
||||
{
|
||||
echo pts_result_file_output::result_file_to_text($this->result_file, pts_client::terminal_width());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pts_client::display_web_page(PTS_SAVE_RESULTS_PATH . $this->get_file_name() . '/index.html', null, true, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1168,7 +1194,7 @@ class pts_test_run_manager
|
||||
public function subsystems_under_test()
|
||||
{
|
||||
$subsystems_to_test = array();
|
||||
foreach($this->tests_to_run as $test_run_request)
|
||||
foreach($this->tests_to_run as &$test_run_request)
|
||||
{
|
||||
pts_arrays::unique_push($subsystems_to_test, $test_run_request->test_profile->get_test_hardware_type());
|
||||
}
|
||||
@@ -1411,114 +1437,6 @@ class pts_test_run_manager
|
||||
{
|
||||
return $this->multi_test_stress_run;
|
||||
}
|
||||
public function multi_test_stress_run_execute($tests_to_run_concurrently = 3, $total_loop_time = false)
|
||||
{
|
||||
$continue_test_flag = true;
|
||||
pts_client::$display->test_run_process_start($this);
|
||||
$this->disable_dynamic_run_count();
|
||||
$this->multi_test_stress_run = $tests_to_run_concurrently;
|
||||
$possible_tests_to_run = $this->get_tests_to_run();
|
||||
$tests_pids_active = array();
|
||||
$loop_until_time = is_numeric($total_loop_time) && $total_loop_time > 1 ? time() + $total_loop_time : false;
|
||||
|
||||
while(!empty($possible_tests_to_run) || !empty($tests_pids_active))
|
||||
{
|
||||
if($continue_test_flag == false)
|
||||
break;
|
||||
|
||||
$test_types_active = array();
|
||||
foreach($tests_pids_active as $pid => &$test)
|
||||
{
|
||||
$ret = pcntl_waitpid($pid, $status, WNOHANG | WUNTRACED);
|
||||
|
||||
if($ret)
|
||||
{
|
||||
if(pcntl_wifexited($status) || !posix_getsid($pid))
|
||||
{
|
||||
unset($tests_pids_active[$pid]);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(!in_array($test->test_profile->get_test_hardware_type(), $test_types_active))
|
||||
{
|
||||
$test_types_active[] = $test->test_profile->get_test_hardware_type();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!empty($possible_tests_to_run) && count($tests_pids_active) < $tests_to_run_concurrently && (!$total_loop_time || $loop_until_time > time()))
|
||||
{
|
||||
shuffle($possible_tests_to_run);
|
||||
|
||||
$test_to_run = false;
|
||||
$test_run_index = -1;
|
||||
foreach($possible_tests_to_run as $i => $test)
|
||||
{
|
||||
if(!in_array($test->test_profile->get_test_hardware_type(), $test_types_active))
|
||||
{
|
||||
$test_run_index = $i;
|
||||
$test_to_run = $test;
|
||||
}
|
||||
}
|
||||
if($test_run_index == -1)
|
||||
{
|
||||
$test_run_index = array_rand(array_keys($possible_tests_to_run));
|
||||
$test_to_run = $possible_tests_to_run[$test_run_index];
|
||||
}
|
||||
|
||||
$pid = pcntl_fork();
|
||||
if($pid == -1)
|
||||
{
|
||||
echo 'Forking failure.';
|
||||
}
|
||||
else if($pid)
|
||||
{
|
||||
$tests_pids_active[$pid] = $test_to_run;
|
||||
}
|
||||
else
|
||||
{
|
||||
$continue_test_flag = $this->process_test_run_request($test_to_run);
|
||||
return false;
|
||||
}
|
||||
|
||||
if($total_loop_time == false)
|
||||
{
|
||||
unset($possible_tests_to_run[$test_run_index]);
|
||||
}
|
||||
else if($total_loop_time == 'infinite')
|
||||
{
|
||||
echo 'Continuing to test indefinitely' . PHP_EOL;
|
||||
}
|
||||
else
|
||||
{
|
||||
if($loop_until_time > time())
|
||||
{
|
||||
$time_left = ceil(($loop_until_time - time()) / 60);
|
||||
echo 'Continuing to test for ' . $time_left . ' more minutes' . PHP_EOL;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'TOTAL_LOOP_TIME elapsed; quitting....' . PHP_EOL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
foreach($this->get_tests_to_run() as $run_request)
|
||||
{
|
||||
// Remove cache shares
|
||||
foreach(pts_file_io::glob($run_request->test_profile->get_install_dir() . 'cache-share-*.pt2so') as $cache_share_file)
|
||||
{
|
||||
unlink($cache_share_file);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
protected function test_prompts_to_result_objects(&$test_profile)
|
||||
{
|
||||
$result_objects = array();
|
||||
|
||||
@@ -48,6 +48,26 @@ class pts_tests
|
||||
|
||||
return $cleaned_tests;
|
||||
}
|
||||
public static function local_tests()
|
||||
{
|
||||
$local_tests = array();
|
||||
foreach(pts_file_io::glob(PTS_TEST_PROFILE_PATH . 'local/*/test-definition.xml') as $path)
|
||||
{
|
||||
$local_tests[] = 'local/' . basename(dirname($path));
|
||||
}
|
||||
|
||||
return $local_tests;
|
||||
}
|
||||
public static function local_suites()
|
||||
{
|
||||
$local_suites = array();
|
||||
foreach(pts_file_io::glob(PTS_TEST_SUITE_PATH . 'local/*/suite-definition.xml') as $path)
|
||||
{
|
||||
$local_suites[] = 'local/' . basename(dirname($path));
|
||||
}
|
||||
|
||||
return $local_suites;
|
||||
}
|
||||
public static function scan_for_error($log_file, $strip_string)
|
||||
{
|
||||
$error = null;
|
||||
|
||||
@@ -34,7 +34,8 @@ class nye_XmlWriter
|
||||
public function __construct($xsl_binding = null, $force_nice_formatting = false)
|
||||
{
|
||||
$this->dom = new DOMDocument('1.0');
|
||||
$this->dom->formatOutput = (PTS_IS_CLIENT && !defined('PHOROMATIC_DB_INIT')) || $force_nice_formatting;
|
||||
//$this->dom->formatOutput = (PTS_IS_CLIENT && !defined('PHOROMATIC_DB_INIT') && !defined('PAGE_LOAD_START_TIME')) || $force_nice_formatting;
|
||||
$this->dom->formatOutput = !defined('OPENBENCHMARKING_BUILD') || $force_nice_formatting;
|
||||
//$this->dom->preserveWhiteSpace = false;
|
||||
$this->items = array();
|
||||
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2010 - 2014, Phoronix Media
|
||||
Copyright (C) 2010 - 2014, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class pts_suite_nye_XmlReader extends nye_XmlReader
|
||||
{
|
||||
static $temp_suite = null;
|
||||
|
||||
public function __construct($read_xml)
|
||||
{
|
||||
if(!isset($xml_file[512]) && defined('PTS_TEST_SUITE_PATH') && is_file(PTS_TEST_SUITE_PATH . $read_xml . '/suite-definition.xml'))
|
||||
{
|
||||
$read_xml = PTS_TEST_SUITE_PATH . $read_xml . '/suite-definition.xml';
|
||||
}
|
||||
else if(substr($read_xml, -4) == '.zip' && is_file($read_xml))
|
||||
{
|
||||
$zip = new ZipArchive();
|
||||
|
||||
if($zip->open($read_xml) === true)
|
||||
{
|
||||
$read_xml = $zip->getFromName('suite-definition.xml');
|
||||
$zip->close();
|
||||
}
|
||||
}
|
||||
else if(isset(self::$temp_suite[$read_xml]))
|
||||
{
|
||||
$read_xml = self::$temp_suite[$read_xml];
|
||||
}
|
||||
|
||||
parent::__construct($read_xml);
|
||||
}
|
||||
public function validate()
|
||||
{
|
||||
return $this->dom->schemaValidate(PTS_OPENBENCHMARKING_PATH . 'schemas/test-suite.xsd');
|
||||
}
|
||||
public static function set_temporary_suite($name, $suite_xml)
|
||||
{
|
||||
self::$temp_suite[$name] = $suite_xml;
|
||||
}
|
||||
public static function is_temporary_suite($name)
|
||||
{
|
||||
return isset(self::$temp_suite[$name]);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -198,7 +198,7 @@ class phodevi_disk extends phodevi_device_interface
|
||||
$disks_formatted = array();
|
||||
$disks = array();
|
||||
|
||||
foreach(array_merge(pts_file_io::glob('/sys/block/sd*'), pts_file_io::glob('/sys/block/mmcblk*')) as $sdx)
|
||||
foreach(array_merge(pts_file_io::glob('/sys/block/sd*'), pts_file_io::glob('/sys/block/mmcblk*'), pts_file_io::glob('/sys/block/nvme*')) as $sdx)
|
||||
{
|
||||
if(strpos($sdx, 'boot') !== false)
|
||||
{
|
||||
@@ -394,6 +394,17 @@ class phodevi_disk extends phodevi_device_interface
|
||||
}
|
||||
}
|
||||
}
|
||||
if($extra_details == null && strpos($device['device'], '/dev/md') !== false && is_file('/proc/mdstat'))
|
||||
{
|
||||
// Show mdstat details
|
||||
$md = strstr(file_get_contents('/proc/mdstat'), basename($device['device']));
|
||||
$md = substr($md, 0, strpos($md, PHP_EOL));
|
||||
if(($x = strpos($md, 'active')) !== false)
|
||||
{
|
||||
$extra_details = trim(substr($md, $x + 7));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $extra_details;
|
||||
}
|
||||
|
||||
@@ -42,6 +42,9 @@ class phodevi_gpu extends phodevi_device_interface
|
||||
case 'memory-capacity':
|
||||
$property = new phodevi_device_property('gpu_memory_size', phodevi::smart_caching);
|
||||
break;
|
||||
case 'oc-offset-string':
|
||||
$property = new phodevi_device_property('gpu_oc_offset_string', phodevi::no_caching);
|
||||
break;
|
||||
case 'aa-level':
|
||||
$property = new phodevi_device_property('gpu_aa_level', phodevi::no_caching);
|
||||
break;
|
||||
@@ -127,6 +130,22 @@ class phodevi_gpu extends phodevi_device_interface
|
||||
|
||||
return phodevi::read_property('gpu', 'screen-resolution') == array($width, $height); // Check if video resolution set worked
|
||||
}
|
||||
public static function gpu_oc_offset_string()
|
||||
{
|
||||
$offset = 0;
|
||||
|
||||
if(is_file('/sys/class/drm/card0/device/pp_sclk_od'))
|
||||
{
|
||||
// AMDGPU OverDrive
|
||||
$pp_sclk_od = pts_file_io::file_get_contents('/sys/class/drm/card0/device/pp_sclk_od');
|
||||
if(is_numeric($pp_sclk_od) && $pp_sclk_od > 0)
|
||||
{
|
||||
$offset = 'AMD OverDrive GPU Overclock: ' . $pp_sclk_od . '%';
|
||||
}
|
||||
}
|
||||
|
||||
return $offset;
|
||||
}
|
||||
public static function gpu_aa_level()
|
||||
{
|
||||
// Determine AA level if over-rode
|
||||
|
||||
@@ -87,7 +87,13 @@ class phodevi_memory extends phodevi_device_interface
|
||||
else if(phodevi::is_linux())
|
||||
{
|
||||
$mem_size = phodevi_linux_parser::read_dmidecode('memory', 'Memory Device', 'Size', false, array('Not Installed', 'No Module Installed', 'Undefined'));
|
||||
$mem_speed = phodevi_linux_parser::read_dmidecode('memory', 'Memory Device', 'Speed', true, array('Unknown', 'Undefined'));
|
||||
$mem_speed = phodevi_linux_parser::read_dmidecode('memory', 'Memory Device', 'Configured Clock Speed', true, array('Unknown', 'Undefined'));
|
||||
|
||||
if($mem_speed == false)
|
||||
{
|
||||
// "Speed" only reports stock frequency where "Configured Clock Speed" should report the over/underclocked memory
|
||||
$mem_speed = phodevi_linux_parser::read_dmidecode('memory', 'Memory Device', 'Speed', true, array('Unknown', 'Undefined'));
|
||||
}
|
||||
$mem_type = phodevi_linux_parser::read_dmidecode('memory', 'Memory Device', 'Type', true, array('Unknown', 'Other', 'Flash', 'Undefined'));
|
||||
$mem_manufacturer = phodevi_linux_parser::read_dmidecode('memory', 'Memory Device', 'Manufacturer', true, array('Unknown', 'Undefined'));
|
||||
$mem_part = phodevi_linux_parser::read_dmidecode('memory', 'Memory Device', 'Part Number', true, array('Unknown', 'Undefined'));
|
||||
|
||||
@@ -76,11 +76,15 @@ class phodevi extends phodevi_base
|
||||
}
|
||||
}
|
||||
}
|
||||
public static function available_sensors()
|
||||
public static function available_sensors($limit_sensors = false)
|
||||
{
|
||||
static $available_sensors = null;
|
||||
|
||||
if($available_sensors == null)
|
||||
if($limit_sensors != false)
|
||||
{
|
||||
return self::select_sensors($limit_sensors);
|
||||
}
|
||||
else if($available_sensors == null)
|
||||
{
|
||||
$available_sensors = array();
|
||||
|
||||
@@ -95,15 +99,31 @@ class phodevi extends phodevi_base
|
||||
|
||||
return $available_sensors;
|
||||
}
|
||||
public static function supported_sensors()
|
||||
public static function select_sensors($limit_sensors = false)
|
||||
{
|
||||
$selected = array();
|
||||
foreach(self::available_sensors() as $sensor)
|
||||
{
|
||||
if($limit_sensors == false || (is_array($limit_sensors) && in_array($sensor[2], $limit_sensors)))
|
||||
{
|
||||
array_push($selected, $sensor);
|
||||
}
|
||||
}
|
||||
|
||||
return $selected;
|
||||
}
|
||||
public static function supported_sensors($limit_sensors = false)
|
||||
{
|
||||
static $supported_sensors = null;
|
||||
|
||||
if($supported_sensors == null)
|
||||
if($limit_sensors != false)
|
||||
{
|
||||
return self::select_sensors($limit_sensors);
|
||||
}
|
||||
else if($supported_sensors == null)
|
||||
{
|
||||
$supported_sensors = array();
|
||||
|
||||
foreach(self::available_sensors() as $sensor)
|
||||
foreach(self::available_sensors($limit_sensors) as $sensor)
|
||||
{
|
||||
if(self::sensor_supported($sensor))
|
||||
{
|
||||
|
||||
44
pts-core/objects/phodevi/sensors/ambient_temp.php
Normal file
44
pts-core/objects/phodevi/sensors/ambient_temp.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2016, Phoronix Media
|
||||
Copyright (C) 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class ambient_temp extends phodevi_sensor
|
||||
{
|
||||
const SENSOR_TYPE = 'ambient';
|
||||
const SENSOR_SENSES = 'temp';
|
||||
const SENSOR_UNIT = 'Celsius';
|
||||
|
||||
public function read_sensor()
|
||||
{
|
||||
$sys_temp = -1;
|
||||
if(pts_client::executable_in_path('temperv14'))
|
||||
{
|
||||
$temperv14 = trim(shell_exec('temperv14 -c 2>&1'));
|
||||
|
||||
if(!empty($temperv14) && is_numeric($temperv14))
|
||||
{
|
||||
return $temperv14;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2009 - 2015, Phoronix Media
|
||||
Copyright (C) 2009 - 2015, Michael Larabel
|
||||
Copyright (C) 2009 - 2016, Phoronix Media
|
||||
Copyright (C) 2009 - 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -145,7 +145,7 @@ class cpu_usage extends phodevi_sensor
|
||||
{
|
||||
$stat = file_get_contents('/proc/stat');
|
||||
|
||||
if($this->cpu_to_monitor === "summary")
|
||||
if($this->cpu_to_monitor === 'summary')
|
||||
{
|
||||
$start_line = 0;
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2009 - 2015, Phoronix Media
|
||||
Copyright (C) 2009 - 2015, Michael Larabel
|
||||
Copyright (C) 2009 - 2016, Phoronix Media
|
||||
Copyright (C) 2009 - 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -39,7 +39,8 @@ class gpu_temp extends phodevi_sensor
|
||||
{
|
||||
$temp_c = phodevi_linux_parser::read_ati_overdrive('Temperature');
|
||||
}
|
||||
else
|
||||
|
||||
if($temp_c == -1 || empty($temp_c))
|
||||
{
|
||||
foreach(array_merge(array('/sys/class/drm/card0/device/temp1_input'), pts_file_io::glob('/sys/class/drm/card0/device/hwmon/hwmon*/temp1_input')) as $temp_input)
|
||||
{
|
||||
|
||||
@@ -96,6 +96,10 @@ class phoromatic_server
|
||||
{
|
||||
return self::phoromatic_account_path($account_id) . 'systems/' . ($system_id != null ? $system_id . '/' : null);
|
||||
}
|
||||
public static function phoromatic_account_stress_log_path($account_id, $ticket_id = null)
|
||||
{
|
||||
return self::phoromatic_account_path($account_id) . 'stress-logs/' . ($ticket_id != null ? $ticket_id . '/' : null);
|
||||
}
|
||||
public static function read_setting($setting)
|
||||
{
|
||||
return pts_storage_object::read_from_file(self::$json_storage, $setting);
|
||||
@@ -307,12 +311,20 @@ class phoromatic_server
|
||||
// Change made 7 January 2016
|
||||
self::$db->exec('ALTER TABLE phoromatic_account_settings ADD COLUMN LimitNetworkCommunication INTEGER DEFAULT 0');
|
||||
self::$db->exec('PRAGMA user_version = 35');
|
||||
case 35:
|
||||
// Change made 15 April 2016
|
||||
self::$db->exec('ALTER TABLE phoromatic_systems ADD COLUMN CurrentProcessTicket INTEGER DEFAULT 0');
|
||||
self::$db->exec('PRAGMA user_version = 36');
|
||||
}
|
||||
chmod($db_file, 0600);
|
||||
define('PHOROMATIC_DB_INIT', true);
|
||||
if(!defined('PHOROMATIC_DB_INIT'))
|
||||
{
|
||||
define('PHOROMATIC_DB_INIT', true);
|
||||
}
|
||||
}
|
||||
public static function generate_result_export_dump($account_id)
|
||||
{
|
||||
ini_set('memory_limit', '4G');
|
||||
pts_file_io::mkdir(self::phoromatic_path() . 'result-export/');
|
||||
$export_path = self::phoromatic_path() . 'result-export/' . $account_id . '/';
|
||||
pts_file_io::mkdir($export_path);
|
||||
@@ -322,10 +334,13 @@ class phoromatic_server
|
||||
$result = $stmt->execute();
|
||||
|
||||
$exported_result_index = array('phoromatic' => array());
|
||||
$error_index = array('phoromatic' => array());
|
||||
while($result && $row = $result->fetchArray())
|
||||
{
|
||||
$id = str_replace(' ', '-', strtolower($row['Title']));
|
||||
$triggers = array();
|
||||
$first_time = time();
|
||||
$latest_time = 0;
|
||||
$stmt2 = phoromatic_server::$db->prepare('SELECT * FROM phoromatic_results WHERE AccountID = :account_id AND ScheduleID = :schedule_id ORDER BY UploadTime DESC');
|
||||
$stmt2->bindValue(':account_id', $row['AccountID']);
|
||||
$stmt2->bindValue(':schedule_id', $row['ScheduleID']);
|
||||
@@ -342,6 +357,10 @@ class phoromatic_server
|
||||
copy($composite_xml, $export_path . $id . '/' . $row2['Trigger'] . '/' . phoromatic_server::system_id_to_name($row2['SystemID'], $row2['AccountID']) . '/composite.xml');
|
||||
}
|
||||
pts_arrays::unique_push($triggers, $row2['Trigger']);
|
||||
|
||||
$utime = strtotime($row2['UploadTime']);
|
||||
$first_time = min($first_time, $utime);
|
||||
$latest_time = max($latest_time, $utime);
|
||||
}
|
||||
|
||||
$exported_result_index['phoromatic'][$id] = array(
|
||||
@@ -349,12 +368,36 @@ class phoromatic_server
|
||||
'id' => $id,
|
||||
'description' => $row['Description'],
|
||||
'triggers' => $triggers,
|
||||
'first_result_time' => $first_time,
|
||||
'last_result_time' => $latest_time
|
||||
);
|
||||
|
||||
$stmt2 = phoromatic_server::$db->prepare('SELECT * FROM phoromatic_system_client_errors WHERE AccountID = :account_id AND ScheduleID = :schedule_id ORDER BY UploadTime DESC');
|
||||
$stmt2->bindValue(':account_id', $row['AccountID']);
|
||||
$stmt2->bindValue(':schedule_id', $row['ScheduleID']);
|
||||
$result2 = $stmt2->execute();
|
||||
$error_index['phoromatic'][$id] = array();
|
||||
while($result2 && $row2 = $result2->fetchArray())
|
||||
{
|
||||
// Only show last month of errors for now
|
||||
if(strtotime('-1 month') > strtotime($row2['UploadTime']))
|
||||
continue;
|
||||
|
||||
$error_index['phoromatic'][$id][] = array(
|
||||
'system' => phoromatic_server::system_id_to_name($row2['SystemID'], $row2['AccountID']),
|
||||
'trigger' => $row2['TriggerID'],
|
||||
'test' => $row2['TestIdentifier'],
|
||||
'test_description' => $row2['TestArguments'],
|
||||
'error' => $row2['ErrorMessage'],
|
||||
'error_time' => strtotime($row2['UploadTime']),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
$exported_result_index = json_encode($exported_result_index, JSON_PRETTY_PRINT);
|
||||
file_put_contents($export_path. '/export-index.json', $exported_result_index);
|
||||
|
||||
$error_index = json_encode($error_index, JSON_PRETTY_PRINT);
|
||||
file_put_contents($export_path . '/export-index.json', $exported_result_index);
|
||||
file_put_contents($export_path . '/export-test-errors.json', $error_index);
|
||||
}
|
||||
public static function send_email($to, $subject, $from, $body)
|
||||
{
|
||||
@@ -368,8 +411,7 @@ class phoromatic_server
|
||||
$headers .= "Content-type:text/html;charset=UTF-8\r\n";
|
||||
$headers .= "From: Phoromatic - Phoronix Test Suite <no-reply@phoromatic.com>\r\n";
|
||||
$headers .= "Reply-To: " . $from . " <" . $from . ">\r\n";
|
||||
|
||||
//mail($to, $subject, $msg, $headers);
|
||||
mail($to, $subject, $msg, $headers);
|
||||
}
|
||||
protected static function rebuild_pprid_entries()
|
||||
{
|
||||
@@ -430,6 +472,22 @@ class phoromatic_server
|
||||
|
||||
return $schedule_names[$schedule_id];
|
||||
}
|
||||
public static function ticket_id_to_name($ticket_id, $aid = false)
|
||||
{
|
||||
static $ticket_names;
|
||||
|
||||
if(!isset($ticket_names[$ticket_id]) || empty($ticket_names[$ticket_id]))
|
||||
{
|
||||
$stmt = phoromatic_server::$db->prepare('SELECT Title FROM phoromatic_benchmark_tickets WHERE AccountID = :account_id AND TicketID = :ticket_id');
|
||||
$stmt->bindValue(':account_id', ($aid ? $aid : $_SESSION['AccountID']));
|
||||
$stmt->bindValue(':ticket_id', $ticket_id);
|
||||
$result = $stmt->execute();
|
||||
$row = $result ? $result->fetchArray() : false;
|
||||
$ticket_names[$ticket_id] = isset($row['Title']) ? $row['Title'] : false;
|
||||
}
|
||||
|
||||
return $ticket_names[$ticket_id];
|
||||
}
|
||||
public static function account_id_to_group_admin_email($account_id)
|
||||
{
|
||||
$stmt = phoromatic_server::$db->prepare('SELECT Email FROM phoromatic_users WHERE AccountID = :account_id AND AdminLevel = 1 ORDER BY CreatedOn ASC LIMIT 1');
|
||||
@@ -752,6 +810,12 @@ class phoromatic_server
|
||||
|
||||
if(!phoromatic_server::check_for_benchmark_ticket_result_match($row['TicketID'], $account_id, $system_id, $row['TicketIssueTime']))
|
||||
{
|
||||
if(strpos($row['EnvironmentVariables'], 'PTS_CONCURRENT_TEST_RUNS') !== false && is_file(phoromatic_server::phoromatic_account_stress_log_path($account_id, $row['TicketID']) . $system_id . '.log') && filemtime(phoromatic_server::phoromatic_account_stress_log_path($account_id, $row['TicketID']) . $system_id . '.log') > $row['TicketIssueTime'])
|
||||
{
|
||||
// Stress log uploaded
|
||||
continue;
|
||||
}
|
||||
|
||||
return $row;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +56,8 @@ class pts_ResultFileTable extends pts_Table
|
||||
$longest_row_title_length = $len;
|
||||
}
|
||||
}
|
||||
$this->column_heading_vertical = false;
|
||||
//$this->longest_column_identifier = max(pts_strings::find_longest_string($this->columns), pts_strings::find_longest_string($result_file->get_system_identifiers()));
|
||||
}
|
||||
public static function result_file_to_result_table(&$result_file, &$system_id_keys = null, &$result_object_index = -1, &$flag_delta_results = false, $extra_attributes = null)
|
||||
{
|
||||
@@ -109,7 +111,7 @@ class pts_ResultFileTable extends pts_Table
|
||||
}
|
||||
else
|
||||
{
|
||||
$result_tests[$result_counter] = new pts_graph_ir_value($result_object->test_profile->get_title());
|
||||
$result_tests[$result_counter] = new pts_graph_ir_value($result_object->test_profile->get_identifier_base_name() . ': ' . $result_object->get_arguments_description());
|
||||
$result_tests[$result_counter]->set_attribute('title', $result_object->get_arguments_description());
|
||||
|
||||
if($result_object->test_profile->get_identifier() != null)
|
||||
|
||||
@@ -124,7 +124,7 @@ class pts_Table extends pts_graph_core
|
||||
if($this->column_heading_vertical)
|
||||
{
|
||||
$top_identifier_height = round($this->text_string_width($this->longest_column_identifier, $this->i['identifier_size']) * 1.1) + 12;
|
||||
$table_identifier_width = $this->text_string_height($this->longest_column_identifier, $this->i['identifier_size']);
|
||||
$table_identifier_width = $this->text_string_width($this->longest_column_identifier, $this->i['identifier_size']);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -106,7 +106,7 @@ class pts_graph_box_plot extends pts_graph_horizontal_bars
|
||||
$box_color = $paint_color;
|
||||
}
|
||||
|
||||
$box_color = in_array($buffer_item->get_result_identifier(), $this->value_highlights) ? self::$c['color']['highlight'] : $box_color;
|
||||
$box_color = in_array($buffer_item->get_result_identifier(), $this->value_highlights) ? $this->darken_color($box_color) : $box_color;
|
||||
|
||||
$this->svg_dom->draw_svg_line($value_end_left, $middle_of_bar, $value_end_right, $middle_of_bar, $box_color, 2, array('xlink:title' => $title_tooltip));
|
||||
$this->svg_dom->draw_svg_line($value_end_left, $px_bound_top, $value_end_left, $px_bound_bottom, self::$c['color']['notches'], 2, array('xlink:title' => $title_tooltip));
|
||||
|
||||
@@ -234,7 +234,7 @@ abstract class pts_graph_core
|
||||
$config['color']['body_light'] = '#949494';
|
||||
$config['color']['highlight'] = '#005a00';
|
||||
$config['color']['alert'] = '#C80000';
|
||||
$config['color']['paint'] = array('#2196f3', '#f44336', '#e91e63', '#673ab7', '#01579b', '#009688', '#4caf50', '#ffeb3b', '#ff5722', '#795548', '#9e9e9e', '#607d8b', '#FFB300', '#803E75', '#FF6800', '#A6BDD7', '#C10020', '#CEA262', '#817066', '#007D34', '#F6768E', '#00538A', '#FF7A5C', '#53377A', '#FF8E00', '#B32851', '#F4C800', '#7F180D', '#93AA00', '#593315', '#F13A13', '#232C16');
|
||||
$config['color']['paint'] = array('#2196f3', '#f44336', '#673ab7', '#01579b', '#009688', '#4caf50', '#ffeb3b', '#ff5722', '#e91e63', '#795548', '#9e9e9e', '#607d8b', '#FFB300', '#803E75', '#FF6800', '#A6BDD7', '#C10020', '#CEA262', '#817066', '#007D34', '#F6768E', '#00538A', '#FF7A5C', '#53377A', '#FF8E00', '#B32851', '#F4C800', '#7F180D', '#93AA00', '#593315', '#F13A13', '#232C16');
|
||||
|
||||
// Text
|
||||
$config['size']['tick_mark'] = 10;
|
||||
@@ -385,7 +385,7 @@ abstract class pts_graph_core
|
||||
{
|
||||
// See if the result identifier matches something to be color-coded better
|
||||
$identifier = strtolower($identifier) . ' ';
|
||||
if(strpos($identifier, 'geforce') !== false || strpos($identifier, 'nvidia') || strpos($identifier, 'quadro') !== false)
|
||||
if(strpos($identifier, 'geforce') !== false || strpos($identifier, 'nvidia') !== false || strpos($identifier, 'quadro') !== false)
|
||||
{
|
||||
$paint_color = '#77b900';
|
||||
}
|
||||
@@ -401,18 +401,38 @@ abstract class pts_graph_core
|
||||
{
|
||||
$paint_color = '#850000';
|
||||
}
|
||||
else if(strpos($identifier, 'windows ') !== false)
|
||||
{
|
||||
$paint_color = '#0078d7';
|
||||
}
|
||||
else
|
||||
{
|
||||
$paint_color = $fallback_color;
|
||||
}
|
||||
|
||||
if($paint_color != $fallback_color && strpos($identifier, ' - '))
|
||||
{
|
||||
// If there is " - " in string, darken the color... based upon idea when doing AMDGPU vs. Mesa vs. stock NVIDIA comparison for RX 480
|
||||
$paint_color = $this->darken_color($paint_color);
|
||||
}
|
||||
|
||||
return $paint_color;
|
||||
}
|
||||
|
||||
//
|
||||
// Render Functions
|
||||
//
|
||||
|
||||
public function darken_color(&$paint_color)
|
||||
{
|
||||
$new_color = null;
|
||||
foreach(str_split(str_replace('#', null, $paint_color), 2) as $color)
|
||||
{
|
||||
$dec = hexdec($color);
|
||||
$dec = min(max(0, $dec * 0.7), 255);
|
||||
$new_color .= str_pad(dechex($dec), 2, 0, STR_PAD_LEFT);
|
||||
}
|
||||
return '#' . substr($new_color, 0, 6);
|
||||
}
|
||||
public function renderGraph()
|
||||
{
|
||||
$this->render_graph_start();
|
||||
|
||||
@@ -142,7 +142,7 @@ class pts_graph_horizontal_bars extends pts_graph_core
|
||||
}
|
||||
}
|
||||
|
||||
$this->svg_dom->add_element('rect', array('x' => $bar_x, 'y' => $px_bound_top + 0.5, 'height' => $bar_height, 'width' => $graph_size, 'fill' => (in_array($buffer_item->get_result_identifier(), $this->value_highlights) ? self::$c['color']['highlight'] : $paint_color), 'xlink:title' => $title_tooltip), $g_bars);
|
||||
$this->svg_dom->add_element('rect', array('x' => $bar_x, 'y' => $px_bound_top + 0.5, 'height' => $bar_height, 'width' => $graph_size, 'fill' => (in_array($buffer_item->get_result_identifier(), $this->value_highlights) ? $this->darken_color($paint_color) : $paint_color), 'xlink:title' => $title_tooltip), $g_bars);
|
||||
|
||||
if($std_error != -1 && $value != null)
|
||||
{
|
||||
@@ -170,6 +170,30 @@ class pts_graph_horizontal_bars extends pts_graph_core
|
||||
$note_size = self::$c['size']['key'] - 2;
|
||||
$this->svg_dom->add_text_element($this->d['identifier_notes'][$buffer_item->get_result_identifier()], array('x' => ($this->i['left_start'] + 4), 'y' => ($px_bound_top + self::$c['size']['key']), 'font-size' => $note_size, 'fill' => self::$c['color']['body_text'], 'text-anchor' => 'start'));
|
||||
}
|
||||
else
|
||||
{
|
||||
// XXX this code can potentially replace the above identifier_notes stuff
|
||||
$data = $buffer_item->get_result_json();
|
||||
$note = null;
|
||||
if(isset($data['min-result']) && is_numeric($data['min-result']))
|
||||
{
|
||||
if(isset($data['max-result']) && is_numeric($data['max-result']))
|
||||
{
|
||||
$note = 'MIN: ' . $data['min-result'] . ' / MAX: ' . $data['max-result'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$note = 'MIN: ' . $data['min-result'];
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($note))
|
||||
{
|
||||
$note_size = self::$c['size']['key'] - 2;
|
||||
$this->svg_dom->add_text_element($note, array('x' => ($this->i['left_start'] + 4), 'y' => ($px_bound_top + self::$c['size']['key']), 'font-size' => $note_size, 'fill' => self::$c['color']['body_text'], 'text-anchor' => 'start'));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$this->svg_dom->add_text_element($value, array('x' => ($value_end_right - 5), 'y' => $middle_of_bar, 'text-anchor' => 'end'), $g_values);
|
||||
}
|
||||
|
||||
@@ -364,7 +364,7 @@ class pts_graph_lines extends pts_graph_core
|
||||
}
|
||||
|
||||
$plotted_error_bar = false;
|
||||
if($x_y_pair[3] > 0)
|
||||
if($x_y_pair[3] > 0 && $this->i['graph_max_value'] != 0)
|
||||
{
|
||||
$std_error_width = 4;
|
||||
$std_error_rel_size = round(($x_y_pair[3] / $this->i['graph_max_value']) * ($this->i['graph_top_end'] - $this->i['top_start']));
|
||||
|
||||
@@ -41,8 +41,8 @@ class pts_graph_passfail extends pts_graph_core
|
||||
$graph_height = $this->i['graph_top_end'] - $this->i['top_start'] - ($vertical_border * 2) - $heading_height;
|
||||
$line_height = floor($graph_height / $identifier_count);
|
||||
|
||||
$pass_color = $this->get_paint_color('PASS');
|
||||
$fail_color = $this->get_paint_color('FAIL');
|
||||
$pass_color = $this->get_paint_color('PASS');
|
||||
|
||||
$main_width = floor($graph_width * .24);
|
||||
$main_font_size = self::$c['size']['bars'];
|
||||
|
||||
@@ -51,7 +51,7 @@ class pts_network
|
||||
|
||||
return $contents;
|
||||
}
|
||||
public static function http_upload_via_post($url, $to_post_data)
|
||||
public static function http_upload_via_post($url, $to_post_data, $supports_proxy = true)
|
||||
{
|
||||
if(!pts_network::network_support_available())
|
||||
{
|
||||
@@ -60,7 +60,14 @@ class pts_network
|
||||
|
||||
$upload_data = http_build_query($to_post_data);
|
||||
$http_parameters = array('http' => array('method' => 'POST', 'content' => $upload_data));
|
||||
$stream_context = pts_network::stream_context_create($http_parameters);
|
||||
if($supports_proxy)
|
||||
{
|
||||
$stream_context = pts_network::stream_context_create($http_parameters);
|
||||
}
|
||||
else
|
||||
{
|
||||
$stream_context = pts_network::stream_context_create($http_parameters, false, -1, -1);
|
||||
}
|
||||
$opened_url = fopen($url, 'rb', false, $stream_context);
|
||||
$response = $opened_url ? stream_get_contents($opened_url) : false;
|
||||
// var_dump($url); var_dump($to_post_data);
|
||||
@@ -206,7 +213,7 @@ class pts_network
|
||||
$proxy_port = self::$network_proxy['port'];
|
||||
}
|
||||
|
||||
if($proxy_address != false && $proxy_port != false && is_numeric($proxy_port))
|
||||
if($proxy_address != false && $proxy_port != false && is_numeric($proxy_port) && $proxy_port > 1)
|
||||
{
|
||||
$parameters['http']['proxy'] = 'tcp://' . $proxy_address . ':' . $proxy_port;
|
||||
$parameters['http']['request_fulluri'] = true;
|
||||
|
||||
@@ -367,6 +367,12 @@ class pts_openbenchmarking
|
||||
{
|
||||
$repos[] = pts_openbenchmarking_client::user_name();
|
||||
}
|
||||
$on_system_indexes = glob(PTS_OPENBENCHMARKING_SCRATCH_PATH . '*.index');
|
||||
foreach($on_system_indexes as $index)
|
||||
{
|
||||
$index = basename($index, '.index');
|
||||
pts_arrays::unique_push($repos, $index);
|
||||
}
|
||||
|
||||
return $repos;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ class pts_render
|
||||
$graph->renderGraph();
|
||||
return $graph->svg_dom->output($save_as);
|
||||
}
|
||||
public static function render_graph_inline_embed(&$object, &$result_file = null, $extra_attributes = null, $nested = true)
|
||||
public static function render_graph_inline_embed(&$object, &$result_file = null, $extra_attributes = null, $nested = true, $output_format = 'SVG')
|
||||
{
|
||||
if($object instanceof pts_test_result)
|
||||
{
|
||||
@@ -54,7 +54,6 @@ class pts_render
|
||||
}
|
||||
|
||||
$graph->renderGraph();
|
||||
$output_format = 'SVG';
|
||||
$graph = $graph->svg_dom->output(null, $output_format);
|
||||
|
||||
switch($output_format)
|
||||
@@ -70,6 +69,8 @@ class pts_render
|
||||
header('Content-Type: image/' . strtolower($output_format));
|
||||
}
|
||||
break;
|
||||
case 'HTML':
|
||||
break;
|
||||
default:
|
||||
case 'SVG':
|
||||
if($nested)
|
||||
@@ -155,8 +156,10 @@ class pts_render
|
||||
$result_object->test_result_buffer->auto_shorten_buffer_identifiers($redundant_word_cache[$result_file->get_title()]);
|
||||
}
|
||||
|
||||
$result_identifiers = $result_object->test_result_buffer->get_identifiers();
|
||||
|
||||
// COMPACT PROCESS
|
||||
if(!isset($extra_attributes['compact_to_scalar']) && $result_object->test_profile->get_display_format() == 'LINE_GRAPH' && $result_file->get_system_count() > 7)
|
||||
if(!isset($extra_attributes['compact_to_scalar']) && $result_object->test_profile->get_display_format() == 'LINE_GRAPH' && ($result_file->get_system_count() > 7 || $result_file->is_multi_way_comparison($result_identifiers, $extra_attributes)))
|
||||
{
|
||||
// If there's too many lines being plotted on line graph, likely to look messy, so convert to scalar automatically
|
||||
$extra_attributes['compact_to_scalar'] = true;
|
||||
@@ -164,8 +167,7 @@ class pts_render
|
||||
|
||||
// XXX: removed || $result_file->is_results_tracker() from below and should be added
|
||||
// Removing the command fixes cases like: 1210053-BY-MYRESULTS43
|
||||
$result_identifiers = $result_object->test_result_buffer->get_identifiers();
|
||||
if($result_file->is_multi_way_comparison($result_identifiers, $extra_attributes) || isset($extra_attributes['compact_to_scalar']) || isset($extra_attributes['compact_scatter']))
|
||||
if(isset($extra_attributes['compact_to_scalar']) || isset($extra_attributes['compact_scatter']) || $result_file->is_multi_way_comparison($result_identifiers, $extra_attributes))
|
||||
{
|
||||
if((isset($extra_attributes['compact_to_scalar']) || (false && $result_file->is_multi_way_comparison($result_identifiers, $extra_attributes))) && in_array($result_object->test_profile->get_display_format(), array('LINE_GRAPH', 'FILLED_LINE_GRAPH')))
|
||||
{
|
||||
@@ -327,6 +329,10 @@ class pts_render
|
||||
if(isset($json['disk-scheduler']) && isset($json['disk-mount-options']))
|
||||
{
|
||||
$system_attributes['Disk'][$identifier] = $json['disk-scheduler'] . ' / ' . $json['disk-mount-options'];
|
||||
if(isset($json['disk-details']) && !empty($json['disk-details']))
|
||||
{
|
||||
$system_attributes['Disk'][$identifier] .= ' / ' . $json['disk-details'];
|
||||
}
|
||||
}
|
||||
if(isset($json['cpu-scaling-governor']))
|
||||
{
|
||||
@@ -535,7 +541,7 @@ class pts_render
|
||||
|
||||
foreach($words as $i => $word)
|
||||
{
|
||||
if(isset($common_segments[$i]) && $word != $common_segments[$i] && isset($word[2]) && !ctype_alnum(substr($word, -1)))
|
||||
if(isset($common_segments[$i]) && $word != $common_segments[$i] && isset($word[2]) && (!function_exists('ctype_alnum') || !ctype_alnum(substr($word, -1))))
|
||||
{
|
||||
// IS COMMON WORD
|
||||
}
|
||||
|
||||
@@ -632,6 +632,16 @@ class pts_result_file
|
||||
$result_file->rename_run(null, $merge_select->get_rename_identifier());
|
||||
}
|
||||
|
||||
if($this->get_title() == null && $result_file->get_title() != null)
|
||||
{
|
||||
$this->set_title($result_file->get_title());
|
||||
}
|
||||
|
||||
if($this->get_description() == null && $result_file->get_description() != null)
|
||||
{
|
||||
$this->set_description($result_file->get_description());
|
||||
}
|
||||
|
||||
$this->add_to_result_file($result_file);
|
||||
unset($result_file);
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ class pts_result_file_analyzer
|
||||
pts_result_file_analyzer::compact_result_table_data($data, $identifiers, true);
|
||||
$desc = pts_result_file_analyzer::analyze_system_component_changes($data, $rows, array(
|
||||
array('Memory', 'Graphics', 'Display Driver', 'OpenGL'),
|
||||
array('Graphics', 'Monitor', 'Kernel', 'Display Driver', 'OpenGL'), array('Graphics', 'Monitor', 'Display Driver', 'OpenGL'), array('Graphics', 'Kernel', 'Display Driver', 'OpenGL'), array('Graphics', 'Display Driver', 'OpenGL'), array('Graphics', 'OpenGL'), array('Graphics', 'Kernel'), array('Graphics', 'Display Driver') // All potential graphics comparisons
|
||||
array('Graphics', 'Display Driver', 'OpenGL', 'Vulkan'), array('Graphics', 'Display Driver', 'OpenGL', 'OpenCL', 'Vulkan'), array('Graphics', 'Monitor', 'Kernel', 'Display Driver', 'OpenGL'), array('Graphics', 'Monitor', 'Display Driver', 'OpenGL'), array('Graphics', 'Kernel', 'Display Driver', 'OpenGL'), array('Graphics', 'Display Driver', 'OpenGL'), array('Graphics', 'OpenGL'), array('Graphics', 'Kernel'), array('Graphics', 'Display Driver') // All potential graphics comparisons
|
||||
), $return_all_changed_indexes);
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,14 @@ class pts_result_file_output
|
||||
|
||||
foreach($result_file->get_result_objects() as $result_object)
|
||||
{
|
||||
$csv_output .= '"' . $result_object->test_profile->get_title() . ' - ' . $result_object->get_arguments_description() . '"';
|
||||
if(getenv('PTS_CSV_ALTERNATE_DESCRIPTION') !== false)
|
||||
{
|
||||
$csv_output .= '"' . $result_object->test_profile->get_identifier() . ' - ' . $result_object->get_arguments() . '"';
|
||||
}
|
||||
else
|
||||
{
|
||||
$csv_output .= '"' . $result_object->test_profile->get_identifier() . ' - ' . $result_object->get_arguments() . '"';
|
||||
}
|
||||
|
||||
foreach($columns as $column)
|
||||
{
|
||||
@@ -234,7 +241,7 @@ class pts_result_file_output
|
||||
|
||||
$placement = 1;
|
||||
$i = 0;
|
||||
foreach($result_file->get_result_objects() as $key => &$result_object)
|
||||
foreach($result_file->get_result_objects() as $key => $result_object)
|
||||
{
|
||||
$graph = pts_render::render_graph_process($result_object, $result_file, false, $extra_attributes);
|
||||
if($graph == false)
|
||||
|
||||
@@ -389,7 +389,7 @@ class pts_strings
|
||||
$str = str_ireplace($original_phrase, $new_phrase, $str);
|
||||
}
|
||||
|
||||
$remove_phrases = array('incorporation', 'corporation', 'corp.', 'invalid', 'technologies', 'technology', 'version', ' project ', 'computer', 'To Be Filled By', 'ODM', 'O.E.M.', 'Desktop Reference Platform', 'small form factor', 'convertible', ' group', 'chipset', 'community', 'reference', 'communications', 'semiconductor', 'processor', 'host bridge', 'adapter', ' CPU', 'platform', 'international', 'express', 'graphics', 'none', 'electronics', 'integrated', 'alternate', 'quad-core', 'memory', 'series', 'network', 'motherboard', 'electric ', 'industrial ', 'serverengines', 'Manufacturer', 'x86/mmx/sse2', '/AGP/SSE/3DNOW!', '/AGP/SSE2', 'controller', '(extreme graphics innovation)', 'pci-e_gfx and ht3 k8 part', 'pci-e_gfx and ht1 k8 part', 'Northbridge only', 'dual slot', 'dual-core', 'dual core', 'microsystems', 'not specified', 'single slot', 'genuine', 'unknown device', 'systemberatung', 'gmbh', 'graphics adapter', 'video device', 'http://', 'www.', '.com', '.tw/', '/pci/sse2/3dnow!', '/pcie/sse2', '/pci/sse2', 'balloon', 'network connection', 'ethernet', 'limited.', ' system', 'compliant', 'co. ltd', 'co.', 'ltd.', 'LTD ', ' LTD', '\AE', '(r)', '(tm)', 'inc.', 'inc', '6.00 PG', ',', '\'', '_ ', '_ ', 'corp', 'product name', 'base board', 'mainboard', 'pci to pci', ' release ', 'nee ', 'default string', ' AG ', 'with Radeon HD', '/DRAM');
|
||||
$remove_phrases = array('incorporation', 'corporation', 'corp.', 'invalid', 'technologies', 'technology', 'version', ' project ', 'computer', 'To Be Filled By', 'ODM', 'O.E.M.', 'Desktop Reference Platform', 'small form factor', 'convertible', ' group', 'chipset', 'community', 'reference', 'communications', 'semiconductor', 'processor', 'host bridge', 'adapter', ' CPU', 'platform', 'international', 'express', 'graphics', ' none', 'electronics', 'integrated', 'alternate', 'quad-core', 'memory', 'series', 'network', 'motherboard', 'electric ', 'industrial ', 'serverengines', 'Manufacturer', 'x86/mmx/sse2', '/AGP/SSE/3DNOW!', '/AGP/SSE2', 'controller', '(extreme graphics innovation)', 'pci-e_gfx and ht3 k8 part', 'pci-e_gfx and ht1 k8 part', 'Northbridge only', 'dual slot', 'dual-core', 'dual core', 'microsystems', 'not specified', 'single slot', 'genuine', 'unknown device', 'systemberatung', 'gmbh', 'graphics adapter', 'video device', 'http://', 'www.', '.com', '.tw/', '/pci/sse2/3dnow!', '/pcie/sse2', '/pci/sse2', 'balloon', 'network connection', 'ethernet', 'limited.', ' system', 'compliant', 'co. ltd', 'co.', 'ltd.', 'LTD ', ' LTD', '\AE', '(r)', '(tm)', 'inc.', 'inc', '6.00 PG', ',', '\'', '_ ', '_ ', 'corp', 'product name', 'base board', 'mainboard', 'pci to pci', ' release ', 'nee ', 'default string', ' AG ', 'with Radeon HD', '/DRAM');
|
||||
$str = str_ireplace($remove_phrases, ' ', $str);
|
||||
|
||||
if(($w = stripos($str, 'WARNING')) !== false)
|
||||
|
||||
@@ -55,9 +55,8 @@ class pts_svg_dom
|
||||
// XXX: Alias for output. With PTS 3.8 this is just here for API compatibility with OpenBenchmarking.org.
|
||||
$this->output($save_as, $format);
|
||||
}
|
||||
public function output($save_as = null, &$format = null)
|
||||
public function output($save_as = null, $output_format = 'SVG')
|
||||
{
|
||||
$output_format = 'SVG';
|
||||
if(isset($_SERVER['HTTP_USER_AGENT']) || isset($_REQUEST['force_format']))
|
||||
{
|
||||
static $browser_renderer = null;
|
||||
@@ -89,6 +88,11 @@ class pts_svg_dom
|
||||
$output = pts_svg_dom_gd::svg_dom_to_gd($this->dom, 'PNG');
|
||||
$output_format = 'png';
|
||||
break;
|
||||
case 'HTML':
|
||||
$html = new pts_svg_dom_html($this->dom);
|
||||
$output = $html->get_html();
|
||||
$output_format = 'html';
|
||||
break;
|
||||
case 'SVG':
|
||||
default:
|
||||
$output = $this->save_xml();
|
||||
|
||||
@@ -92,7 +92,11 @@ class pts_svg_dom_gd
|
||||
'/usr/local/lib/X11/fonts/bitstream-vera/Vera.ttf',
|
||||
'/usr/share/fonts/aajohan-comfortaa/Comfortaa-Regular.ttf',
|
||||
'/Library/Fonts/Courier New.ttf',
|
||||
'/Library/Fonts/Trebuchet MS.ttf'
|
||||
'/Library/Fonts/Trebuchet MS.ttf',
|
||||
'/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf',
|
||||
'/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf',
|
||||
'/usr/share/fonts/truetype/freefont/FreeSans.ttf',
|
||||
'/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf',
|
||||
);
|
||||
|
||||
foreach($possible_fonts as $font_file)
|
||||
@@ -340,6 +344,9 @@ class pts_svg_dom_gd
|
||||
}
|
||||
imagecopyresampled($gd, $img, $a['x'], $a['y'], 0, 0, $a['width'], $a['height'], imagesx($img), imagesy($img));
|
||||
break;
|
||||
case 'path':
|
||||
// TODO XXX
|
||||
break;
|
||||
default:
|
||||
if(PTS_IS_CLIENT)
|
||||
{
|
||||
|
||||
206
pts-core/objects/pts_svg_dom_html.php
Normal file
206
pts-core/objects/pts_svg_dom_html.php
Normal file
@@ -0,0 +1,206 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2016, Phoronix Media
|
||||
Copyright (C) 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
class pts_svg_dom_html
|
||||
{
|
||||
protected $html_dom;
|
||||
|
||||
public function __construct($dom)
|
||||
{
|
||||
$new_dom = new DOMImplementation();
|
||||
$dtd = $new_dom->createDocumentType('html', '', '');
|
||||
$this->html_dom = $new_dom->createDocument(null, null, $dtd);
|
||||
$this->html_dom->formatOutput = true;
|
||||
|
||||
$width = $dom->childNodes->item(2)->attributes->getNamedItem('width')->nodeValue;
|
||||
$height = $dom->childNodes->item(2)->attributes->getNamedItem('height')->nodeValue;
|
||||
$html = null;
|
||||
|
||||
$main_target = $this->html_dom->createElement('div');
|
||||
$main_target->setAttribute('style', 'position: relative; width: ' . $width . 'px; height: ' . $height . 'px;');
|
||||
|
||||
foreach($dom->childNodes->item(2)->childNodes as $node)
|
||||
{
|
||||
$this->evaluate_node($node, $main_target);
|
||||
// imagejpeg($this->image, $output_file, $quality);
|
||||
//var_dump($node->attributes);
|
||||
}
|
||||
|
||||
$this->html_dom->appendChild($main_target);
|
||||
}
|
||||
public function get_html()
|
||||
{
|
||||
return $this->html_dom->saveHTML();
|
||||
}
|
||||
protected function evaluate_node(&$node, &$target, $preset = null)
|
||||
{
|
||||
switch($node->nodeName)
|
||||
{
|
||||
case 'g':
|
||||
// Special handling for g
|
||||
$g = self::attributes_to_array($node, false, $preset);
|
||||
for($i = 0; $i < $node->childNodes->length; $i++)
|
||||
{
|
||||
$n = $node->childNodes->item($i);
|
||||
$this->evaluate_node($n, $target, $g);
|
||||
}
|
||||
break;
|
||||
case 'a':
|
||||
$node = $node->childNodes->item(0);
|
||||
$this->evaluate_node($node, $target, $preset);
|
||||
break;
|
||||
case 'svg':
|
||||
// Not relevant at this point to rendering
|
||||
break;
|
||||
case 'line':
|
||||
$a = self::attributes_to_array($node, array('x1', 'y1', 'x2', 'y2', 'stroke', 'stroke-width', 'stroke-dasharray'), $preset);
|
||||
$border_style = $a['stroke-dasharray'] != null ? 'dashed' : 'solid';
|
||||
$tag = $this->html_dom->createElement('div');
|
||||
$tag->setAttribute('style', 'border: 1px ' . $border_style . ' ' . $a['stroke'] . '; height: 0; ' . self::compute_html_line_style($a['x1'], $a['y1'], $a['x2'], $a['y2']));
|
||||
$target->appendChild($tag);
|
||||
|
||||
break;
|
||||
case 'polyline':
|
||||
$a = self::attributes_to_array($node, array('points', 'stroke', 'stroke-width', 'fill'), $preset);
|
||||
$a['points'] = explode(' ', $a['points']);
|
||||
for($i = 1; $i < count($a['points']); $i++)
|
||||
{
|
||||
$s_point = explode(',', $a['points'][($i - 1)]);
|
||||
$e_point = explode(',', $a['points'][$i]);
|
||||
$border_style = $a['stroke-dasharray'] != null ? 'dashed' : 'solid';
|
||||
$tag = $this->html_dom->createElement('div');
|
||||
$tag->setAttribute('style', 'border: 1px ' . $border_style . ' ' . $a['stroke'] . '; height: 0; ' . self::compute_html_line_style($s_point[0], $s_point[1], $e_point[0], $e_point[1]));
|
||||
$target->appendChild($tag);
|
||||
}
|
||||
break;
|
||||
case 'text':
|
||||
$a = self::attributes_to_array($node, array('x', 'y', 'font-size', 'text-anchor', 'fill', 'dominant-baseline', 'transform'), $preset);
|
||||
$text = $node->nodeValue;
|
||||
|
||||
$extra = null;
|
||||
if($a['transform'])
|
||||
{
|
||||
$extra .= 'transform: ' . $a['transform'] . '; ';
|
||||
}
|
||||
else
|
||||
{
|
||||
$extra .= 'text-anchor: ' . $a['text-anchor'] . '; ';
|
||||
$extra .= 'dominant-baseline: ' . $a['dominant-baseline'] . '; ';
|
||||
}
|
||||
|
||||
$tag = $this->html_dom->createElement('div');
|
||||
$tag->setAttribute('style', 'position: absolute; left: ' . $a['x'] . 'px ; top: ' . $a['y'] . 'px; color: ' . $a['fill'] . '; font-size: ' . $a['font-size'] . 'px; ');
|
||||
$text_node = $this->html_dom->createTextNode($text);
|
||||
$tag->appendChild($text_node);
|
||||
$target->appendChild($tag);
|
||||
break;
|
||||
case 'polygon':
|
||||
$a = self::attributes_to_array($node, array('points', 'fill', 'stroke', 'stroke-width'), $preset);
|
||||
// no support in this short of SVG or HTML5 canvas
|
||||
break;
|
||||
case 'rect':
|
||||
// Draw a rectangle
|
||||
$a = self::attributes_to_array($node, array('x', 'y', 'width', 'height', 'fill', 'stroke', 'stroke-width'), $preset);
|
||||
$background = $a['fill'] != 'none' ? $a['fill'] : 'transparent';
|
||||
$border = $a['stroke'] != null ? 'border: ' . $a['stroke-width'] . 'px solid ' . $a['stroke'] . '; ' : '';
|
||||
$tag = $this->html_dom->createElement('div');
|
||||
$tag->setAttribute('style', 'position: absolute; left: ' . $a['x'] . 'px; top: ' . $a['y'] . 'px; width: ' . $a['width'] . 'px; height: ' . $a['height'] . 'px; background: ' . $background . '; ' . $border);
|
||||
$target->appendChild($tag);
|
||||
break;
|
||||
case 'circle':
|
||||
// Draw a circle
|
||||
$a = self::attributes_to_array($node, array('cx', 'cy', 'r', 'fill'), $preset);
|
||||
// no support in this short of SVG or HTML5 canvas
|
||||
break;
|
||||
case 'ellipse':
|
||||
// Draw a ellipse/circle
|
||||
$a = self::attributes_to_array($node, array('cx', 'cy', 'rx', 'ry', 'fill', 'stroke', 'stroke-width'), $preset);
|
||||
// no support in this short of SVG or HTML5 canvas
|
||||
break;
|
||||
case 'image':
|
||||
$a = self::attributes_to_array($node, array('xlink:href', 'x', 'y', 'width', 'height'), $preset);
|
||||
// TODO
|
||||
/*
|
||||
if(substr($a['xlink:href'], 0, 22) == 'data:image/png;base64,')
|
||||
{
|
||||
$img = imagecreatefromstring(base64_decode(substr($a['xlink:href'], 22)));
|
||||
}
|
||||
else
|
||||
{
|
||||
$img = imagecreatefromstring(file_get_contents($a['xlink:href']));
|
||||
}
|
||||
imagecopyresampled(, $img, $a['x'], $a['y'], 0, 0, $a['width'], $a['height'], imagesx($img), imagesy($img));
|
||||
*/
|
||||
break;
|
||||
case 'path':
|
||||
break;
|
||||
default:
|
||||
if(PTS_IS_CLIENT)
|
||||
{
|
||||
echo $node->nodeName . ' not implemented.' . PHP_EOL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
protected static function compute_html_line_style($x1, $y1, $x2, $y2)
|
||||
{
|
||||
$a = $x1 - $x2;
|
||||
$b = $y1 - $y2;
|
||||
$c = sqrt($a * $a + $b * $b);
|
||||
|
||||
$sx = ($x1 + $x2) / 2;
|
||||
$y = ($y1 + $y2) / 2;
|
||||
|
||||
$x = $sx - $c / 2;
|
||||
$alpha = pi() - atan2(($b * -1), $a);
|
||||
|
||||
return 'width: ' . $c . '; -moz-transform: rotate(' . $alpha . 'rad); -webkit-transform: rotate(' . $alpha . 'rad); transform: rotate(' . $alpha . 'rad); position: absolute; top: ' . $y . '; left: ' . $x . '; ';
|
||||
}
|
||||
protected static function attributes_to_array(&$node, $attrs = false, $values = null)
|
||||
{
|
||||
if(!is_array($values))
|
||||
{
|
||||
$values = array();
|
||||
}
|
||||
|
||||
foreach($node->attributes as $attribute)
|
||||
{
|
||||
$values[$attribute->nodeName] = $attribute->nodeValue;
|
||||
}
|
||||
|
||||
if($attrs != false)
|
||||
{
|
||||
foreach($attrs as $attribute)
|
||||
{
|
||||
if(!isset($values[$attribute]))
|
||||
{
|
||||
$values[$attribute] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $values;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -53,9 +53,23 @@ class pts_test_profile extends pts_test_profile_parser
|
||||
{
|
||||
return PTS_TEST_PROFILE_PATH . $this->identifier . '/';
|
||||
}
|
||||
public function get_override_values()
|
||||
public function get_override_values($as_string = false)
|
||||
{
|
||||
return $this->overrides;
|
||||
if($as_string)
|
||||
{
|
||||
$o = $this->overrides;
|
||||
foreach($o as $x => &$y)
|
||||
{
|
||||
$y = $x . '=' . $y;
|
||||
}
|
||||
|
||||
return implode(';', $o);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->overrides;
|
||||
}
|
||||
}
|
||||
public function set_override_values($override_values)
|
||||
{
|
||||
|
||||
@@ -233,11 +233,24 @@ class pts_test_result
|
||||
}
|
||||
if($divide_value == -1)
|
||||
{
|
||||
foreach($keys as $k)
|
||||
if($is_multi_way) // find the largest value to use as divide value
|
||||
{
|
||||
if($this->test_result_buffer->buffer_items[$k]->get_result_value() < $divide_value || $divide_value == -1)
|
||||
foreach($keys as $k)
|
||||
{
|
||||
$divide_value = $this->test_result_buffer->buffer_items[$k]->get_result_value();
|
||||
if($this->test_result_buffer->buffer_items[$k]->get_result_value() > $divide_value)
|
||||
{
|
||||
$divide_value = $this->test_result_buffer->buffer_items[$k]->get_result_value();
|
||||
}
|
||||
}
|
||||
}
|
||||
else // find the lowest value to use as divide value
|
||||
{
|
||||
foreach($keys as $k)
|
||||
{
|
||||
if($this->test_result_buffer->buffer_items[$k]->get_result_value() < $divide_value || $divide_value == -1)
|
||||
{
|
||||
$divide_value = $this->test_result_buffer->buffer_items[$k]->get_result_value();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -368,7 +381,7 @@ class pts_test_result
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public function points_of_possible_interest($threshold_level = 0.1)
|
||||
public function points_of_possible_interest($threshold_level = 0.05, $adaptive = true)
|
||||
{
|
||||
$points_of_interest = array();
|
||||
if($this->test_profile->get_display_format() != 'BAR_GRAPH') // BAR_ANALYZE_GRAPH is currently unsupported
|
||||
@@ -419,6 +432,15 @@ class pts_test_result
|
||||
}
|
||||
}
|
||||
|
||||
if($adaptive && count($points_of_interest) > (count($key_sets) * (count($keys)) * 0.15))
|
||||
{
|
||||
// If too many results are being flagged, increase the threshold and run again
|
||||
if($threshold_level < 0.5)
|
||||
{
|
||||
return $this->points_of_possible_interest($threshold_level * 2, true);
|
||||
}
|
||||
}
|
||||
|
||||
return $points_of_interest;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -788,43 +788,62 @@ class pts_test_result_parser
|
||||
}
|
||||
pts_client::test_profile_debug_message('Result Line: ' . $result_line);
|
||||
|
||||
$result_r = explode(' ', pts_strings::trim_spaces(str_replace($space_out_chars, ' ', str_replace('=', ' = ', $result_line))));
|
||||
$result_r_pos = array_search($result_key[$i], $result_r);
|
||||
// FALLBACK HELPERS FOR BELOW
|
||||
$did_try_colon_fallback = false;
|
||||
|
||||
if(!empty($result_before_string[$i]))
|
||||
do
|
||||
{
|
||||
// Using ResultBeforeString tag
|
||||
$result_before_this = array_search($result_before_string[$i], $result_r);
|
||||
$try_again = false;
|
||||
$result_r = explode(' ', pts_strings::trim_spaces(str_replace($space_out_chars, ' ', str_replace('=', ' = ', $result_line))));
|
||||
$result_r_pos = array_search($result_key[$i], $result_r);
|
||||
|
||||
if($result_before_this !== false)
|
||||
if(!empty($result_before_string[$i]))
|
||||
{
|
||||
$test_results[] = $result_r[($result_before_this - 1)];
|
||||
}
|
||||
}
|
||||
else if(!empty($result_after_string[$i]))
|
||||
{
|
||||
// Using ResultBeforeString tag
|
||||
$result_after_this = array_search($result_after_string[$i], $result_r);
|
||||
// Using ResultBeforeString tag
|
||||
$result_before_this = array_search($result_before_string[$i], $result_r);
|
||||
|
||||
if($result_after_this !== false)
|
||||
{
|
||||
$result_after_this++;
|
||||
for($f = $result_after_this; $f < count($result_r); $f++)
|
||||
if($result_before_this !== false)
|
||||
{
|
||||
if(in_array($result_r[$f], array(':', ',', '-', '=')))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$test_results[] = $result_r[($result_before_this - 1)];
|
||||
}
|
||||
}
|
||||
else if(!empty($result_after_string[$i]))
|
||||
{
|
||||
// Using ResultBeforeString tag
|
||||
$result_after_this = array_search($result_after_string[$i], $result_r);
|
||||
|
||||
$test_results[] = $result_r[$f];
|
||||
break;
|
||||
if($result_after_this !== false)
|
||||
{
|
||||
$result_after_this++;
|
||||
for($f = $result_after_this; $f < count($result_r); $f++)
|
||||
{
|
||||
if(in_array($result_r[$f], array(':', ',', '-', '=')))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$test_results[] = $result_r[$f];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(isset($result_r[$result_template_r_pos]))
|
||||
{
|
||||
$test_results[] = $result_r[$result_template_r_pos];
|
||||
}
|
||||
else
|
||||
{
|
||||
// POSSIBLE FALLBACKS TO TRY AGAIN
|
||||
|
||||
if(!$did_try_colon_fallback && strpos($result_line, ':') !== false)
|
||||
{
|
||||
$result_line = str_replace(':', ': ', $result_line);
|
||||
$did_try_colon_fallback = true;
|
||||
$try_again = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(isset($result_r[$result_template_r_pos]))
|
||||
{
|
||||
$test_results[] = $result_r[$result_template_r_pos];
|
||||
}
|
||||
while($try_again);
|
||||
}
|
||||
while($is_multi_match && count($test_results) != $result_count && !empty($result_output));
|
||||
}
|
||||
@@ -842,6 +861,16 @@ class pts_test_result_parser
|
||||
|
||||
// Expand validity checking here
|
||||
if($is_numeric_check == true && is_numeric($test_result) == false)
|
||||
{
|
||||
// E.g. if output time as 06:12.32 (as in blender)
|
||||
if(substr_count($test_result, ':') == 1 && substr_count($test_result, '.') == 1 && strpos($test_result, '.') > strpos($test_result, ':'))
|
||||
{
|
||||
$minutes = substr($test_result, 0, strpos($test_result, ':'));
|
||||
$seconds = ' ' . substr($test_result, strpos($test_result, ':') + 1);
|
||||
$test_result = ($minutes * 60) + $seconds;
|
||||
}
|
||||
}
|
||||
if($is_numeric_check == true && is_numeric($test_result) == false)
|
||||
{
|
||||
unset($test_results[$x]);
|
||||
continue;
|
||||
|
||||
@@ -20,11 +20,205 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class pts_test_suite extends pts_test_suite_parser
|
||||
class pts_test_suite
|
||||
{
|
||||
public function __construct($identifier)
|
||||
protected $identifier;
|
||||
private $title;
|
||||
private $description;
|
||||
private $version;
|
||||
private $maintainer;
|
||||
private $test_type;
|
||||
private $run_mode;
|
||||
private $requires_minimum_core_version;
|
||||
private $requires_maximum_core_version;
|
||||
private $pre_run_message;
|
||||
private $post_run_message;
|
||||
protected $test_objects;
|
||||
protected $test_names;
|
||||
protected $raw_xml;
|
||||
static $temp_suite;
|
||||
protected $xml_file_location = false;
|
||||
|
||||
public function __construct($identifier = null)
|
||||
{
|
||||
parent::__construct($identifier);
|
||||
$this->test_objects = array();
|
||||
$this->test_names = array();
|
||||
if($identifier == null)
|
||||
return;
|
||||
|
||||
if(PTS_IS_CLIENT)
|
||||
{
|
||||
$ob_identifier = pts_openbenchmarking::evaluate_string_to_qualifier($identifier, true, 'suite');
|
||||
|
||||
if($ob_identifier != false)
|
||||
{
|
||||
$identifier = $ob_identifier;
|
||||
}
|
||||
}
|
||||
$this->identifier = $identifier;
|
||||
|
||||
if(!isset($xml_file[512]) && defined('PTS_TEST_SUITE_PATH') && is_file(PTS_TEST_SUITE_PATH . $identifier . '/suite-definition.xml'))
|
||||
{
|
||||
$read = PTS_TEST_SUITE_PATH . $identifier . '/suite-definition.xml';
|
||||
}
|
||||
else if(substr($identifier, -4) == '.zip' && is_file($identifier))
|
||||
{
|
||||
$zip = new ZipArchive();
|
||||
|
||||
if($zip->open($identifier) === true)
|
||||
{
|
||||
$read = $zip->getFromName('suite-definition.xml');
|
||||
$zip->close();
|
||||
}
|
||||
}
|
||||
else if(isset(self::$temp_suite[$identifier]))
|
||||
{
|
||||
$read = self::$temp_suite[$identifier];
|
||||
}
|
||||
else
|
||||
{
|
||||
$read = $identifier;
|
||||
}
|
||||
|
||||
$xml_options = LIBXML_COMPACT | LIBXML_PARSEHUGE;
|
||||
$this->raw_xml = $read;
|
||||
if(is_file($read))
|
||||
{
|
||||
$this->xml_file_location = $read;
|
||||
$xml = simplexml_load_file($this->xml_file_location, 'SimpleXMLElement', $xml_options);
|
||||
}
|
||||
else
|
||||
{
|
||||
$xml = $read;
|
||||
if(strpos($read, '<') !== false)
|
||||
{
|
||||
$xml = simplexml_load_string($read, 'SimpleXMLElement', $xml_options);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($xml->SuiteInformation))
|
||||
{
|
||||
$this->title = self::clean_input($xml->SuiteInformation->Title);
|
||||
$this->description = self::clean_input($xml->SuiteInformation->Description);
|
||||
$this->maintainer = self::clean_input($xml->SuiteInformation->Maintainer);
|
||||
$this->version = self::clean_input($xml->SuiteInformation->Version);
|
||||
$this->test_type = self::clean_input($xml->SuiteInformation->TestType);
|
||||
$this->run_mode = self::clean_input($xml->SuiteInformation->RunMode);
|
||||
$this->requires_minimum_core_version = self::clean_input($xml->SuiteInformation->RequiresCoreVersionMin);
|
||||
$this->requires_maximum_core_version = self::clean_input($xml->SuiteInformation->RequiresCoreVersionMax);
|
||||
$this->pre_run_message = self::clean_input($xml->SuiteInformation->PreRunMessage);
|
||||
$this->post_run_message = self::clean_input($xml->SuiteInformation->PostRunMessage);
|
||||
}
|
||||
|
||||
if(isset($xml->Execute))
|
||||
{
|
||||
foreach($xml->Execute as $to_execute)
|
||||
{
|
||||
$test_name = self::clean_input($to_execute->Test);
|
||||
$this->test_names[] = $test_name;
|
||||
$obj = pts_types::identifier_to_object($test_name);
|
||||
|
||||
if($obj instanceof pts_test_profile)
|
||||
{
|
||||
// Check for test profile values to override
|
||||
$override_options = array();
|
||||
if(isset($to_execute->OverrideTestOptions) && !empty($to_execute->OverrideTestOptions))
|
||||
{
|
||||
foreach(explode(';', self::clean_input($to_execute->OverrideTestOptions)) as $override_string)
|
||||
{
|
||||
$override_segments = pts_strings::trim_explode('=', $override_string);
|
||||
|
||||
if(count($override_segments) == 2 && !empty($override_segments[0]) && !empty($override_segments[1]))
|
||||
{
|
||||
$override_options[$override_segments[0]] = $override_segments[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch((isset($to_execute->Mode) ? self::clean_input($to_execute->Mode) : null))
|
||||
{
|
||||
case 'BATCH':
|
||||
$option_output = pts_test_run_options::batch_user_options($obj);
|
||||
break;
|
||||
case 'DEFAULTS':
|
||||
$option_output = pts_test_run_options::default_user_options($obj);
|
||||
break;
|
||||
default:
|
||||
$option_output = array(array((isset($to_execute->Arguments) ? self::clean_input($to_execute->Arguments) : null)), array((isset($to_execute->Description) ? self::clean_input($to_execute->Description) : null)));
|
||||
break;
|
||||
}
|
||||
|
||||
foreach(array_keys($option_output[0]) as $x)
|
||||
{
|
||||
if($override_options != null)
|
||||
{
|
||||
$obj->set_override_values($override_options);
|
||||
}
|
||||
|
||||
$this->add_to_suite($obj, $option_output[0][$x], $option_output[1][$x]);
|
||||
}
|
||||
}
|
||||
else if($obj instanceof pts_test_suite)
|
||||
{
|
||||
$this->add_suite_tests_to_suite($obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public function add_suite_tests_to_suite($suite)
|
||||
{
|
||||
foreach($suite->get_contained_test_result_objects() as $test_result)
|
||||
{
|
||||
$this->test_objects[] = $test_result;
|
||||
}
|
||||
}
|
||||
public function add_to_suite($test, $arguments = null, $arguments_description = null)
|
||||
{
|
||||
if(!($test instanceof pts_test_profile))
|
||||
{
|
||||
$test = new pts_test_profile($test);
|
||||
}
|
||||
|
||||
$test_result = new pts_test_result($test);
|
||||
$test_result->set_used_arguments($arguments);
|
||||
$test_result->set_used_arguments_description($arguments_description);
|
||||
$this->test_objects[] = $test_result;
|
||||
}
|
||||
public static function set_temporary_suite($name, $suite_xml)
|
||||
{
|
||||
self::$temp_suite[$name] = $suite_xml;
|
||||
}
|
||||
public static function is_temporary_suite($name)
|
||||
{
|
||||
return isset(self::$temp_suite[$name]);
|
||||
}
|
||||
public function get_file_location()
|
||||
{
|
||||
return $this->xml_file_location;
|
||||
}
|
||||
public function validate()
|
||||
{
|
||||
$dom = new DOMDocument();
|
||||
if(is_file($this->raw_xml))
|
||||
{
|
||||
$dom->load($this->raw_xml);
|
||||
}
|
||||
else
|
||||
{
|
||||
$dom->loadXML($this->raw_xml);
|
||||
}
|
||||
return $dom->schemaValidate(PTS_OPENBENCHMARKING_PATH . 'schemas/test-suite.xsd');
|
||||
}
|
||||
protected static function clean_input($value)
|
||||
{
|
||||
if(is_array($value))
|
||||
{
|
||||
return array_map(array($this, 'clean_input'), $value);
|
||||
}
|
||||
else
|
||||
{
|
||||
return strip_tags($value);
|
||||
}
|
||||
}
|
||||
public static function is_suite($identifier)
|
||||
{
|
||||
@@ -45,11 +239,11 @@ class pts_test_suite extends pts_test_suite_parser
|
||||
}
|
||||
public function is_supported($report_warnings = false)
|
||||
{
|
||||
$supported_size = $original_size = count($this->get_contained_test_profiles());
|
||||
$supported_size = $original_size = count($this->test_objects);
|
||||
|
||||
foreach(pts_types::identifiers_to_test_profile_objects($this->identifier, false, true) as $test_profile)
|
||||
foreach($this->test_objects as &$obj)
|
||||
{
|
||||
if($test_profile->is_supported($report_warnings) == false)
|
||||
if($obj->test_profile->is_supported($report_warnings) == false)
|
||||
{
|
||||
$supported_size--;
|
||||
}
|
||||
@@ -72,146 +266,225 @@ class pts_test_suite extends pts_test_suite_parser
|
||||
}
|
||||
public function get_unique_test_count()
|
||||
{
|
||||
return count(pts_types::identifiers_to_test_profile_objects($this->identifier, false, true));
|
||||
$unique_tests = array();
|
||||
foreach($this->test_objects as &$obj)
|
||||
{
|
||||
pts_arrays::unique_push($unique_tests, $obj->test_profile->get_identifier());
|
||||
}
|
||||
return count($unique_tests);
|
||||
}
|
||||
public function get_contained_test_result_objects()
|
||||
{
|
||||
$test_result_objects = array();
|
||||
$test_names = $this->xml_parser->getXMLArrayValues('PhoronixTestSuite/Execute/Test');
|
||||
$sub_modes = $this->xml_parser->getXMLArrayValues('PhoronixTestSuite/Execute/Mode');
|
||||
$sub_arguments = $this->xml_parser->getXMLArrayValues('PhoronixTestSuite/Execute/Arguments');
|
||||
$sub_arguments_description = $this->xml_parser->getXMLArrayValues('PhoronixTestSuite/Execute/Description');
|
||||
$override_test_options = $this->xml_parser->getXMLArrayValues('PhoronixTestSuite/Execute/OverrideTestOptions');
|
||||
|
||||
for($i = 0; $i < count($test_names); $i++)
|
||||
{
|
||||
$obj = pts_types::identifier_to_object($test_names[$i]);
|
||||
|
||||
if($obj instanceof pts_test_profile)
|
||||
{
|
||||
// Check for test profile values to override
|
||||
$override_options = array();
|
||||
if(!empty($override_test_options[$i]))
|
||||
{
|
||||
foreach(explode(';', $override_test_options[$i]) as $override_string)
|
||||
{
|
||||
$override_segments = pts_strings::trim_explode('=', $override_string);
|
||||
|
||||
if(count($override_segments) == 2 && !empty($override_segments[0]) && !empty($override_segments[1]))
|
||||
{
|
||||
$override_options[$override_segments[0]] = $override_segments[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch($sub_modes[$i])
|
||||
{
|
||||
case 'BATCH':
|
||||
$option_output = pts_test_run_options::batch_user_options($obj);
|
||||
break;
|
||||
case 'DEFAULTS':
|
||||
$option_output = pts_test_run_options::default_user_options($obj);
|
||||
break;
|
||||
default:
|
||||
$option_output = array(array($sub_arguments[$i]), array($sub_arguments_description[$i]));
|
||||
break;
|
||||
}
|
||||
|
||||
foreach(array_keys($option_output[0]) as $x)
|
||||
{
|
||||
if($override_options != null)
|
||||
{
|
||||
$test_profile->set_override_values($override_options);
|
||||
}
|
||||
|
||||
$test_result = new pts_test_result($obj);
|
||||
$test_result->set_used_arguments($option_output[0][$x]);
|
||||
$test_result->set_used_arguments_description($option_output[1][$x]);
|
||||
|
||||
$test_result_objects[] = $test_result;
|
||||
}
|
||||
}
|
||||
else if($obj instanceof pts_test_suite)
|
||||
{
|
||||
foreach($obj->get_contained_test_result_objects() as $test_result)
|
||||
{
|
||||
$test_result_objects[] = $test_result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $test_result_objects;
|
||||
}
|
||||
public function pts_format_contained_tests_string()
|
||||
{
|
||||
$str = null;
|
||||
$this->pts_print_format_tests($this->identifier, $str);
|
||||
|
||||
return $str;
|
||||
return $this->test_objects;
|
||||
}
|
||||
public function is_core_version_supported()
|
||||
{
|
||||
// Check if the test suite's version is compatible with pts-core
|
||||
$core_version_min = parent::requires_core_version_min();
|
||||
$core_version_max = parent::requires_core_version_max();
|
||||
$core_version_min = $this->requires_core_version_min();
|
||||
$core_version_max = $this->requires_core_version_max();
|
||||
|
||||
return $core_version_min <= PTS_CORE_VERSION && $core_version_max > PTS_CORE_VERSION;
|
||||
}
|
||||
public function pts_print_format_tests($object, &$write_buffer, $steps = -1)
|
||||
public function __toString()
|
||||
{
|
||||
// Print out a text tree that shows the suites and tests within an object
|
||||
$steps++;
|
||||
if(pts_test_suite::is_suite($object))
|
||||
{
|
||||
$xml_parser = new pts_suite_nye_XmlReader($object);
|
||||
$test_names = array_unique($xml_parser->getXMLArrayValues('PhoronixTestSuite/Execute/Test'));
|
||||
|
||||
if($steps > 0)
|
||||
{
|
||||
asort($test_names);
|
||||
}
|
||||
|
||||
if($steps == 0)
|
||||
{
|
||||
$write_buffer .= $object . PHP_EOL;
|
||||
}
|
||||
else
|
||||
{
|
||||
$write_buffer .= str_repeat(' ', $steps) . '+ ' . $object . PHP_EOL;
|
||||
}
|
||||
|
||||
foreach($test_names as $test)
|
||||
{
|
||||
$write_buffer .= $this->pts_print_format_tests($test, $write_buffer, $steps);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$write_buffer .= str_repeat(' ', $steps) . '* ' . $object . PHP_EOL;
|
||||
}
|
||||
return $this->get_identifier() . ' [v' . $this->get_version() . ']';
|
||||
}
|
||||
public static function pts_format_tests_to_array($object)
|
||||
public function set_identifier($s)
|
||||
{
|
||||
// Print out a text tree that shows the suites and tests within an object
|
||||
$contained = array();
|
||||
$this->identifier = $s;
|
||||
}
|
||||
public function get_identifier($bind_version = true)
|
||||
{
|
||||
$identifier = $this->identifier;
|
||||
|
||||
if(pts_test_suite::is_suite($object))
|
||||
if($bind_version == false && ($c = strrpos($identifier, '-')))
|
||||
{
|
||||
$xml_parser = new pts_suite_nye_XmlReader($object);
|
||||
$test_names = array_unique($xml_parser->getXMLArrayValues('PhoronixTestSuite/Execute/Test'));
|
||||
$contained[$object] = array();
|
||||
|
||||
foreach($test_names as $test)
|
||||
if(pts_strings::is_version(substr($identifier, ($c + 1))))
|
||||
{
|
||||
$contained[$object][] = self::pts_format_tests_to_array($test);
|
||||
$identifier = substr($identifier, 0, $c);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
return $identifier;
|
||||
}
|
||||
public function get_identifier_base_name()
|
||||
{
|
||||
$identifier = basename($this->identifier);
|
||||
|
||||
if(($s = strrpos($identifier, '-')) !== false)
|
||||
{
|
||||
$contained = $object;
|
||||
$post_dash = substr($identifier, ($s + 1));
|
||||
|
||||
// If the version is attached, remove it
|
||||
if(pts_strings::is_version($post_dash))
|
||||
{
|
||||
$identifier = substr($identifier, 0, $s);
|
||||
}
|
||||
}
|
||||
|
||||
return $contained;
|
||||
return $identifier;
|
||||
}
|
||||
public function set_core_version_min($s)
|
||||
{
|
||||
$this->requires_minimum_core_version = $s;
|
||||
}
|
||||
public function set_core_version_max($s)
|
||||
{
|
||||
$this->requires_maximum_core_version = $s;
|
||||
}
|
||||
public function requires_core_version_min()
|
||||
{
|
||||
return $this->requires_minimum_core_version != null ? $this->requires_minimum_core_version : 2950;
|
||||
}
|
||||
public function requires_core_version_max()
|
||||
{
|
||||
return $this->requires_maximum_core_version != null ? $this->requires_maximum_core_version : 9990;
|
||||
}
|
||||
public function set_description($s)
|
||||
{
|
||||
$this->description = $s;
|
||||
}
|
||||
public function get_description()
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
public function set_title($s)
|
||||
{
|
||||
$this->title = $s;
|
||||
}
|
||||
public function get_title()
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
public function set_version($s)
|
||||
{
|
||||
$this->version = $s;
|
||||
}
|
||||
public function get_version()
|
||||
{
|
||||
return $this->version;
|
||||
}
|
||||
public function set_maintainer($s)
|
||||
{
|
||||
$this->maintainer = $s;
|
||||
}
|
||||
public function get_maintainer()
|
||||
{
|
||||
return $this->maintainer;
|
||||
}
|
||||
public function set_suite_type($s)
|
||||
{
|
||||
$this->test_type = $s;
|
||||
}
|
||||
public function get_suite_type()
|
||||
{
|
||||
return $this->test_type;
|
||||
}
|
||||
public function set_pre_run_message($s)
|
||||
{
|
||||
$this->pre_run_message = $s;
|
||||
}
|
||||
public function get_pre_run_message()
|
||||
{
|
||||
return $this->pre_run_message;
|
||||
}
|
||||
public function set_post_run_message($s)
|
||||
{
|
||||
$this->post_run_message = $s;
|
||||
}
|
||||
public function get_post_run_message()
|
||||
{
|
||||
return $this->post_run_message;
|
||||
}
|
||||
public function set_run_mode($s)
|
||||
{
|
||||
$this->run_mode = $s;
|
||||
}
|
||||
public function get_run_mode()
|
||||
{
|
||||
return $this->run_mode;
|
||||
}
|
||||
public function get_test_names()
|
||||
{
|
||||
return $this->test_names;
|
||||
}
|
||||
public function get_unique_test_names()
|
||||
{
|
||||
return array_unique($this->get_test_names());
|
||||
}
|
||||
public function get_contained_test_profiles()
|
||||
{
|
||||
$test_profiles = array();
|
||||
|
||||
foreach($this->test_objects as $result_objects)
|
||||
{
|
||||
$test_profiles[] = $result_objects->test_profile;
|
||||
}
|
||||
|
||||
return $test_profiles;
|
||||
}
|
||||
public function sort_contained_tests()
|
||||
{
|
||||
usort($this->test_objects, array($this, 'cmp_result_object_sort_title'));
|
||||
}
|
||||
public function cmp_result_object_sort_title($a, $b)
|
||||
{
|
||||
$a_comp = $a->test_profile->get_title();
|
||||
$b_comp = $b->test_profile->get_title();
|
||||
return strcmp($a_comp, $b_comp);
|
||||
}
|
||||
public function get_xml($to = null, $force_nice_formatting = false)
|
||||
{
|
||||
$xml_writer = new nye_XmlWriter(null, $force_nice_formatting);
|
||||
$xml_writer->addXmlNode('PhoronixTestSuite/SuiteInformation/Title', $this->get_title());
|
||||
$xml_writer->addXmlNode('PhoronixTestSuite/SuiteInformation/Version', $this->get_version());
|
||||
$xml_writer->addXmlNode('PhoronixTestSuite/SuiteInformation/TestType', $this->get_suite_type());
|
||||
$xml_writer->addXmlNode('PhoronixTestSuite/SuiteInformation/Description', $this->get_description());
|
||||
$xml_writer->addXmlNodeWNE('PhoronixTestSuite/SuiteInformation/Maintainer', $this->get_maintainer());
|
||||
$xml_writer->addXmlNodeWNE('PhoronixTestSuite/SuiteInformation/PreRunMessage', $this->get_pre_run_message());
|
||||
$xml_writer->addXmlNodeWNE('PhoronixTestSuite/SuiteInformation/PostRunMessage', $this->get_post_run_message());
|
||||
$xml_writer->addXmlNodeWNE('PhoronixTestSuite/SuiteInformation/RunMode', $this->get_run_mode());
|
||||
$xml_writer->addXmlNodeWNE('PhoronixTestSuite/SuiteInformation/RequiresCoreVersionMin', $this->requires_minimum_core_version);
|
||||
$xml_writer->addXmlNodeWNE('PhoronixTestSuite/SuiteInformation/RequiresCoreVersionMax', $this->requires_maximum_core_version);
|
||||
|
||||
foreach($this->test_objects as $i => &$test)
|
||||
{
|
||||
if($test->test_profile->get_title() == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$xml_writer->addXmlNodeWNE('PhoronixTestSuite/Execute/Test', $test->test_profile->get_identifier());
|
||||
$xml_writer->addXmlNodeWNE('PhoronixTestSuite/Execute/Arguments', $test->get_arguments());
|
||||
$xml_writer->addXmlNodeWNE('PhoronixTestSuite/Execute/Description', $test->get_arguments_description());
|
||||
$xml_writer->addXmlNodeWNE('PhoronixTestSuite/Execute/Mode', null); // XXX wire this up!
|
||||
$xml_writer->addXmlNodeWNE('PhoronixTestSuite/Execute/OverrideTestOptions', $test->test_profile->get_override_values(true));
|
||||
}
|
||||
return $xml_writer->getXML();
|
||||
}
|
||||
public function save_xml($suite_identifier = null, $save_to = null)
|
||||
{
|
||||
$xml = $this->get_xml();
|
||||
if($suite_identifier != null)
|
||||
{
|
||||
$this->set_identifier($this->clean_save_name_string($suite_identifier));
|
||||
$save_to = PTS_TEST_SUITE_PATH . 'local/' . $this->get_identifier() . '/suite-definition.xml';
|
||||
pts_file_io::mkdir(dirname($save_to));
|
||||
}
|
||||
|
||||
return file_put_contents($save_to, $xml) != false;
|
||||
}
|
||||
public function clean_save_name_string($input)
|
||||
{
|
||||
$input = strtolower($input);
|
||||
$input = pts_strings::remove_redundant(pts_strings::keep_in_string(str_replace(' ', '-', trim($input)), pts_strings::CHAR_LETTER | pts_strings::CHAR_NUMERIC | pts_strings::CHAR_DASH), '-');
|
||||
|
||||
if(strlen($input) > 126)
|
||||
{
|
||||
$input = substr($input, 0, 126);
|
||||
}
|
||||
|
||||
return $input;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2008 - 2016, Phoronix Media
|
||||
Copyright (C) 2008 - 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class pts_test_suite_parser
|
||||
{
|
||||
protected $identifier;
|
||||
public $xml_parser;
|
||||
|
||||
public function __construct($identifier)
|
||||
{
|
||||
if(PTS_IS_CLIENT)
|
||||
{
|
||||
$ob_identifier = pts_openbenchmarking::evaluate_string_to_qualifier($identifier, true, 'suite');
|
||||
|
||||
if($ob_identifier != false)
|
||||
{
|
||||
$identifier = $ob_identifier;
|
||||
}
|
||||
}
|
||||
|
||||
$this->identifier = $identifier;
|
||||
$this->xml_parser = new pts_suite_nye_XmlReader($identifier);
|
||||
}
|
||||
public function __toString()
|
||||
{
|
||||
return $this->get_identifier() . ' [v' . $this->get_version() . ']';
|
||||
}
|
||||
public function get_identifier($bind_version = true)
|
||||
{
|
||||
$identifier = $this->identifier;
|
||||
|
||||
if($bind_version == false && ($c = strrpos($identifier, '-')))
|
||||
{
|
||||
if(pts_strings::is_version(substr($identifier, ($c + 1))))
|
||||
{
|
||||
$identifier = substr($identifier, 0, $c);
|
||||
}
|
||||
}
|
||||
|
||||
return $identifier;
|
||||
}
|
||||
public function get_identifier_base_name()
|
||||
{
|
||||
$identifier = basename($this->identifier);
|
||||
|
||||
if(($s = strrpos($identifier, '-')) !== false)
|
||||
{
|
||||
$post_dash = substr($identifier, ($s + 1));
|
||||
|
||||
// If the version is attached, remove it
|
||||
if(pts_strings::is_version($post_dash))
|
||||
{
|
||||
$identifier = substr($identifier, 0, $s);
|
||||
}
|
||||
}
|
||||
|
||||
return $identifier;
|
||||
}
|
||||
public function requires_core_version_min()
|
||||
{
|
||||
return $this->xml_parser->getXMLValue('PhoronixTestSuite/SuiteInformation/RequiresCoreVersionMin', 2950);
|
||||
}
|
||||
public function requires_core_version_max()
|
||||
{
|
||||
return $this->xml_parser->getXMLValue('PhoronixTestSuite/SuiteInformation/RequiresCoreVersionMax', 9190);
|
||||
}
|
||||
public function get_description()
|
||||
{
|
||||
return $this->xml_parser->getXMLValue('PhoronixTestSuite/SuiteInformation/Description');
|
||||
}
|
||||
public function get_title()
|
||||
{
|
||||
return $this->xml_parser->getXMLValue('PhoronixTestSuite/SuiteInformation/Title');
|
||||
}
|
||||
public function get_version()
|
||||
{
|
||||
return $this->xml_parser->getXMLValue('PhoronixTestSuite/SuiteInformation/Version');
|
||||
}
|
||||
public function get_maintainer()
|
||||
{
|
||||
return $this->xml_parser->getXMLValue('PhoronixTestSuite/SuiteInformation/Maintainer');
|
||||
}
|
||||
public function get_suite_type()
|
||||
{
|
||||
return $this->xml_parser->getXMLValue('PhoronixTestSuite/SuiteInformation/TestType');
|
||||
}
|
||||
public function get_pre_run_message()
|
||||
{
|
||||
return $this->xml_parser->getXMLValue('PhoronixTestSuite/SuiteInformation/PreRunMessage');
|
||||
}
|
||||
public function get_post_run_message()
|
||||
{
|
||||
return $this->xml_parser->getXMLValue('PhoronixTestSuite/SuiteInformation/PostRunMessage');
|
||||
}
|
||||
public function get_run_mode()
|
||||
{
|
||||
return $this->xml_parser->getXMLValue('PhoronixTestSuite/SuiteInformation/RunMode');
|
||||
}
|
||||
public function get_test_names()
|
||||
{
|
||||
return $this->xml_parser->getXMLArrayValues('PhoronixTestSuite/Execute/Test');
|
||||
}
|
||||
public function get_unique_test_names()
|
||||
{
|
||||
return array_unique($this->get_test_names());
|
||||
}
|
||||
public function get_contained_test_profiles()
|
||||
{
|
||||
$test_names = $this->xml_parser->getXMLArrayValues('PhoronixTestSuite/Execute/Test');
|
||||
$test_profiles = array();
|
||||
|
||||
foreach(array_keys($test_names) as $i)
|
||||
{
|
||||
$obj = pts_types::identifier_to_object($test_names[$i]);
|
||||
|
||||
if($obj instanceof pts_test_profile)
|
||||
{
|
||||
$test_profiles[] = $obj;
|
||||
}
|
||||
else if($obj instanceof pts_test_suite)
|
||||
{
|
||||
foreach($obj->get_contained_test_profiles() as $obj)
|
||||
{
|
||||
$test_profiles[] = $obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $test_profiles;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,118 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2010 - 2015, Phoronix Media
|
||||
Copyright (C) 2010 - 2015, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class pts_test_suite_writer
|
||||
{
|
||||
private $xml_writer = null;
|
||||
private $result_identifier = null;
|
||||
|
||||
public function __construct($result_identifier = null, &$xml_writer = null)
|
||||
{
|
||||
$this->result_identifier = $result_identifier;
|
||||
|
||||
if($xml_writer instanceof nye_XmlWriter)
|
||||
{
|
||||
$this->xml_writer = $xml_writer;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->xml_writer = new nye_XmlWriter();
|
||||
}
|
||||
}
|
||||
public function get_xml()
|
||||
{
|
||||
return $this->xml_writer->getXML();
|
||||
}
|
||||
public function save_xml($to_save)
|
||||
{
|
||||
return $this->xml_writer->saveXMLFile($to_save);
|
||||
}
|
||||
public function clean_save_name_string($input)
|
||||
{
|
||||
$input = strtolower($input);
|
||||
$input = pts_strings::remove_redundant(pts_strings::keep_in_string(str_replace(' ', '-', trim($input)), pts_strings::CHAR_LETTER | pts_strings::CHAR_NUMERIC | pts_strings::CHAR_DASH), '-');
|
||||
|
||||
if(strlen($input) > 126)
|
||||
{
|
||||
$input = substr($input, 0, 126);
|
||||
}
|
||||
|
||||
return $input;
|
||||
}
|
||||
public function add_suite_information_from_reader(&$xml_reader)
|
||||
{
|
||||
$this->xml_writer->addXmlNodeFromReaderWNE('PhoronixTestSuite/SuiteInformation/Title', $xml_reader);
|
||||
$this->xml_writer->addXmlNodeFromReaderWNE('PhoronixTestSuite/SuiteInformation/Version', $xml_reader);
|
||||
$this->xml_writer->addXmlNodeFromReaderWNE('PhoronixTestSuite/SuiteInformation/TestType', $xml_reader);
|
||||
$this->xml_writer->addXmlNodeFromReaderWNE('PhoronixTestSuite/SuiteInformation/Description', $xml_reader);
|
||||
$this->xml_writer->addXmlNodeFromReaderWNE('PhoronixTestSuite/SuiteInformation/Maintainer', $xml_reader);
|
||||
$this->xml_writer->addXmlNodeFromReaderWNE('PhoronixTestSuite/SuiteInformation/PreRunMessage', $xml_reader);
|
||||
$this->xml_writer->addXmlNodeFromReaderWNE('PhoronixTestSuite/SuiteInformation/PostRunMessage', $xml_reader);
|
||||
$this->xml_writer->addXmlNodeFromReaderWNE('PhoronixTestSuite/SuiteInformation/RunMode', $xml_reader);
|
||||
$this->xml_writer->addXmlNodeFromReaderWNE('PhoronixTestSuite/SuiteInformation/RequiresCoreVersionMin', $xml_reader);
|
||||
$this->xml_writer->addXmlNodeFromReaderWNE('PhoronixTestSuite/SuiteInformation/RequiresCoreVersionMax', $xml_reader);
|
||||
}
|
||||
public function add_suite_information($name, $version, $maintainer, $type, $description)
|
||||
{
|
||||
$this->xml_writer->addXmlNode('PhoronixTestSuite/SuiteInformation/Title', $name);
|
||||
$this->xml_writer->addXmlNode('PhoronixTestSuite/SuiteInformation/Version', $version);
|
||||
$this->xml_writer->addXmlNode('PhoronixTestSuite/SuiteInformation/TestType', $type);
|
||||
$this->xml_writer->addXmlNode('PhoronixTestSuite/SuiteInformation/Description', $description);
|
||||
$this->xml_writer->addXmlNode('PhoronixTestSuite/SuiteInformation/Maintainer', $maintainer);
|
||||
}
|
||||
public function add_to_suite_from_reader(&$xml_reader)
|
||||
{
|
||||
$test_names = $xml_reader->getXMLArrayValues('PhoronixTestSuite/Execute/Test');
|
||||
$sub_arguments = $xml_reader->getXMLArrayValues('PhoronixTestSuite/Execute/Arguments');
|
||||
$sub_arguments_description = $xml_reader->getXMLArrayValues('PhoronixTestSuite/Execute/Description');
|
||||
$sub_modes = $xml_reader->getXMLArrayValues('PhoronixTestSuite/Execute/Mode');
|
||||
$override_test_options = $xml_reader->getXMLArrayValues('PhoronixTestSuite/Execute/OverrideTestOptions');
|
||||
|
||||
for($i = 0; $i < count($test_names); $i++)
|
||||
{
|
||||
$identifier = pts_openbenchmarking::evaluate_string_to_qualifier($test_names[$i]);
|
||||
|
||||
if(empty($identifier))
|
||||
{
|
||||
echo PHP_EOL . $test_names[$i] . ' fails.' . PHP_EOL;
|
||||
exit;
|
||||
}
|
||||
$identifier = substr($identifier, 0, strrpos($identifier, '-')); // strip the version for now
|
||||
|
||||
$this->add_to_suite($identifier, $sub_arguments[$i], $sub_arguments_description[$i], $sub_modes[$i], $override_test_options[$i]);
|
||||
}
|
||||
}
|
||||
public function add_to_suite($identifier, $arguments, $description, $mode = null, $override = null)
|
||||
{
|
||||
$this->xml_writer->addXmlNodeWNE('PhoronixTestSuite/Execute/Test', $identifier);
|
||||
$this->xml_writer->addXmlNodeWNE('PhoronixTestSuite/Execute/Arguments', $arguments);
|
||||
$this->xml_writer->addXmlNodeWNE('PhoronixTestSuite/Execute/Description', $description);
|
||||
$this->xml_writer->addXmlNodeWNE('PhoronixTestSuite/Execute/Mode', $mode);
|
||||
$this->xml_writer->addXmlNodeWNE('PhoronixTestSuite/Execute/OverrideTestOptions', $override);
|
||||
}
|
||||
public function add_to_suite_from_result_object(&$r_o)
|
||||
{
|
||||
$this->add_to_suite($r_o->test_profile->get_identifier(), $r_o->get_arguments(), $r_o->get_arguments_description());
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -152,9 +152,9 @@ class pts_types
|
||||
// Object is a virtual suite
|
||||
$objects[] = new pts_virtual_test_suite($identifier_item);
|
||||
}
|
||||
else if(pts_suite_nye_XmlReader::is_temporary_suite($identifier_item))
|
||||
else if(pts_test_suite::is_temporary_suite($identifier_item))
|
||||
{
|
||||
// Object is a suite
|
||||
// Object is a temporary test suite
|
||||
$objects[] = new pts_test_suite($identifier_item);
|
||||
}
|
||||
else if(is_array($archive_unknown_objects))
|
||||
|
||||
@@ -48,10 +48,10 @@ class pts_user_io
|
||||
|
||||
return $list;
|
||||
}
|
||||
public static function display_text_table(&$table)
|
||||
public static function display_text_table(&$table, $prepend_to_lines = null, $extra_width_to_column = 0)
|
||||
{
|
||||
$column_widths = array();
|
||||
$formatted_table = null;
|
||||
$formatted_table = $prepend_to_lines;
|
||||
|
||||
for($r = 0; $r < count($table); $r++)
|
||||
{
|
||||
@@ -72,13 +72,13 @@ class pts_user_io
|
||||
|
||||
if(($c + 1) != $rc_count)
|
||||
{
|
||||
$formatted_table .= str_repeat(' ', (1 + $column_widths[$c] - strlen($table[$r][$c])));
|
||||
$formatted_table .= str_repeat(' ', (1 + $extra_width_to_column + $column_widths[$c] - strlen($table[$r][$c])));
|
||||
}
|
||||
}
|
||||
|
||||
if(($r + 1) != $r_count)
|
||||
{
|
||||
$formatted_table .= PHP_EOL;
|
||||
$formatted_table .= PHP_EOL . $prepend_to_lines;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -101,17 +101,11 @@ class pts_validation
|
||||
}
|
||||
public static function validate_test_suite(&$test_suite)
|
||||
{
|
||||
if($test_suite->xml_parser->getFileLocation() == null)
|
||||
{
|
||||
echo PHP_EOL . 'ERROR: The file location of the XML test suite source could not be determined.' . PHP_EOL;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Validate the XML against the XSD Schemas
|
||||
libxml_clear_errors();
|
||||
|
||||
// First rewrite the main XML file to ensure it is properly formatted, elements are ordered according to the schema, etc...
|
||||
$valid = $test_suite->xml_parser->validate();
|
||||
$valid = $test_suite->validate();
|
||||
|
||||
if($valid == false)
|
||||
{
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">
|
||||
Phoronix Test Suite / OpenBenchmarking.org XML Result File Specification
|
||||
Copyright (C) 2008 - 2012, Phoronix Media
|
||||
Copyright (C) 2008 - 2012, Michael Larabel
|
||||
Copyright (C) 2008 - 2016, Phoronix Media
|
||||
Copyright (C) 2008 - 2016, Michael Larabel
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:include schemaLocation="types.xsd" />
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2009 - 2015, Phoronix Media
|
||||
Copyright (C) 2009 - 2015, Michael Larabel
|
||||
Copyright (C) 2009 - 2016, Phoronix Media
|
||||
Copyright (C) 2009 - 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -104,8 +104,12 @@ function phoromatic_generate_test_suite(&$test_schedule, &$json, $phoromatic_acc
|
||||
$trigger_id = date('Y-m-d');
|
||||
}
|
||||
|
||||
$suite_writer = new pts_test_suite_writer();
|
||||
$suite_writer->add_suite_information($test_schedule['Title'], '1.0.0', $test_schedule['LastModifiedBy'], 'System', 'An automated Phoromatic test schedule.');
|
||||
$new_suite = new pts_test_suite();
|
||||
$new_suite->set_title($test_schedule['Title']);
|
||||
$new_suite->set_version('1.0.0');
|
||||
$new_suite->set_maintainer($test_schedule['LastModifiedBy']);
|
||||
$new_suite->set_suite_type('System');
|
||||
$new_suite->set_description($test_schedule['Description']);
|
||||
|
||||
$stmt = phoromatic_server::$db->prepare('SELECT * FROM phoromatic_schedules_tests WHERE AccountID = :account_id AND ScheduleID = :schedule_id');
|
||||
$stmt->bindValue(':account_id', ACCOUNT_ID);
|
||||
@@ -115,7 +119,7 @@ function phoromatic_generate_test_suite(&$test_schedule, &$json, $phoromatic_acc
|
||||
$test_count = 0;
|
||||
while($row = $result->fetchArray())
|
||||
{
|
||||
$suite_writer->add_to_suite($row['TestProfile'], $row['TestArguments'], $row['TestDescription']);
|
||||
$new_suite->add_to_suite($row['TestProfile'], $row['TestArguments'], $row['TestDescription']);
|
||||
$test_count++;
|
||||
}
|
||||
|
||||
@@ -128,7 +132,7 @@ function phoromatic_generate_test_suite(&$test_schedule, &$json, $phoromatic_acc
|
||||
$json['phoromatic']['save_identifier'] = $test_schedule['Title'] . ' - ' . $trigger_id;
|
||||
$json['phoromatic']['trigger_id'] = $trigger_id;
|
||||
$json['phoromatic']['schedule_id'] = $test_schedule['ScheduleID'];
|
||||
$json['phoromatic']['test_suite'] = $suite_writer->get_xml();
|
||||
$json['phoromatic']['test_suite'] = $new_suite->get_xml();
|
||||
$json['phoromatic']['pre_set_sys_env_vars'] = $sys_row['SystemVariables'];
|
||||
|
||||
$contexts = array('SetContextPreInstall' => 'pre_install_set_context', 'SetContextPostInstall' => 'post_install_set_context', 'SetContextPreRun' => 'pre_run_set_context', 'SetContextPostRun' => 'post_run_set_context');
|
||||
@@ -171,8 +175,12 @@ function phoromatic_generate_benchmark_ticket(&$ticket_row, &$json, $phoromatic_
|
||||
}
|
||||
function phoromatic_pre_seed_tests_to_install(&$json, $phoromatic_account_settings, &$sys_row)
|
||||
{
|
||||
$suite_writer = new pts_test_suite_writer();
|
||||
$suite_writer->add_suite_information('Pre-Seed', '1.0.0', 'Phoromatic', 'System', 'An automated Phoromatic test schedule.');
|
||||
$new_suite = new pts_test_suite();
|
||||
$new_suite->set_title('Pre-Seed');
|
||||
$new_suite->set_version('1.0.0');
|
||||
$new_suite->set_maintainer('Phoromatic');
|
||||
$new_suite->set_suite_type('System');
|
||||
$new_suite->set_description('Pre-seeding commonly used tests to host.');
|
||||
|
||||
$stmt = phoromatic_server::$db->prepare('SELECT * FROM phoromatic_schedules_tests WHERE AccountID = :account_id');
|
||||
$stmt->bindValue(':account_id', ACCOUNT_ID);
|
||||
@@ -181,7 +189,7 @@ function phoromatic_pre_seed_tests_to_install(&$json, $phoromatic_account_settin
|
||||
$test_count = 0;
|
||||
while($row = $result->fetchArray())
|
||||
{
|
||||
$suite_writer->add_to_suite($row['TestProfile'], null, null);
|
||||
$new_suite->add_to_suite($row['TestProfile']);
|
||||
$test_count++;
|
||||
}
|
||||
|
||||
@@ -191,7 +199,7 @@ function phoromatic_pre_seed_tests_to_install(&$json, $phoromatic_account_settin
|
||||
}
|
||||
|
||||
$json['phoromatic']['task'] = 'install';
|
||||
$json['phoromatic']['test_suite'] = $suite_writer->get_xml();
|
||||
$json['phoromatic']['test_suite'] = $new_suite->get_xml();
|
||||
$json['phoromatic']['settings'] = $phoromatic_account_settings;
|
||||
$json['phoromatic']['pre_set_sys_env_vars'] = $sys_row['SystemVariables'];
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2016, Phoronix Media
|
||||
Copyright (C) 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
//error_reporting(E_ALL | E_NOTICE | E_STRICT);
|
||||
|
||||
if(!function_exists('sqlite_escape_string'))
|
||||
{
|
||||
function sqlite_escape_string($str)
|
||||
{
|
||||
// TODO XXX SQLite3::escapeString
|
||||
return $str;
|
||||
}
|
||||
}
|
||||
|
||||
$json = array();
|
||||
|
||||
if(empty($BENCHMARK_TICKET_ID))
|
||||
{
|
||||
$json['phoromatic']['error'] = 'No Ticket ID';
|
||||
echo json_encode($json);
|
||||
return false;
|
||||
}
|
||||
|
||||
pts_file_io::mkdir(phoromatic_server::phoromatic_account_stress_log_path(ACCOUNT_ID));
|
||||
$log_directory = phoromatic_server::phoromatic_account_stress_log_path(ACCOUNT_ID, $BENCHMARK_TICKET_ID);
|
||||
pts_file_io::mkdir($log_directory);
|
||||
|
||||
if($LOGS != null)
|
||||
{
|
||||
file_put_contents($log_directory . SYSTEM_ID . '.log', $LOGS);
|
||||
$json['phoromatic']['response'] = 'Log Updated';
|
||||
echo json_encode($json);
|
||||
return true;
|
||||
}
|
||||
|
||||
$json['phoromatic']['error'] = 'End Termination Error';
|
||||
echo json_encode($json);
|
||||
return false;
|
||||
|
||||
?>
|
||||
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
Phoronix Test Suite
|
||||
URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
|
||||
Copyright (C) 2009 - 2014, Phoronix Media
|
||||
Copyright (C) 2009 - 2014, Michael Larabel
|
||||
Copyright (C) 2009 - 2016, Phoronix Media
|
||||
Copyright (C) 2009 - 2016, Michael Larabel
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -38,13 +38,14 @@ if(empty($PERCENT_COMPLETE) || !is_numeric($PERCENT_COMPLETE))
|
||||
}
|
||||
|
||||
|
||||
$stmt = phoromatic_server::$db->prepare('UPDATE phoromatic_systems SET CurrentTask = :current_task, EstimatedTimeForTask = :time_for_task, TaskPercentComplete = :percent_complete, TaskPercentComplete = :percent_complete, CurrentProcessSchedule = :schedule_id, TimeToNextCommunication = :time_to_next_comm WHERE AccountID = :account_id AND SystemID = :system_id');
|
||||
$stmt = phoromatic_server::$db->prepare('UPDATE phoromatic_systems SET CurrentTask = :current_task, EstimatedTimeForTask = :time_for_task, TaskPercentComplete = :percent_complete, TaskPercentComplete = :percent_complete, CurrentProcessSchedule = :schedule_id, CurrentProcessTicket = :ticket_id, TimeToNextCommunication = :time_to_next_comm WHERE AccountID = :account_id AND SystemID = :system_id');
|
||||
$stmt->bindValue(':account_id', $ACCOUNT_ID);
|
||||
$stmt->bindValue(':system_id', SYSTEM_ID);
|
||||
$stmt->bindValue(':current_task', $ACTIVITY);
|
||||
$stmt->bindValue(':time_for_task', $ESTIMATED_TIME);
|
||||
$stmt->bindValue(':percent_complete', $PERCENT_COMPLETE);
|
||||
$stmt->bindValue(':schedule_id', $SCHEDULE_ID);
|
||||
$stmt->bindValue(':ticket_id', isset($BENCHMARK_TICKET_ID) && !empty($BENCHMARK_TICKET_ID) ? $BENCHMARK_TICKET_ID : 0);
|
||||
$stmt->bindValue(':time_to_next_comm', $OTHER);
|
||||
$stmt->execute();
|
||||
|
||||
|
||||
@@ -87,6 +87,185 @@ else
|
||||
$tracker = &$export_index_json['phoromatic'][$REQUESTED];
|
||||
$length = count($tracker['triggers']);
|
||||
|
||||
//
|
||||
// EMAIL NOTIFICATIONS
|
||||
//
|
||||
|
||||
if(defined('PATH_TO_PHOROMATIC_ML_DB') && PATH_TO_PHOROMATIC_ML_DB != null)
|
||||
{
|
||||
function phoromatic_mailing_list_db_init()
|
||||
{
|
||||
$db_file = PATH_TO_PHOROMATIC_ML_DB;
|
||||
$db_flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE;
|
||||
$db = new SQLite3($db_file, $db_flags);
|
||||
$db->busyTimeout(10000);
|
||||
$result = $db->query('PRAGMA user_version');
|
||||
$result = $result->fetchArray();
|
||||
$user_version = isset($result['user_version']) && is_numeric($result['user_version']) ? $result['user_version'] : 0;
|
||||
|
||||
switch($user_version)
|
||||
{
|
||||
case 0:
|
||||
// Account Database
|
||||
$db->exec('CREATE TABLE phoromatic_notifications_emails (EmailAddress TEXT, TestSchedule TEXT NOT NULL, NotifyOnNewResults INTEGER, NotifyOnRegressions INTEGER, UNIQUE(EmailAddress, TestSchedule) ON CONFLICT IGNORE)');
|
||||
$db->exec('PRAGMA user_version = 1');
|
||||
break;
|
||||
}
|
||||
chmod($db_file, 0600);
|
||||
return $db;
|
||||
}
|
||||
function send_email($to, $subject, $from, $body)
|
||||
{
|
||||
$msg = '<html><body>' . $body . '<br /><br /><br /><a href="' . PHOROMATIC_BASE_URL . '">' . PHOROMATIC_VIEWER_TITLE . '</a>
|
||||
<hr />
|
||||
<p><img src="http://www.phoronix-test-suite.com/web/pts-logo-60.png" /></p>
|
||||
<h6><em>The <a href="http://www.phoronix-test-suite.com/">Phoronix Test Suite</a>, <a href="http://www.phoromatic.com/">Phoromatic</a>, and <a href="http://openbenchmarking.org/">OpenBenchmarking.org</a> are products of <a href="http://www.phoronix-media.com/">Phoronix Media</a>.<br />The Phoronix Test Suite is open-source under terms of the GNU GPL. Commercial support, custom engineering, and other services are available by contacting Phoronix Media.<br />© ' . date('Y') . ' Phoronix Media.</em></h6>
|
||||
</body></html>';
|
||||
$headers = "MIME-Version: 1.0\r\n";
|
||||
$headers .= "Content-type:text/html;charset=UTF-8\r\n";
|
||||
$headers .= "From: Phoromatic - Phoronix Test Suite <no-reply@phoromatic.com>\r\n";
|
||||
$headers .= "Reply-To: " . $from . " <" . $from . ">\r\n";
|
||||
|
||||
mail($to, $subject, $msg, $headers);
|
||||
}
|
||||
|
||||
if(isset($_POST['join_email']) && !empty($_POST['join_email']) && filter_var($_POST['join_email'], FILTER_VALIDATE_EMAIL) && (isset($_POST['notify_new_results']) || isset($_POST['notify_new_regressions'])))
|
||||
{
|
||||
// ENTER EMAIL
|
||||
$db = phoromatic_mailing_list_db_init();
|
||||
$stmt = $db->prepare('INSERT INTO phoromatic_notifications_emails (EmailAddress, TestSchedule, NotifyOnNewResults, NotifyOnRegressions) VALUES (:email, :test_schedule, :notify_results, :notify_regressions)');
|
||||
$stmt->bindValue(':email', strtolower($_POST['join_email']));
|
||||
$stmt->bindValue(':test_schedule', $REQUESTED);
|
||||
$stmt->bindValue(':notify_results', (isset($_POST['notify_new_results']) && $_POST['notify_new_results'] ? time() : 0));
|
||||
$stmt->bindValue(':notify_regressions', (isset($_POST['notify_new_regressions']) && $_POST['notify_new_regressions'] ? time() : 0));
|
||||
$result = $stmt->execute();
|
||||
|
||||
if($result)
|
||||
{
|
||||
send_email($_POST['join_email'], 'Email Join Notification', EMAIL_ADDRESS_SENDER, 'This email is to confirm you will now be receiving email notifications on events from the Phoromatic <em>' . $REQUESTED . '</em> tracker on ' . PHOROMATIC_VIEWER_TITLE . '.');
|
||||
}
|
||||
}
|
||||
else if(isset($_REQUEST['upload_event_completed']))
|
||||
{
|
||||
// Check for those that want new notifications just about new result uploads
|
||||
$db = phoromatic_mailing_list_db_init();
|
||||
foreach($export_index_json['phoromatic'] as $schedule => $data)
|
||||
{
|
||||
$stmt = $db->prepare('SELECT * FROM phoromatic_notifications_emails WHERE TestSchedule LIKE :test_schedule AND NotifyOnNewResults NOT LIKE 0 AND NotifyOnNewResults < :latest_result_time_for_schedule');
|
||||
$stmt->bindValue(':test_schedule', $schedule);
|
||||
$stmt->bindValue(':latest_result_time_for_schedule', $data['last_result_time']);
|
||||
$result = $stmt ? $stmt->execute() : false;
|
||||
|
||||
while($result && ($row = $result->fetchArray()))
|
||||
{
|
||||
send_email($row['EmailAddress'], 'New Results Uploaded For: ' . $data['title'], EMAIL_ADDRESS_SENDER, '<p>This email is to notify you that new test results have been uploaded for the ' . $data['title'] . ' performance tracker on ' . PHOROMATIC_VIEWER_TITLE . '</p><p><strong>View the latest results: <a href="' . PHOROMATIC_BASE_URL . '?' . $schedule . '">' . PHOROMATIC_BASE_URL . '?' . $schedule . '</a></strong></p>');
|
||||
|
||||
$stmt = $db->prepare('UPDATE phoromatic_notifications_emails SET NotifyOnNewResults = :latest_result_time_for_schedule WHERE EmailAddress = :email_address AND TestSchedule LIKE :test_schedule');
|
||||
$stmt->bindValue(':email_address', $row['EmailAddress']);
|
||||
$stmt->bindValue(':test_schedule', $schedule);
|
||||
$stmt->bindValue(':latest_result_time_for_schedule', $data['last_result_time']);
|
||||
$stmt->execute();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for those that want new notifications just about potential regressions
|
||||
$db = phoromatic_mailing_list_db_init();
|
||||
foreach($export_index_json['phoromatic'] as $schedule => $data)
|
||||
{
|
||||
$result_files = array();
|
||||
$triggers = array_splice($data['triggers'], 0, 2);
|
||||
|
||||
foreach($triggers as $trigger)
|
||||
{
|
||||
$results_for_trigger = glob(PATH_TO_EXPORTED_PHOROMATIC_DATA . '/' . $schedule . '/' . $trigger . '/*/composite.xml');
|
||||
|
||||
if($results_for_trigger == false)
|
||||
continue;
|
||||
|
||||
foreach($results_for_trigger as $composite_xml)
|
||||
{
|
||||
// Add to result file
|
||||
$system_name = basename(dirname($composite_xml)) . ': ' . $trigger;
|
||||
array_push($result_files, new pts_result_merge_select($composite_xml, null, $system_name));
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = array();
|
||||
$result_file = new pts_result_file(null, true);
|
||||
$result_file->merge($result_files);
|
||||
//$result_file->set_title();
|
||||
$extra_attributes = array('reverse_result_buffer' => true, 'force_simple_keys' => true, 'force_line_graph_compact' => true, 'force_tracking_line_graph' => true);
|
||||
$has_flagged_results = false;
|
||||
$regression_text = null;
|
||||
$did_hit_a_regression = false;
|
||||
foreach($result_file->get_result_objects() as $i => $result_object)
|
||||
{
|
||||
if(!$has_flagged_results)
|
||||
{
|
||||
$regression_text.= '<hr /><h2>Flagged Results</h2>';
|
||||
$regression_text.= '<p>Displayed are results for each system of each scheduled test where there is a measurable change when comparing the most recent result to the previous result for that system for that test.</p>';
|
||||
$has_flagged_results = true;
|
||||
}
|
||||
$poi = $result_object->points_of_possible_interest(0.02, true);
|
||||
|
||||
if(!empty($poi))
|
||||
{
|
||||
$did_hit_a_regression = true;
|
||||
$regression_text.= '<h4>' . $result_object->test_profile->get_title() . '<br /><em>' . $result_object->get_arguments_description() . '</em></h4><p>';
|
||||
foreach($poi as $text)
|
||||
{
|
||||
$regression_text.= '<a href="' . PHOROMATIC_BASE_URL . '?' . $schedule . '#r-' . $i . '">' . $text . '</a><br />';
|
||||
}
|
||||
$regression_text.= '</p>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$stmt = $db->prepare('SELECT * FROM phoromatic_notifications_emails WHERE TestSchedule LIKE :test_schedule AND NotifyOnRegressions NOT LIKE 0 AND NotifyOnRegressions < :latest_result_time_for_schedule');
|
||||
$stmt->bindValue(':test_schedule', $schedule);
|
||||
$stmt->bindValue(':latest_result_time_for_schedule', $data['last_result_time']);
|
||||
$result = $stmt ? $stmt->execute() : false;
|
||||
|
||||
while($result && ($row = $result->fetchArray()))
|
||||
{
|
||||
// EMAIL OUT REGRESSION
|
||||
if($did_hit_a_regression)
|
||||
{
|
||||
send_email($row['EmailAddress'], 'Potential Regressions For: ' . $data['title'], EMAIL_ADDRESS_SENDER, '<p>This email is to notify you that there is a new potential regression or other change in performance for the ' . $data['title'] . ' performance tracker on ' . PHOROMATIC_VIEWER_TITLE . '</p>' . $regression_text . ' <p><br /><br /><br /><strong>View the latest results: <a href="' . PHOROMATIC_BASE_URL . '?' . $schedule . '">' . PHOROMATIC_BASE_URL . '?' . $schedule . '</a></strong></p>');
|
||||
}
|
||||
|
||||
// REPORT BUILD / RUNTIME ERRORS
|
||||
$export_errors = file_get_contents(PATH_TO_EXPORTED_PHOROMATIC_DATA . 'export-test-errors.json');
|
||||
$export_errors = json_decode($export_errors, true);
|
||||
|
||||
if(isset($export_errors['phoromatic'][$schedule]))
|
||||
{
|
||||
$error_report = null;
|
||||
foreach($export_errors['phoromatic'][$schedule] as &$error)
|
||||
{
|
||||
if($error['error_time'] > $row['NotifyOnRegressions'])
|
||||
{
|
||||
$error_report .= '<p><strong style="font-weight: 600;">' . $error['system'] . ' - ' . $error['trigger'] . ' - ' . $error['test'] . ' - ' . $error['test_description'] . ':</strong> ' . $error['error'] . '</p>';
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($error_report))
|
||||
{
|
||||
send_email($row['EmailAddress'], 'Reported Build/Runtime Errors: ' . $data['title'], EMAIL_ADDRESS_SENDER, '<p>This email is to notify you that there have been some reported test build or test run-time errors reported for the ' . $data['title'] . ' performance tracker on ' . PHOROMATIC_VIEWER_TITLE . '</p>' . $error_report . ' <p><br /><br /><br /><strong>View the latest results: <a href="' . PHOROMATIC_BASE_URL . '?' . $schedule . '">' . PHOROMATIC_BASE_URL . '?' . $schedule . '</a></strong></p>');
|
||||
}
|
||||
}
|
||||
// UPDATE META_DATA
|
||||
$stmt = $db->prepare('UPDATE phoromatic_notifications_emails SET NotifyOnRegressions = :latest_result_time_for_schedule WHERE EmailAddress = :email_address AND TestSchedule LIKE :test_schedule');
|
||||
$stmt->bindValue(':email_address', $row['EmailAddress']);
|
||||
$stmt->bindValue(':test_schedule', $schedule);
|
||||
$stmt->bindValue(':latest_result_time_for_schedule', $data['last_result_time']);
|
||||
$stmt->execute();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -122,8 +301,8 @@ foreach($export_index_json['phoromatic'] as &$schedule)
|
||||
</ul>
|
||||
</div>
|
||||
<hr />
|
||||
<h1><?php echo $tracker['title'] ?></h1>
|
||||
<p id="phoromatic_descriptor"><?php echo $tracker['description'] ?></p>
|
||||
<h1><?php echo $tracker['title']; ?></h1>
|
||||
<p id="phoromatic_descriptor"><?php echo $tracker['description'] ?><br /><br /><strong style="font-weight: 800;">Tracker History:</strong> <em><?php echo date('j F Y', $export_index_json['phoromatic'][$REQUESTED]['first_result_time']) . ' - ' . date('j F Y H:i', $export_index_json['phoromatic'][$REQUESTED]['last_result_time']); ?></em></p>
|
||||
<div id="config_option_line">
|
||||
<form action="<?php $_SERVER['REQUEST_URI']; ?>" name="update_result_view" method="post">
|
||||
Show Results For The Past <select name="view_results_limit" id="view_results_limit">
|
||||
@@ -150,12 +329,24 @@ echo '<option value="' . count($tracker['triggers']) . '">All Results</option>';
|
||||
|
||||
<input type="checkbox" name="system_table" value="1" <?php echo (isset($_REQUEST['system_table']) && $_REQUEST['system_table'] == 1 ? 'checked="checked"' : null); ?> /> Show System Information Table?
|
||||
|
||||
<input type="checkbox" name="regression_detector" value="1" <?php echo (isset($_REQUEST['regression_detector']) && $_REQUEST['regression_detector'] == 1 ? 'checked="checked"' : null); ?> /> Attempt To Results Of Interest?
|
||||
<input type="checkbox" name="regression_detector" value="1" <?php echo (isset($_REQUEST['regression_detector']) && $_REQUEST['regression_detector'] == 1 ? 'checked="checked"' : null); ?> /> Attempt To Show Results Of Interest?
|
||||
|
||||
<input type="checkbox" name="show_errors" value="1" <?php echo (isset($_REQUEST['show_errors']) && $_REQUEST['show_errors'] == 1 ? 'checked="checked"' : null); ?> /> Show Build / Runtime Errors?
|
||||
|
||||
<input type="checkbox" name="result_overview_table" value="1" <?php echo (isset($_REQUEST['result_overview_table']) && $_REQUEST['result_overview_table'] == 1 ? 'checked="checked"' : null); ?> /> Show Result Overview Table?
|
||||
|
||||
<br /><br /><input type="submit" value="Refresh Results">
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<?php if(defined('PATH_TO_PHOROMATIC_ML_DB') && PATH_TO_PHOROMATIC_ML_DB != null) { ?>
|
||||
<hr />
|
||||
<h2>Email Notifications - <?php echo $tracker['title']; ?></h2>
|
||||
<form action="<?php $_SERVER['REQUEST_URI']; ?>" name="update_result_view" method="post">
|
||||
<p align="center">Email Address: <input type="text" name="join_email" /></p>
|
||||
<p align="center"><input type="checkbox" name="notify_new_results" value="1" /> Notify When New Results Uploaded? <input type="checkbox" name="notify_new_regressions" value="1" /> Notify When Potential Regressions Spotted? </p>
|
||||
<p align="center"><input type="submit" value="Add Email Notification"></p>
|
||||
<?php } ?>
|
||||
<blockquote>
|
||||
<?php if(isset($welcome_msg) && !empty($welcome_msg)) { echo '<p>' . str_replace(PHP_EOL, '<br />', $welcome_msg) . '</p><hr />'; } ?>
|
||||
<p>This service is powered by the <a href="http://www.phoronix-test-suite.com/">Phoronix Test Suite</a>'s built-in <a href="http://www.phoromatic.com/">Phoromatic</a> test orchestration and centralized performance management software. The tests are hosted by <a href="http://openbenchmarking.org/">OpenBenchmarking.org</a>. The public code is <a href="http://github.com/phoronix-test-suite/phoronix-test-suite/">hosted on GitHub</a>.</p>
|
||||
@@ -198,6 +389,7 @@ foreach($triggers as $trigger)
|
||||
$attributes = array();
|
||||
$result_file = new pts_result_file(null, true);
|
||||
$result_file->merge($result_files);
|
||||
$result_file->set_title($tracker['title']);
|
||||
$extra_attributes = array('reverse_result_buffer' => true, 'force_simple_keys' => true, 'force_line_graph_compact' => true, 'force_tracking_line_graph' => true);
|
||||
|
||||
if(isset($_REQUEST['normalize_results']) && $_REQUEST['normalize_results'])
|
||||
@@ -213,10 +405,6 @@ if(isset($_REQUEST['clear_noisy_results']) && $_REQUEST['clear_noisy_results'])
|
||||
$extra_attributes['clear_noisy_results'] = true;
|
||||
}
|
||||
|
||||
$intent = null;
|
||||
//$table = new pts_ResultFileTable($result_file, $intent);
|
||||
//echo '<p style="text-align: center; overflow: auto;" class="result_object">' . pts_render::render_graph_inline_embed($table, $result_file, $extra_attributes) . '</p>';
|
||||
|
||||
if(isset($_REQUEST['regression_detector']))
|
||||
{
|
||||
$has_flagged_results = false;
|
||||
@@ -228,11 +416,11 @@ if(isset($_REQUEST['regression_detector']))
|
||||
echo '<p>Displayed are results for each system of each scheduled test where there is a measurable change when comparing the most recent result to the previous result for that system for that test.</p>';
|
||||
$has_flagged_results = true;
|
||||
}
|
||||
$poi = $result_object->points_of_possible_interest();
|
||||
$poi = $result_object->points_of_possible_interest(isset($_REQUEST['regression_threshold']) ? $_REQUEST['regression_threshold'] : 0.05);
|
||||
|
||||
if(!empty($poi))
|
||||
{
|
||||
echo '<h4>' . $result_object->test_profile->get_title() . '</h4><p>';
|
||||
echo '<h4>' . $result_object->test_profile->get_title() . '<br />' . $result_object->get_arguments_description() . '</h4><p>';
|
||||
foreach($poi as $text)
|
||||
{
|
||||
echo '<a href="#r-' . $i . '">' . $text . '</a><br />';
|
||||
@@ -241,6 +429,26 @@ if(isset($_REQUEST['regression_detector']))
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isset($_REQUEST['show_errors']))
|
||||
{
|
||||
$export_errors = file_get_contents(PATH_TO_EXPORTED_PHOROMATIC_DATA . 'export-test-errors.json');
|
||||
$export_errors = json_decode($export_errors, true);
|
||||
|
||||
if(isset($export_errors['phoromatic'][$REQUESTED]))
|
||||
{
|
||||
echo '<hr /><h2>Build / Runtime Errors</h2>';
|
||||
foreach($export_errors['phoromatic'][$REQUESTED] as &$error)
|
||||
{
|
||||
echo '<p><strong style="font-weight: 600;">' . $error['system'] . ' - ' . $error['trigger'] . ' - ' . $error['test'] . ' - ' . $error['test_description'] . ':</strong> ' . $error['error'] . '</p>';
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isset($_REQUEST['result_overview_table']) || $result_file->get_test_count() < 10)
|
||||
{
|
||||
$intent = null;
|
||||
$table = new pts_ResultFileTable($result_file, $intent);
|
||||
echo '<p style="text-align: center; overflow: auto;" class="result_object">' . pts_render::render_graph_inline_embed($table, $result_file, $extra_attributes) . '</p>';
|
||||
}
|
||||
|
||||
echo '<div id="pts_results_area">';
|
||||
foreach($result_file->get_result_objects((isset($_REQUEST['show_only_changed_results']) ? 'ONLY_CHANGED_RESULTS' : -1), true) as $i => $result_object)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user