1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 2001-2024 Free Software Foundation, Inc.
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2, or (at your option)
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ## GNU General Public License for more details.
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program. If not, see <https://www.gnu.org/licenses/>.
17 am__tty_colors_dummy = \
18 mgn= red= grn= lgn= blu= brg= std=; \
22 $(am__tty_colors_dummy); \
23 if test "X$(AM_COLOR_TESTS)" = Xno; then \
25 elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
26 am__color_tests=yes; \
27 ## If stdout is a non-dumb tty, use colors. If test -t is not supported,
28 ## then this check fails; a conservative approach. Of course do not
29 ## redirect stdout here, just stderr.
30 elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
31 am__color_tests=yes; \
33 if test $$am__color_tests = yes; then \
50 ## New parallel test driver.
52 ## The first version of the code here was adapted from check.mk, which was
53 ## originally written at EPITA/LRDE, further developed at Gostai, then made
54 ## its way from GNU coreutils to end up, largely rewritten, in Automake.
55 ## The current version is an heavy rewrite of that, to allow for support
56 ## of more test metadata, and the use of custom test drivers and protocols
59 am__recheck_rx = ^[ ]*:recheck:[ ]*
60 am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
61 am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
63 # A command that, given a newline-separated list of test names on the
64 # standard input, print the name of the tests that are to be re-run
65 # upon "make recheck".
66 am__list_recheck_tests = $(AWK) '{ \
67 ## By default, we assume the test is to be re-run.
69 while ((rc = (getline line < ($$0 ".trs"))) != 0) \
73 ## If we've encountered an I/O error here, there are three possibilities:
75 ## [1] The '.log' file exists, but the '.trs' does not; in this case,
76 ## we "gracefully" recover by assuming the corresponding test is
77 ## to be re-run (which will re-create the missing '.trs' file).
79 ## [2] Both the '.log' and '.trs' files are missing; this means that
80 ## the corresponding test has not been run, and is thus *not* to
83 ## [3] We have encountered some corner-case problem (e.g., a '.log' or
84 ## '.trs' files somehow made unreadable, or issues with a bad NFS
85 ## connection, or whatever); we don't handle such corner cases.
87 if ((getline line2 < ($$0 ".log")) < 0) \
91 else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
92 ## A directive explicitly specifying the test is *not* to be re-run.
97 else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
99 ## A directive explicitly specifying the test *is* to be re-run.
102 ## else continue with the next iteration.
106 ## Don't leak open file descriptors, as this could cause serious
107 ## problems when there are many tests (yes, even on Linux).
108 close ($$0 ".trs"); \
109 close ($$0 ".log"); \
112 # A command that, given a newline-separated list of test names on the
113 # standard input, create the global log from their .trs and .log files.
114 am__create_global_log = $(AWK) ' \
115 function fatal(msg) \
117 print "fatal: making $@: " msg | "cat >&2"; \
120 function rst_section(header) \
123 len = length(header); \
124 for (i = 1; i <= len; i = i + 1) \
129 ## By default, we assume the test log is to be copied in the global log,
130 ## and that its result is simply "RUN" (i.e., we still don't know what
131 ## it outcome was, but we know that at least it has run).
132 copy_in_global_log = 1; \
133 global_test_result = "RUN"; \
134 while ((rc = (getline line < ($$0 ".trs"))) != 0) \
137 fatal("failed to read from " $$0 ".trs"); \
138 if (line ~ /$(am__global_test_result_rx)/) \
140 sub("$(am__global_test_result_rx)", "", line); \
141 sub("[ ]*$$", "", line); \
142 global_test_result = line; \
144 else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
145 copy_in_global_log = 0; \
147 if (copy_in_global_log) \
149 rst_section(global_test_result ": " $$0); \
150 while ((rc = (getline line < ($$0 ".log"))) != 0) \
153 fatal("failed to read from " $$0 ".log"); \
158 ## Don't leak open file descriptors, as this could cause serious
159 ## problems when there are many tests (yes, even on Linux).
160 close ($$0 ".trs"); \
161 close ($$0 ".log"); \
164 # Restructured Text title.
165 am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
167 # Solaris 10 'make', and several other traditional 'make' implementations,
168 # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
169 # by disabling -e (using the XSI extension "set +e") if it's set.
170 am__sh_e_setup = case $$- in *e*) set +e;; esac
172 # Default flags passed to test drivers.
173 am__common_driver_flags = \
174 --color-tests "$$am__color_tests" \
175 $$am__collect_skipped_logs \
176 --enable-hard-errors "$$am__enable_hard_errors" \
177 --expect-failure "$$am__expect_failure"
179 # To be inserted before the command running the test. Creates the
180 # directory for the log if needed. Stores in $dir the directory
181 # containing $f, in $tst the test, in $log the log. Executes the
182 # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
183 # passes TESTS_ENVIRONMENT. Set up options for the wrapper that
184 # will run the test scripts (or their associated LOG_COMPILER, if
188 $(am__vpath_adj_setup) $(am__vpath_adj) \
190 srcdir=$(srcdir); export srcdir; \
192 */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
195 test "x$$am__odir" = x"." || test -d "$$am__odir" \
196 || $(MKDIR_P) "$$am__odir" || exit $$?; \
197 if test -f "./$$f"; then dir=./; \
198 elif test -f "$$f"; then dir=; \
199 else dir="$(srcdir)/"; fi; \
200 tst=$$dir$$f; log='$@'; \
201 if test -n '$(IGNORE_SKIPPED_LOGS)'; then \
202 am__collect_skipped_logs='--collect-skipped-logs no'; \
204 am__collect_skipped_logs=''; \
206 if test -n '$(DISABLE_HARD_ERRORS)'; then \
207 am__enable_hard_errors=no; \
209 am__enable_hard_errors=yes; \
211 ## The use of $dir below is required to account for VPATH
212 ## rewriting done by Sun make.
213 case " $(XFAIL_TESTS) " in \
214 *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
215 am__expect_failure=yes;; \
217 am__expect_failure=no;; \
219 $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
221 # A shell command to get the names of the tests scripts with any registered
222 # extension removed (i.e., equivalently, the names of the test logs, with
223 # the '.log' extension removed). The result is saved in the shell variable
224 # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
225 # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
226 # since that might cause problem with VPATH rewrites for suffix-less tests.
227 # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
228 am__set_TESTS_bases = \
229 bases='$(TEST_LOGS)'; \
230 bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
231 ## Trim away any extra whitespace. This has already proved useful
232 ## in avoiding weird bug on lesser make implementations. It also
233 ## works around the GNU make 3.80 bug where trailing whitespace in
234 ## "TESTS = foo.test $(empty)" causes $(TESTS_LOGS) to erroneously
235 ## expand to "foo.log .log".
238 # Recover from deleted '.trs' file; this should ensure that
239 # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
240 # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
241 # to avoid problems with "make -n".
244 $(MAKE) $(AM_MAKEFLAGS) $<
246 # Leading 'am--fnord' is there to ensure the list of targets does not
247 # expand to empty, as could happen e.g. with make check TESTS=''.
248 am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
252 ## Exists only to be overridden. See bug#11745.
253 AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
256 $(TEST_SUITE_LOG): $(TEST_LOGS)
257 @$(am__set_TESTS_bases); \
258 ## Helper shell function, tells whether a path refers to an existing,
259 ## regular, readable file.
260 am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
261 ## We need to ensures that all the required '.trs' and '.log' files will
262 ## be present and readable. The direct dependencies of $(TEST_SUITE_LOG)
263 ## only ensure that all the '.log' files exists; they don't ensure that
264 ## the '.log' files are readable, and worse, they don't ensure that the
265 ## '.trs' files even exist.
266 redo_bases=`for i in $$bases; do \
267 am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
269 if test -n "$$redo_bases"; then \
270 ## Uh-oh, either some '.log' files were unreadable, or some '.trs' files
271 ## were missing (or unreadable). We need to re-run the corresponding
272 ## tests in order to re-create them.
273 redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
274 redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
275 if $(am__make_dryrun); then :; else \
276 ## Break "rm -f" into two calls to minimize the possibility of exceeding
277 ## command line length limits.
278 rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
281 ## Use a trick to to ensure that we don't go into an infinite recursion
282 ## in case a test log in $(TEST_LOGS) is the same as $(TEST_SUITE_LOG).
283 ## Yes, this has already happened in practice. Sigh!
284 if test -n "$$am__remaking_logs"; then \
285 echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
286 "recursion detected" >&2; \
287 ## Invoking this unconditionally could cause a useless "make all" to
288 ## be invoked when '$redo_logs' expands to empty (automake bug#16302).
289 elif test -n "$$redo_logs"; then \
290 am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
292 if $(am__make_dryrun); then :; else \
293 ## Sanity check: each unreadable or non-existent test result file should
294 ## has been properly remade at this point, as should the corresponding log
297 errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
298 for i in $$redo_bases; do \
299 test -f $$i.trs && test -r $$i.trs \
300 || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
301 test -f $$i.log && test -r $$i.log \
302 || { echo "$$errmsg $$i.log" >&2; st=1; }; \
304 test $$st -eq 0 || exit 1; \
306 ## We need a new subshell to work portably with "make -n", since the
307 ## previous part of the recipe contained a $(MAKE) invocation.
308 @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
310 ## List of test result files.
311 results=`for b in $$bases; do echo $$b.trs; done`; \
312 test -n "$$results" || results=/dev/null; \
313 ## Prepare data for the test suite summary. These do not take into account
314 ## unreadable test results, but they'll be appropriately updated later if
316 all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
317 pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
318 fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
319 skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
320 xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
321 xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
322 error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
323 ## Whether the testsuite was successful or not.
324 if test `expr $$fail + $$xpass + $$error` -eq 0; then \
330 ## Make $br a line of exactly 76 '=' characters, which will be used to
331 ## enclose the testsuite summary report when displayed on the console.
332 br='==================='; br=$$br$$br$$br$$br; \
334 ## When writing the test summary to the console, we want to color a line
335 ## reporting the count of some result *only* if at least one test
336 ## experienced such a result. This function is handy in this regard.
339 if test x"$$1" = x"--maybe-color"; then \
340 maybe_colorize=yes; \
341 elif test x"$$1" = x"--no-color"; then \
344 echo "$@: invalid 'result_count' usage" >&2; exit 4; \
347 desc=$$1 count=$$2; \
348 if test $$maybe_colorize = yes && test $$count -gt 0; then \
349 color_start=$$3 color_end=$$std; \
351 color_start= color_end=; \
353 echo "$${color_start}# $$desc $$count$${color_end}"; \
356 ## A shell function that creates the testsuite summary. We need it
357 ## because we have to create *two* summaries, one for test-suite.log,
358 ## and a possibly-colorized one for console output.
359 create_testsuite_report () \
361 result_count $$1 "TOTAL:" $$all "$$brg"; \
362 result_count $$1 "PASS: " $$pass "$$grn"; \
363 result_count $$1 "SKIP: " $$skip "$$blu"; \
364 result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
365 result_count $$1 "FAIL: " $$fail "$$red"; \
366 result_count $$1 "XPASS:" $$xpass "$$red"; \
367 result_count $$1 "ERROR:" $$error "$$mgn"; \
370 ## Function to write some basic system info in the log.
371 output_system_information () \
373 ## Omit the hostname for privacy. Always a single word.
374 ## Start the line with a label for clarity, and so commands like
375 ## grep ^Linux don't get a false hit.
376 ## By the way, $(AWK) should always be defined since AC_PROG_AWK is
377 ## required by AM_INIT_AUTOMAKE nowadays.
379 { uname -a | $(AWK) '{ \
380 printf "System information (uname -a):"; \
381 for (i = 1; i < NF; ++i) \
388 if test -r /etc/os-release; then \
389 echo "Distribution information (/etc/os-release):"; \
390 sed 8q /etc/os-release; \
391 elif test -r /etc/issue; then \
392 echo "Distribution information (/etc/issue):"; \
397 ## Function to output the "please report bugs" message.
400 echo "Some test(s) failed. Please report this to $(PACKAGE_BUGREPORT),"; \
401 echo "together with the test-suite.log file (gzipped) and your system"; \
402 echo "information. Thanks."; \
406 ## Write "global" testsuite log.
408 echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
410 create_testsuite_report --no-color; \
411 output_system_information; \
413 ## What is this line for? It's a Sphinx reStructuredText directive that
414 ## would insert a table of contents that goes two levels deep on headings.
415 ## But why is it in test-suite.log? No other references to it are evident.
416 ## Please inform automake@gnu.org.
417 echo ".. contents:: :depth: 2"; \
419 for b in $$bases; do echo $$b; done \
420 | $(am__create_global_log); \
421 } >$(TEST_SUITE_LOG).tmp || exit 1; \
422 mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
423 ## Emit the test summary on the console.
428 test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
430 ## Multi line coloring is problematic with "less -R", so we really need
431 ## to color each line individually.
432 echo "$${col}$$br$${std}"; \
433 echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
434 echo "$${col}$$br$${std}"; \
435 ## This is expected to go to the console, so it might have to be colorized.
436 create_testsuite_report --maybe-color; \
437 echo "$$col$$br$$std"; \
438 if $$success; then :; else \
439 echo "$${col}See $(subdir)/$(TEST_SUITE_LOG) for debugging.$${std}";\
440 if test -n "$(PACKAGE_BUGREPORT)"; then \
441 please_report | sed -e "s/^/$${col}/" -e s/'$$'/"$${std}"/; \
443 echo "$$col$$br$$std"; \
445 ## Be sure to exit with the proper exit status. The use of "exit 1" below
446 ## is required to work around a FreeBSD make bug (present only when running
447 ## in concurrent mode). See automake bug#9245:
448 ## <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=9245>
449 ## and FreeBSD PR bin/159730:
450 ## <http://www.freebsd.org/cgi/query-pr.cgi?pr=159730>.
453 RECHECK_LOGS = $(TEST_LOGS)
455 ## ------------------------------------------ ##
456 ## Running all tests, or rechecking failures. ##
457 ## ------------------------------------------ ##
459 check-TESTS: %CHECK_DEPS%
460 @$(am__rm_f) $(RECHECK_LOGS)
461 @$(am__rm_f) $(RECHECK_LOGS:.log=.trs)
462 ## We always have to remove $(TEST_SUITE_LOG), to ensure its rule is run
463 ## in any case even in lazy mode: otherwise, if no test needs rerunning,
464 ## or a prior run plus reruns all happen within the same timestamp (can
465 ## happen with a prior "make TESTS=<subset>"), then we get no log output.
466 ## OTOH, this means that, in the rule for '$(TEST_SUITE_LOG)', we
467 ## cannot use '$?' to compute the set of lazily rerun tests, lest
468 ## we rely on .PHONY to work portably.
469 @$(am__rm_f) $(TEST_SUITE_LOG)
470 @set +e; $(am__set_TESTS_bases); \
471 log_list=`for i in $$bases; do echo $$i.log; done`; \
472 ## Remove newlines and normalize whitespace. Trailing (and possibly
473 ## leading) whitespace is known to cause segmentation faults on
474 ## Solaris 10 XPG4 make.
475 log_list=`echo $$log_list`; \
476 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
477 ## Be sure to exit with the proper exit status (automake bug#9245). See
478 ## comments in the recipe of $(TEST_SUITE_LOG) above for more information.
481 ## Recheck must depend on $(check_SCRIPTS), $(check_PROGRAMS), etc.
482 ## It must also depend on the 'all' target. See automake bug#11252.
483 recheck: all %CHECK_DEPS%
484 ## See comments above in the check-TESTS recipe for why remove
485 ## $(TEST_SUITE_LOG) here.
486 @$(am__rm_f) $(TEST_SUITE_LOG)
487 @set +e; $(am__set_TESTS_bases); \
488 ## We must only consider tests that had an unexpected outcome (FAIL
489 ## or XPASS) in the earlier run.
490 bases=`for i in $$bases; do echo $$i; done \
491 | $(am__list_recheck_tests)` || exit 1; \
492 log_list=`for i in $$bases; do echo $$i.log; done`; \
493 ## Remove newlines and normalize whitespace. Trailing (and possibly
494 ## leading) whitespace is known to cause segmentation faults on
495 ## Solaris 10 XPG4 make.
496 log_list=`echo $$log_list`; \
497 ## Move the '.log' and '.trs' files associated with the tests to be
498 ## re-run out of the way, so that those tests will be re-run by the
499 ## "make test-suite.log" recursive invocation below.
500 ## Two tricky requirements:
501 ## - we must avoid extra files removal when running under "make -n";
502 ## - in case the test is a compiled program whose compilation fails,
503 ## we must ensure that any '.log' and '.trs' file referring to such
504 ## test are preserved, so that future "make recheck" invocations
505 ## will still try to re-compile and re-run it (automake bug#11791).
506 ## The tricky recursive make invocation below should cater to such
508 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
509 am__force_recheck=am--force-recheck \
510 TEST_LOGS="$$log_list"; \
511 ## Be sure to exit with the proper exit status (automake bug#9245). See
512 ## comments in the recipe of $(TEST_SUITE_LOG) above for more information.
515 AM_RECURSIVE_TARGETS += check recheck
521 ## Obsolescent serial testsuite driver.
523 check-TESTS: $(TESTS)
524 @failed=0; all=0; xfail=0; xpass=0; skip=0; \
525 srcdir=$(srcdir); export srcdir; \
526 ## Make sure Solaris VPATH-expands all members of this list, even
527 ## the first and the last one; thus the spaces around $(TESTS)
530 if test -n "$$list"; then \
531 for tst in $$list; do \
532 if test -f ./$$tst; then dir=./; \
533 ## Note: Solaris 2.7 seems to expand TESTS using VPATH. That's
534 ## why we also try 'dir='.
535 elif test -f $$tst; then dir=; \
536 else dir="$(srcdir)/"; fi; \
537 if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
539 all=`expr $$all + 1`; \
540 case " $(XFAIL_TESTS) " in \
541 *[\ \ ]$$tst[\ \ ]*) \
542 xpass=`expr $$xpass + 1`; \
543 failed=`expr $$failed + 1`; \
544 col=$$red; res=XPASS; \
547 col=$$grn; res=PASS; \
550 elif test $$? -ne 77; then \
552 all=`expr $$all + 1`; \
553 case " $(XFAIL_TESTS) " in \
554 *[\ \ ]$$tst[\ \ ]*) \
555 xfail=`expr $$xfail + 1`; \
556 col=$$lgn; res=XFAIL; \
559 failed=`expr $$failed + 1`; \
560 col=$$red; res=FAIL; \
565 skip=`expr $$skip + 1`; \
566 col=$$blu; res=SKIP; \
568 echo "$${col}$$res$${std}: $$tst"; \
570 ## Prepare the banner
571 if test "$$all" -eq 1; then \
578 if test "$$failed" -eq 0; then \
579 if test "$$xfail" -eq 0; then \
580 banner="$$All$$all $$tests passed"; \
582 if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
583 banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
586 if test "$$xpass" -eq 0; then \
587 banner="$$failed of $$all $$tests failed"; \
589 if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
590 banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
593 ## DASHES should contain the largest line of the banner.
596 if test "$$skip" -ne 0; then \
597 if test "$$skip" -eq 1; then \
598 skipped="($$skip test was not run)"; \
600 skipped="($$skip tests were not run)"; \
602 test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
603 dashes="$$skipped"; \
606 if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
607 report="Please report to $(PACKAGE_BUGREPORT)"; \
608 test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
611 dashes=`echo "$$dashes" | sed s/./=/g`; \
612 if test "$$failed" -eq 0; then \
617 ## Multi line coloring is problematic with "less -R", so we really need
618 ## to color each line individually.
619 echo "$${col}$$dashes$${std}"; \
620 echo "$${col}$$banner$${std}"; \
621 test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
622 test -z "$$report" || echo "$${col}$$report$${std}"; \
623 echo "$${col}$$dashes$${std}"; \
624 test "$$failed" -eq 0; \
627 endif %?SERIAL_TESTS%