@@ -169,10 +169,13 @@ pushd "features_per_compiler"
169
169
# Test 15: Development profile (debug + verbose)
170
170
echo " Test 15: Features per compiler - development profile"
171
171
rm -rf build
172
- if " $fpm " run --profile development > output.txt; then
172
+ if " $fpm " run --profile development > output.txt 2>&1 ; then
173
173
echo " ✓ Exit code 0 (success) as expected"
174
174
else
175
175
echo " ERROR: Expected exit code 0 but got non-zero exit code"
176
+ echo " === Program output ==="
177
+ cat output.txt
178
+ echo " ======================"
176
179
exit 1
177
180
fi
178
181
grep -q " Features Per Compiler Demo" output.txt || { echo " ERROR: Features Per Compiler Demo not found" ; exit 1; }
@@ -189,10 +192,13 @@ echo "✓ Development profile works"
189
192
# Test 16: Production profile (release + fast)
190
193
echo " Test 16: Features per compiler - production profile"
191
194
rm -rf build
192
- if " $fpm " run --profile production > output.txt; then
195
+ if " $fpm " run --profile production > output.txt 2>&1 ; then
193
196
echo " ✓ Exit code 0 (success) as expected"
194
197
else
195
198
echo " ERROR: Expected exit code 0 but got non-zero exit code"
199
+ echo " === Program output ==="
200
+ cat output.txt
201
+ echo " ======================"
196
202
exit 1
197
203
fi
198
204
grep -q " Features Per Compiler Demo" output.txt || { echo " ERROR: Features Per Compiler Demo not found" ; exit 1; }
@@ -213,10 +219,13 @@ echo "✓ Production profile works"
213
219
# Test 17: Testing profile (debug + strict)
214
220
echo " Test 17: Features per compiler - testing profile"
215
221
rm -rf build
216
- if " $fpm " run --profile testing > output.txt; then
222
+ if " $fpm " run --profile testing > output.txt 2>&1 ; then
217
223
echo " ✓ Exit code 0 (success) as expected"
218
224
else
219
225
echo " ERROR: Expected exit code 0 but got non-zero exit code"
226
+ echo " === Program output ==="
227
+ cat output.txt
228
+ echo " ======================"
220
229
exit 1
221
230
fi
222
231
grep -q " Features Per Compiler Demo" output.txt || { echo " ERROR: Features Per Compiler Demo not found" ; exit 1; }
@@ -232,10 +241,13 @@ echo "✓ Testing profile works"
232
241
# Test 18: Individual features - debug only
233
242
echo " Test 18: Features per compiler - debug feature only"
234
243
rm -rf build
235
- if " $fpm " run --features debug > output.txt; then
244
+ if " $fpm " run --features debug > output.txt 2>&1 ; then
236
245
echo " ✓ Exit code 0 (success) as expected"
237
246
else
238
247
echo " ERROR: Expected exit code 0 but got non-zero exit code"
248
+ echo " === Program output ==="
249
+ cat output.txt
250
+ echo " ======================"
239
251
exit 1
240
252
fi
241
253
grep -q " Features Per Compiler Demo" output.txt || { echo " ERROR: Features Per Compiler Demo not found" ; exit 1; }
@@ -251,10 +263,13 @@ echo "✓ Debug feature works"
251
263
# Test 19: Individual features - release only
252
264
echo " Test 19: Features per compiler - release feature only"
253
265
rm -rf build
254
- if " $fpm " run --features release > output.txt; then
266
+ if " $fpm " run --features release > output.txt 2>&1 ; then
255
267
echo " ✓ Exit code 0 (success) as expected"
256
268
else
257
269
echo " ERROR: Expected exit code 0 but got non-zero exit code"
270
+ echo " === Program output ==="
271
+ cat output.txt
272
+ echo " ======================"
258
273
exit 1
259
274
fi
260
275
grep -q " Features Per Compiler Demo" output.txt || { echo " ERROR: Features Per Compiler Demo not found" ; exit 1; }
@@ -270,10 +285,13 @@ echo "✓ Release feature works"
270
285
# Test 20: No profile/features - baseline
271
286
echo " Test 20: Features per compiler - baseline (no profile)"
272
287
rm -rf build
273
- if " $fpm " run > output.txt; then
288
+ if " $fpm " run > output.txt 2>&1 ; then
274
289
echo " ✓ Exit code 0 (success) as expected"
275
290
else
276
291
echo " ERROR: Expected exit code 0 but got non-zero exit code"
292
+ echo " === Program output ==="
293
+ cat output.txt
294
+ echo " ======================"
277
295
exit 1
278
296
fi
279
297
grep -q " Features Per Compiler Demo" output.txt || { echo " ERROR: Features Per Compiler Demo not found" ; exit 1; }
0 commit comments