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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ Makefile
Makefile.fragments
Makefile.objects

# Do not ignore non-generated Makefile
!tests/integration/Makefile

# Directories for shared object files generated by `./configure`
libs/
modules/
Expand Down
38 changes: 38 additions & 0 deletions tests/integration/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# The goal of this Makefile is to be a single entry point for non-phpt tests.

PHP ?= $(CURDIR)/../../sapi/cli/php
# "Windows NT", "Linux", "FreeBSD", "Darwin", ...
OS ?= $(shell $(PHP) -r "echo php_uname('s');")

INT_SIZE ?= $(shell $(PHP) -r "echo PHP_INT_SIZE;")
ifndef CPU
CPU ?= $(shell $(PHP) -r "echo php_uname('m');")
ifeq ($(filter $(CPU),AMD64 amd64),$(CPU))
CPU := x86_64
else ifeq ($(filter $(CPU),i386 i686),$(CPU))
CPU := x86
endif
ifeq ($(CPU)_$(INT_SIZE),x86_64_4)
CPU := x86
endif
endif # ifndef CPU

ZTS ?= $(shell $(PHP) -r "echo (int)PHP_ZTS;")
ASAN ?= 0
MSAN ?= 0

all: print-env test

print-env:
@echo "PHP: $(PHP)"
@echo "OS: $(OS)"
@echo "ZTS: $(ZTS)"
@echo "ASAN: $(ASAN)"
@echo "MSAN: $(MSAN)"

test:
ifeq ($(filter $(OS),Linux Darwin FreeBSD),$(OS))
ifeq ($(ZTS),1)
$(MAKE) -f Makefile.tls PHP=$(PHP) OS=$(OS) ZTS=$(ZTS) ASAN=$(ASAN) MSAN=$(MSAN) CPU=$(CPU)
endif
endif
19 changes: 19 additions & 0 deletions tests/integration/Makefile.tls
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

TESTDIR:=$(CURDIR)/../../ext/opcache/jit/tls/testing

ifeq ($(OS),Darwin)
TLSC := $(CURDIR)/../../ext/opcache/jit/tls/zend_jit_tls_darwin.c
else ifeq ($(CPU),x86_64)
TLSC := $(CURDIR)/../../ext/opcache/jit/tls/zend_jit_tls_x86_64.c
else ifeq ($(CPU),x86)
TLSC := $(CURDIR)/../../ext/opcache/jit/tls/zend_jit_tls_x86.c
else ifeq ($(CPU),aarch64)
TLSC := $(CURDIR)/../../ext/opcache/jit/tls/zend_jit_tls_aarch64.c
endif

ifeq ($(CPU),x86)
MACHINE:=-m32
endif

test:
TLSC=$(TLSC) MACHINE=$(MACHINE) $(CURDIR)/../../ext/opcache/jit/tls/testing/test.sh
Loading