Add all files needed to bring up VM and run agaric.com locally
This commit is contained in:
parent
52c8b60bac
commit
4d2bc0ee24
742 changed files with 24037 additions and 0 deletions
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
- src: geerlingguy.repo-remi
|
||||
- src: geerlingguy.repo-dotdeb
|
||||
- src: geerlingguy.php
|
31
box/provisioning/roles/geerlingguy.php-xhprof/tests/test.yml
Normal file
31
box/provisioning/roles/geerlingguy.php-xhprof/tests/test.yml
Normal file
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
- hosts: all
|
||||
|
||||
vars:
|
||||
php_enable_webserver: false
|
||||
php_enablerepo: "remi,remi-php70"
|
||||
|
||||
pre_tasks:
|
||||
- name: Update apt cache.
|
||||
apt: update_cache=yes cache_valid_time=600
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: Set php_packages for PHP 7.0 Debian 8 install.
|
||||
set_fact:
|
||||
php_packages:
|
||||
- php7.0-common
|
||||
- php7.0-cli
|
||||
- php7.0-dev
|
||||
- php7.0-fpm
|
||||
- libpcre3-dev
|
||||
- php7.0-opcache
|
||||
- php7.0-apcu
|
||||
when: ansible_distribution == 'Debian'
|
||||
|
||||
roles:
|
||||
- role: geerlingguy.repo-remi
|
||||
when: ansible_os_family == 'RedHat'
|
||||
- role: geerlingguy.repo-dotdeb
|
||||
when: ansible_distribution == 'Debian'
|
||||
- geerlingguy.php
|
||||
- role_under_test
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Test if XHProf is available and working.
|
||||
*/
|
||||
|
||||
$xhprof_root_dir = '/usr/share/php';
|
||||
$success = TRUE;
|
||||
|
||||
xhprof_enable();
|
||||
$data = xhprof_disable();
|
||||
|
||||
if (isset($data['main()==>xhprof_disable'])) {
|
||||
print "XHProf profiling working.\r\n";
|
||||
}
|
||||
else {
|
||||
print "XHProf profiling not working.\r\n";
|
||||
$success = FALSE;
|
||||
}
|
||||
|
||||
include $xhprof_root_dir . '/xhprof_lib/utils/xhprof_lib.php';
|
||||
include $xhprof_root_dir . '/xhprof_lib/utils/xhprof_runs.php';
|
||||
|
||||
$xhprof_runs = new XHProfRuns_Default();
|
||||
$run_id = $xhprof_runs->save_run($data, "xhprof_testing");
|
||||
$output_dir = ini_get("xhprof.output_dir");
|
||||
$filename = "$output_dir/$run_id.xhprof_testing.xhprof";
|
||||
|
||||
if (file_exists($filename)) {
|
||||
print "XHProf PHP library writing to output directory.\r\n";
|
||||
}
|
||||
else {
|
||||
print "XHProf PHP library not working.\r\n";
|
||||
$success = FALSE;
|
||||
}
|
||||
|
||||
ob_start();
|
||||
include $xhprof_root_dir . '/xhprof_html/index.php';
|
||||
$html = ob_get_clean();
|
||||
if (strpos($html, "?run=$run_id") !== FALSE) {
|
||||
print "XHProf UI working.\r\n";
|
||||
}
|
||||
else {
|
||||
print "XHProf UI not working.\r\n";
|
||||
$success = FALSE;
|
||||
}
|
||||
|
||||
if (!$success) {
|
||||
exit(1);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue