Add all files needed to bring up VM and run agaric.com locally

This commit is contained in:
benjamin melançon 2018-08-20 10:45:20 -04:00
parent 52c8b60bac
commit 4d2bc0ee24
742 changed files with 24037 additions and 0 deletions

View file

@ -0,0 +1,4 @@
---
- src: geerlingguy.repo-remi
- src: geerlingguy.repo-dotdeb
- src: geerlingguy.php

View 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

View file

@ -0,0 +1,50 @@
<?php
/**
* @file
* Test if Tideways is available and working.
*/
$tideways_root_dir = '/usr/share/php';
$xhprof_root_dir = '/usr/share/php';
$success = TRUE;
tideways_enable();
$data = tideways_disable();
if (isset($data['main()==>tideways_disable'])) {
print "Tideways profiling working.\r\n";
}
else {
print "Tideways 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';
$output_dir = sys_get_temp_dir();
$xhprof_runs = new XHProfRuns_Default($output_dir);
$run_id = $xhprof_runs->save_run($data, 'xhprof_testing');
$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);
}