File: 0003-Adapt-Makefile-for-partial-RingPHP-sources.patch

package info (click to toggle)
php-guzzlehttp 5.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,560 kB
  • ctags: 2,519
  • sloc: php: 11,610; makefile: 182; python: 22; sh: 6
file content (30 lines) | stat: -rw-r--r-- 794 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Tue, 14 Oct 2014 18:03:19 -0400
Subject: Adapt Makefile for partial RingPHP sources

---
 Makefile | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 702594c..72b5979 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,14 @@
 all: clean coverage docs
 
-start-server:
-	cd vendor/guzzlehttp/ringphp && make start-server
+start-server: stop-server
+	nodejs vendor/guzzlehttp/ringphp/tests/Client/server.js &> /dev/null &
 
 stop-server:
-	cd vendor/guzzlehttp/ringphp && make stop-server
+	@PID=$(shell ps axo pid,command \
+	  | grep 'tests/Client/server.js' \
+	  | grep -v grep \
+	  | cut -f 1 -d " "\
+	) && [ -n "$$PID" ] && kill $$PID || true
 
 test: start-server
 	phpunit