Skip to content

Commit c57dbe7

Browse files
committed
modify: 新增 backtracePoint 函数获取调用回溯点
1 parent cb0f425 commit c57dbe7

9 files changed

Lines changed: 384 additions & 199 deletions

File tree

Makefile

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,29 @@
1-
# 单元测试运行镜像
2-
RUNTIME_IMAGE := anoxia/php-swoole:7.4-alpine3.12
3-
4-
OS := $(shell uname | awk '{print tolower($$0)}')
5-
MACHINE := $(shell uname -m)
6-
7-
# 基础路径
8-
BASE_DIR := $(shell pwd)
9-
101
.PHONY: help
112
## help: 打印帮助信息
123
help:
134
@echo "使用说明:"
145
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed 's/^/ /'
156

16-
## dev: 启动本地开发环境
17-
.PHONY: dev
18-
dev:
19-
@watchexec -w src -w tests make unit-test
7+
## tests: 单元测试
8+
.PHONY: tests
9+
tests: info
10+
@watchexec -w src -w tests sh tests/make.sh tests
2011

21-
## unit-test: 单元测试
22-
.PHONY: unit-test
23-
unit-test: info
24-
@docker run --rm -v `pwd`:/app $(RUNTIME_IMAGE) sh /app/tests/run.sh
12+
## cs: 代码优化
13+
.PHONY: cs
14+
cs: info
15+
@echo '> Code style format'
16+
@sh tests/make.sh cs
2517

18+
## custom: 自定义命令,例如 composer
19+
.PHONY: custom
20+
custom: info
21+
@sh tests/make.sh custom
22+
23+
# 打印环境信息
2624
info:
2725
@echo "> 环境信息"
28-
@echo 'basedir:' $(BASE_DIR)
29-
@echo 'os: ' $(OS)
30-
@echo 'arch: ' $(MACHINE)
26+
@echo 'basedir:' $(shell pwd)
27+
@echo 'os: ' $(shell uname | awk '{print tolower($$0)}')
28+
@echo 'arch: ' $(shell uname -m)
3129
@echo ""
32-

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"require-dev": {
1111
"phpunit/phpunit": "^9.5",
1212
"friendsofphp/php-cs-fixer": "^3.11",
13+
"sempro/phpunit-pretty-print": "^1.4",
1314
"vimeo/psalm": "^4.27"
1415
},
1516
"autoload": {

0 commit comments

Comments
 (0)