Commit 6bd97b8e authored by Ondrej Sury's avatar Ondrej Sury

New upstream version 1.4.2

parent c35dc833

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

.PHONY: coverage testclean package package.xml
DATE=`date +%Y-%m-%d--%H-%M-%S`
MONGODB_VERSION=$(shell php -n -dextension=modules/mongodb.so -r 'echo MONGODB_VERSION;')
MONGODB_MINOR=$(shell echo $(MONGODB_VERSION) | cut -d. -f1,2)
MONGODB_STABILITY=$(shell php -n -dextension=modules/mongodb.so -r 'echo MONGODB_STABILITY;')
help:
@echo -e "\t$$ make vm"
@echo -e "\t - Launches VMs for running multiple MongoDB variations"
@echo -e "\t$$ make list-servers"
@echo -e "\t - Lists running servers, and their URIs"
@echo -e "\t$$ make test-bootstrap"
@echo -e "\t - Starts up MongoDB through mongo-orchestration"
@echo ""
@echo -e "\t$$ make coveralls"
@echo -e "\t - Creates code coverage report using coveralls"
@echo -e "\t$$ make coverage"
@echo -e "\t - Creates code coverage report using gcov"
@echo ""
@echo -e "\t$$ make distcheck"
@echo -e "\t - Builds the archive, runs the virtual tests"
@echo ""
@echo -e "\t$$ make package.xml"
@echo -e "\t - Creates a package.xml file with empty release notes"
@echo -e "\t$$ make package"
@echo -e "\t - Creates the pecl archive to use for provisioning"
@echo -e "\t$$ make test-virtual"
@echo -e "\t - Provisions some VMs, installs the pecl archive and executes the tests"
mv-coverage:
@if test -e $(top_srcdir)/coverage; then \
echo "Moving previous coverage run to coverage-$(DATE)"; \
mv coverage coverage-$(DATE); \
fi
lcov-coveralls:
lcov --gcov-tool $(top_srcdir)/.llvm-cov.sh --capture --directory . --output-file .coverage.lcov --no-external
lcov-local:
lcov --gcov-tool $(top_srcdir)/.llvm-cov.sh --capture --derive-func-data --directory . --output-file .coverage.lcov --no-external
coverage: mv-coverage lcov-local
genhtml .coverage.lcov --legend --title "mongodb code coverage" --output-directory coverage
coveralls: mv-coverage lcov-coveralls
coveralls --exclude src/libbson --exclude src/libmongoc --exclude src/contrib --exclude lib --exclude tests
vm:
@command -v vagrant >/dev/null 2>&1 || { echo >&2 "Vagrant needs to be installed to run vms"; exit 1; }
@vagrant up ldap mo
list-servers:
php scripts/list-servers.php
test-bootstrap:
php scripts/start-servers.php
distcheck: package test-virtual
test-virtual: package
sh ./scripts/run-tests-on.sh freebsd
sh ./scripts/run-tests-on.sh precise32
sh ./scripts/run-tests-on.sh precise64
testclean:
@for group in generic standalone; do \
find $(top_srcdir)/tests/$$group -type f -name "*.diff" -o -name "*.exp" -o -name "*.log" -o -name "*.mem" -o -name "*.out" -o -name "*.php" -o -name "*.sh" | xargs rm -f; \
done;
package:
pecl package package.xml
package.xml:
php bin/prep-release.php $(MONGODB_VERSION) $(MONGODB_STABILITY)
# -*- mode: ruby -*-
# vi: set ft=ruby et sw=2 :
Vagrant.configure(2) do |config|
config.vm.synced_folder ".", "/phongo"
config.vm.provider "vmware_workstation" do |vmware, override|
vmware.vmx["memsize"] = "8192"
vmware.vmx["numvcpus"] = "2"
end
config.vm.provider "virtualbox" do |virtualbox|
virtualbox.memory = 2048
virtualbox.cpus = 2
end
config.vm.define "mo", primary: true do |mo|
mo.vm.network "private_network", ip: "192.168.112.10"
mo.vm.box = "http://files.vagrantup.com/precise64.box"
mo.vm.provider "vmware_workstation" do |vmware, override|
override.vm.box_url = 'http://files.vagrantup.com/precise64_vmware.box'
override.vm.provision "shell", path: "scripts/vmware/kernel.sh", privileged: true
end
mo.vm.provision "shell", path: "scripts/ubuntu/essentials.sh", privileged: true
mo.vm.provision "file", source: "scripts/ubuntu/mongo-orchestration-config.json", destination: "mongo-orchestration-config.json"
mo.vm.provision "shell", path: "scripts/ubuntu/mongo-orchestration.sh", privileged: true
mo.vm.provision "shell", path: "scripts/ubuntu/ldap/install.sh", privileged: true
end
config.vm.define "ldap", autostart: false do |ldap|
ldap.vm.network "private_network", ip: "192.168.112.20"
ldap.vm.box = "http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box"
ldap.vm.provider "vmware_workstation" do |vmware, override|
override.vm.box_url = "https://dl.dropbox.com/u/5721940/vagrant-boxes/vagrant-centos-6.4-x86_64-vmware_fusion.box"
override.vm.provision "shell", path: "scripts/vmware/kernel.sh", privileged: true
end
ldap.vm.provision "shell", path: "scripts/centos/essentials.sh", privileged: true
ldap.vm.provision "shell", path: "scripts/centos/ldap/install.sh", privileged: true
end
config.vm.define "freebsd", autostart: false do |bsd|
bsd.vm.network "private_network", ip: "192.168.112.30"
bsd.vm.box = "geoffgarside/freebsd-10.0"
bsd.vm.provision "shell", path: "scripts/freebsd/essentials.sh", privileged: true
bsd.vm.provision "file", source: "/tmp/PHONGO-SERVERS.json", destination: "/tmp/PHONGO-SERVERS.json"
bsd.vm.provision "file", source: "scripts/configs/.gdbinit", destination: "/home/vagrant/.gdbinit"
bsd.vm.provision "shell", path: "scripts/freebsd/phongo.sh", privileged: true
bsd.vm.synced_folder ".", "/phongo", :nfs => true, id: "vagrant-root"
end
config.vm.define "precise64" do |linux|
linux.vm.network "private_network", ip: "192.168.112.40"
linux.vm.box = "http://files.vagrantup.com/precise64.box"
linux.vm.provider "vmware_workstation" do |vmware, override|
override.vm.box_url = 'http://files.vagrantup.com/precise64_vmware.box'
override.vm.provision "shell", path: "scripts/vmware/kernel.sh", privileged: true
end
linux.vm.provision "shell", path: "scripts/ubuntu/essentials.sh", privileged: true
linux.vm.provision "file", source: "/tmp/PHONGO-SERVERS.json", destination: "/tmp/PHONGO-SERVERS.json"
linux.vm.provision "file", source: "scripts/configs/.gdbinit", destination: "/home/vagrant/.gdbinit"
linux.vm.provision "shell", path: "scripts/ubuntu/phongo.sh", privileged: true
end
config.vm.define "precise32" do |linux|
linux.vm.network "private_network", ip: "192.168.112.50"
linux.vm.box = "bjori/precise32"
linux.vm.provider "vmware_workstation" do |vmware, override|
override.vm.box_url = "bjori/precise32"
override.vm.provision "shell", path: "scripts/vmware/kernel.sh", privileged: true
end
linux.vm.provision "shell", path: "scripts/ubuntu/essentials.sh", privileged: true
linux.vm.provision "file", source: "/tmp/PHONGO-SERVERS.json", destination: "/tmp/PHONGO-SERVERS.json"
linux.vm.provision "file", source: "scripts/configs/.gdbinit", destination: "/home/vagrant/.gdbinit"
linux.vm.provision "shell", path: "scripts/ubuntu/phongo.sh", privileged: true
end
end
This diff is collapsed.
This diff is collapsed.
/*
* Copyright 2015-2017 MongoDB, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef PHONGO_COMPAT_H
#define PHONGO_COMPAT_H
#include <php.h>
#include <Zend/zend_string.h>
#if PHP_VERSION_ID >= 70000
#include <Zend/zend_portability.h>
#endif
#ifdef PHP_WIN32
# include "config.w32.h"
#else
# include <php_config.h>
#endif
#ifndef PHP_FE_END
# define PHP_FE_END { NULL, NULL, NULL }
#endif
#ifndef HASH_KEY_NON_EXISTENT
# define HASH_KEY_NON_EXISTENT HASH_KEY_NON_EXISTANT
#endif
#if PHP_VERSION_ID >= 70000
# define str_efree(s) efree((char*)s)
#else
# include <Zend/zend_string.h>
#endif
#if defined(__GNUC__)
# define ARG_UNUSED __attribute__ ((unused))
#else
# define ARG_UNUSED
#endif
#if PHP_VERSION_ID >= 70000
# defin