Skip to content

Commit 9754514

Browse files
committed
Remove Dockerfile for CentOS PHP ZTS and update paths for FrankenPHP binary in Ubuntu and CentOS workflows to ensure consistent installation location.
1 parent 1faaeb1 commit 9754514

File tree

5 files changed

+45
-226
lines changed

5 files changed

+45
-226
lines changed

.devcontainer/centos_php_test_zts/Dockerfile

Lines changed: 0 additions & 200 deletions
This file was deleted.

.github/workflows/Dockerfile.centos-php-test-zts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/usr-local-lib.conf && \
150150

151151
COPY frankenphp-binary/ /tmp/frankenphp-binary/
152152
RUN if [ -f /tmp/frankenphp-binary/frankenphp ]; then \
153-
cp /tmp/frankenphp-binary/frankenphp /usr/local/bin/frankenphp && \
154-
chmod +x /usr/local/bin/frankenphp && \
153+
cp /tmp/frankenphp-binary/frankenphp /usr/bin/frankenphp && \
154+
chmod +x /usr/bin/frankenphp && \
155155
mkdir -p /etc/frankenphp/caddy.d && \
156156
mkdir -p /etc/frankenphp/php.d && \
157157
mkdir -p /usr/lib/frankenphp/modules; \

.github/workflows/Dockerfile.ubuntu-php-test-zts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,12 @@ RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/usr-local-lib.conf && \
143143

144144
COPY frankenphp-binary/ /tmp/frankenphp-binary/
145145
RUN if [ -f /tmp/frankenphp-binary/frankenphp ]; then \
146-
cp /tmp/frankenphp-binary/frankenphp /usr/local/bin/frankenphp && \
147-
chmod +x /usr/local/bin/frankenphp && \
148-
mkdir -p /etc/frankenphp/caddy.d && \
149-
mkdir -p /etc/frankenphp/php.d && \
150-
mkdir -p /usr/lib/frankenphp/modules; \
151-
fi
146+
cp /tmp/frankenphp-binary/frankenphp /usr/bin/frankenphp && \
147+
chmod +x /usr/bin/frankenphp && \
148+
mkdir -p /etc/frankenphp/caddy.d && \
149+
mkdir -p /etc/frankenphp/php.d && \
150+
mkdir -p /usr/lib/frankenphp/modules; \
151+
fi
152152

153153

154154
RUN EXTENSION_DIR=$(php -i | grep "^extension_dir" | awk '{print $3}') && \

tools/server_tests/frankenphp_classic/main.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,26 @@ def frankenphp_classic_pre_tests(tests_data):
6262
for test_data in tests_data:
6363
f.write("\n" + test_data["site_block"])
6464

65-
subprocess.Popen(
66-
[frankenphp_bin, 'run', '--config', caddyfile_path]
67-
)
68-
time.sleep(20)
69-
70-
result = subprocess.run(['pgrep', '-x', 'frankenphp'], capture_output=True, text=True)
71-
if not result.stdout.strip():
72-
raise RuntimeError("FrankenPHP classic failed to start!")
65+
print(f"Caddyfile prepared for {len(tests_data)} tests with {threads} threads")
7366

7467
def frankenphp_classic_start_server(test_data, test_lib_dir, valgrind):
68+
result = subprocess.run(['pgrep', '-x', 'frankenphp'], capture_output=True, text=True)
69+
70+
if not result.stdout.strip():
71+
print("Starting FrankenPHP classic server...")
72+
process = subprocess.Popen(
73+
[frankenphp_bin, 'run', '--config', caddyfile_path]
74+
)
75+
time.sleep(2)
76+
77+
result = subprocess.run(['pgrep', '-x', 'frankenphp'], capture_output=True, text=True)
78+
if not result.stdout.strip():
79+
raise RuntimeError("FrankenPHP classic failed to spawn!")
80+
81+
print("FrankenPHP classic process started")
82+
else:
83+
print("FrankenPHP classic is already running")
84+
7585
return None
7686

7787
def frankenphp_classic_uninit():

tools/server_tests/frankenphp_worker/main.py

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,26 +128,35 @@ def frankenphp_worker_pre_tests(tests_data):
128128

129129
total_workers = len(tests_data)
130130
threads = total_workers * 3
131-
131+
132132
with open(caddyfile_path, 'w') as f:
133133
base_template = get_caddyfile_base_template()
134134
if base_template:
135135
f.write(base_template.format(num_threads=threads, max_threads=threads*2))
136136
for test_data in tests_data:
137137
f.write("\n" + test_data["site_block"])
138138

139-
process = subprocess.Popen(
140-
[frankenphp_bin, 'run', '--config', caddyfile_path]
141-
)
142-
time.sleep(20)
143-
139+
print(f"Caddyfile prepared for {len(tests_data)} tests with {threads} threads")
140+
return threads
141+
142+
def frankenphp_worker_start_server(test_data, test_lib_dir, valgrind):
144143
result = subprocess.run(['pgrep', '-x', 'frankenphp'], capture_output=True, text=True)
144+
145145
if not result.stdout.strip():
146-
raise RuntimeError("FrankenPHP worker failed to start!")
146+
print("Starting FrankenPHP worker server...")
147+
process = subprocess.Popen(
148+
[frankenphp_bin, 'run', '--config', caddyfile_path]
149+
)
150+
time.sleep(2)
151+
152+
result = subprocess.run(['pgrep', '-x', 'frankenphp'], capture_output=True, text=True)
153+
if not result.stdout.strip():
154+
raise RuntimeError("FrankenPHP worker failed to spawn!")
155+
156+
print("FrankenPHP worker process started")
157+
else:
158+
print("FrankenPHP worker is already running")
147159

148-
print(f"FrankenPHP worker started with {threads} threads for {len(tests_data)} tests")
149-
150-
def frankenphp_worker_start_server(test_data, test_lib_dir, valgrind):
151160
return None
152161

153162
def frankenphp_worker_uninit():

0 commit comments

Comments
 (0)