1# -*- mode: makefile-gmake -*- 2-include petscdir.mk 3 4.SUFFIXES: .F .F90 .f90 ${SUFFIXES} .PETSc .C .cc .cpp .cxx .r .rm .so .html .ad .m .tex .mtex .make .fig .svg .eps .pdf .jpg .png .dvi .ps .F95 .f95 .fiat .cu .kokkos.cxx 5 6CONFIGDIR := $(PETSC_DIR)/config 7 8# TESTSRCDIR is always relative to gmakefile.test 9# This must be before includes 10mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) 11TESTSRCDIR := $(dir $(mkfile_path))src 12 13-include $(PETSC_DIR)/$(PETSC_ARCH)/lib/petsc/conf/petscvariables 14-include $(PETSC_DIR)/lib/petsc/conf/variables 15 16TESTDIR ?= ./$(PETSC_ARCH)/tests 17MODDIR := $(PETSC_DIR)/$(PETSC_ARCH)/include 18TESTLOGTAPFILE ?= $(TESTDIR)/test_$(PETSC_ARCH)_tap.log 19TESTLOGERRFILE ?= $(TESTDIR)/test_$(PETSC_ARCH)_err.log 20EXAMPLESDIR := $(TESTSRCDIR) 21 22pkgs := sys vec mat dm ksp snes ts tao 23 24petscconf := $(PETSC_DIR)/$(PETSC_ARCH)/include/petscconf.h 25petscvariables := $(PETSC_DIR)/$(PETSC_ARCH)/lib/petsc/conf/petscvariables 26generatedtest := $(TESTDIR)/testfiles 27 28.SECONDEXPANSION: # to expand $$(@D)/.DIR 29 30TESTFLAGS := # Initialize as simple variable 31 32#workarround old cygwin versions 33ifeq ($(PETSC_CYGWIN_BROKEN_PIPE),1) 34ifeq ($(shell basename $(AR)),ar) 35 V ?=1 36endif 37endif 38V ?= $(if $(findstring s,$(MAKEFLAGS)),0) 39ifeq ($(V),) # Default 40 quiet_HELP := "Use \"$(MAKE) V=1\" to see verbose compile lines, \"$(MAKE) V=0\" to suppress.\n" 41 quiet = @printf $(quiet_HELP)$(eval quiet_HELP:=)" %10s %s\n" "$1$2" "$@"; $($1) 42 quiettest = @printf " %10s %s\n" "TEST" "$(@:$(TESTDIR)/counts/%.counts=%)"; 43else ifeq ($(V),0) # Suppress entire command 44 quiet = @$($1) 45 quiettest = @ 46 TESTFLAGS += -o err_only 47else # Show the full command line 48 quiet = $($1) 49 quiettest = 50 TESTFLAGS += -v 51endif 52 53ifeq ($(FORCE),1) 54 TESTFLAGS += -f # force test execution 55endif 56ifeq ($(VALGRIND),1) 57 TESTFLAGS += -V # Add valgrind to the flags 58endif 59ifeq ($(REPLACE),1) 60 TESTFLAGS += -m # Replace results by passing -m to petscdiff 61endif 62ifeq ($(OUTPUT),1) 63 TESTFLAGS += -o 'err_only' # Show only the errors on stdout 64endif 65ifeq ($(ALT),1) 66 TESTFLAGS += -M # Replace alt files by passing -M to petscdiff 67endif 68PRINTONLY ?= 0 69ifeq ($(PRINTONLY),1) 70 TESTFLAGS += -p # Pass -p to petscdiff to print only command 71endif 72ifeq ($(DIFF_NUMBERS),1) 73 TESTFLAGS += -j # Pass -j to petscdiff to diff the actual numbers 74endif 75ifdef OPTIONS 76 TESTFLAGS += -a '$(OPTIONS)' # override arguments 77endif 78ifdef EXTRA_OPTIONS 79 TESTFLAGS += -e '$(EXTRA_OPTIONS)' # add extra arguments 80endif 81ifdef NP 82 TESTFLAGS += -n $(NP) # set number of processes 83endif 84# Override the default timeout that may be found at the top of config/petsc_harness.sh 85# This must be an integer. It is given in seconds. 86ifdef TIMEOUT 87 TESTFLAGS += -t $(TIMEOUT) # Override the default timeout 88endif 89 90$(generatedtest) : $(petscconf) $(petscvariables) $(CONFIGDIR)/gmakegentest.py $(TESTDIR)/.DIR | $$(@D)/.DIR 91 $(PYTHON) $(CONFIGDIR)/gmakegentest.py --petsc-dir=$(PETSC_DIR) --petsc-arch=$(PETSC_ARCH) --testdir=$(TESTDIR) 92 93ifneq ($(filter-out clean check,$(MAKECMDGOALS:clean%=clean)),) 94include $(generatedtest) 95endif 96 97ifeq ($(PETSC_LANGUAGE),CXXONLY) 98 cc_name := CXX 99else 100 cc_name := CC 101endif 102 103PETSC_COMPILE.c = $(call quiet,$(cc_name)) -c $(PCC_FLAGS) $(PFLAGS) $(CCPPFLAGS) $(C_DEPFLAGS) 104PETSC_COMPILE.cxx = $(call quiet,CXX) -c $(CXX_FLAGS) $(CXXFLAGS) $(CXXCPPFLAGS) $(CXX_DEPFLAGS) 105ifneq ($(KOKKOS_BIN),) 106# Kokkos requires nvcc to be in PATH and the C++ compiler to be given in an environmental variable 107PETSC_COMPILE.kokkos.cxx = PATH=$(PATH):`dirname $(CUDAC)` NVCC_WRAPPER_DEFAULT_COMPILER=$(CXX_LINKER) $(KOKKOS_BIN)/nvcc_wrapper --expt-extended-lambda -c $(CXX_FLAGS) $(CXXFLAGS) $(CXXCPPFLAGS) 108PETSC_LINK.kokkos.cxx = PATH=$(PATH):`dirname $(CUDAC)` NVCC_WRAPPER_DEFAULT_COMPILER=$(CXX_LINKER) $(KOKKOS_BIN)/nvcc_wrapper --expt-extended-lambda $(CXX_LINKER_FLAGS) $(PETSC_CCPPFLAGS) $(CPPFLAGS) $(LDFLAGS) 109else 110PETSC_COMPILE.kokkos.cxx = $(call quiet,CXX) -c $(CXX_FLAGS) $(CXXFLAGS) $(CXXCPPFLAGS) $(CXX_DEPFLAGS) 111PETSC_LINK.kokkos.cxx = $(CXXLINKER) $(CXX_LINKER_FLAGS) $(CXXFLAGS) $(PETSC_CCPPFLAGS) $(CPPFLAGS) $(LDFLAGS) 112endif 113PETSC_COMPILE.cu = $(call quiet,CUDAC) -c $(CUDAC_FLAGS) $(CUFLAGS) --compiler-options="$(PCC_FLAGS) $(CXXFLAGS) $(CCPPFLAGS)" 114PETSC_COMPILE.hip.cpp = $(call quiet,HIPCC) -c $(HIPCC_FLAGS) $(HIPCCFLAGS) $(HIPCCPPFLAGS) $(HIPCC_DEPFLAGS) 115PETSC_COMPILE.sycl.cpp = $(call quiet,SYCLCPP) -c $(SYCLCPP_FLAGS) $(SYCLCPPFLAGS) $(SYCLCPPCPPFLAGS) $(SYCLCPP_DEPFLAGS) 116PETSC_GENDEPS.cu = $(call quiet,CUDAC,.dep) --generate-dependencies --output-directory=$(@D) $(CUDAC_FLAGS) $(CUFLAGS) --compiler-options="$(PCC_FLAGS) $(CXXFLAGS) $(CCPPFLAGS)" 117PETSC_COMPILE.F = $(call quiet,FC) -c $(FC_FLAGS) $(FFLAGS) $(FCPPFLAGS) $(FC_DEPFLAGS) 118 119testlangs := c cu cxx F F90 kokkos.cxx hip.cpp sycl.cpp 120$(foreach lang, $(testlangs), $(eval \ 121 testexe.$(lang) = $(foreach pkg, $(pkgs), $(testsrcs-$(pkg).$(lang):%.$(lang)=$(TESTDIR)/%)))) 122concattestlang = $(foreach lang, $(2), $(testsrcs-$(1).$(lang):%.$(lang)=$(TESTDIR)/%.o)) 123testsrcs.o := $(foreach pkg, $(pkgs), $(call concattestlang,$(pkg),$(testlangs))) 124testsrcs-rel := $(foreach pkg, $(pkgs), $(foreach lang, $(testlangs), $(testsrcs-$(pkg).$(lang)))) 125testsrcs := $(foreach sfile, $(testsrcs-rel), $(TESTSRCDIR)/$(sfile)) 126 127# workaround win32fe failure 128ifneq (,$(findstring win32fe,$(call quiet,$(cc_name)))) 129$(TESTDIR)/ts/tutorials/multirate/ex6: | $(TESTDIR)/ts/tutorials/multirate/ex5 130$(TESTDIR)/ts/tutorials/multirate/ex8: | $(TESTDIR)/ts/tutorials/multirate/ex6 131endif 132 133# Refresh testfiles when sources change, but don't balk if the source file is nonexistent (deleted) 134$(generatedtest) : $(testsrcs) 135$(testsrcs) : 136 137$(TESTDIR)/%.o : $(EXAMPLESDIR)/%.c | $$(@D)/.DIR 138 $(PETSC_COMPILE.c) $(abspath $<) -o $@ 139 140$(TESTDIR)/%.o : $(EXAMPLESDIR)/%.kokkos.cxx | $$(@D)/.DIR 141 $(PETSC_COMPILE.kokkos.cxx) $(abspath $<) -o $@ 142 143$(TESTDIR)/%.o : $(EXAMPLESDIR)/%.cxx | $$(@D)/.DIR 144 $(PETSC_COMPILE.cxx) $(abspath $<) -o $@ 145 146$(TESTDIR)/%.o : $(EXAMPLESDIR)/%.cu | $$(@D)/.DIR 147 $(PETSC_COMPILE.cu) $(abspath $<) -o $@ # Compile first so that if there is an error, it comes from a normal compile 148 @$(PETSC_GENDEPS.cu) $(abspath $<) -o $(@:%.o=%.d) # Generate the dependencies for later 149 150# Test modules go in the same directory as the target *.o 151TESTMODDIR = $(@D) 152FCMOD = cd 153$(TESTDIR)/%.o : $(EXAMPLESDIR)/%.F | $$(@D)/.DIR 154ifeq ($(FC_MODULE_OUTPUT_FLAG),) 155 $(call quiet,FCMOD) $(TESTMODDIR) && $(FC) -c $(FC_FLAGS) $(FFLAGS) $(FCPPFLAGS) $(FC_DEPFLAGS) -I$(dir $<) $(abspath $<) -o $(abspath $@) 156else 157 $(PETSC_COMPILE.F) -I$(dir $<) $(abspath $<) -o $@ $(FC_MODULE_OUTPUT_FLAG)$(TESTMODDIR) $(FC_MODULE_FLAG)$(TESTMODDIR) 158endif 159 -@$(GFORTRAN_DEP_CLEANUP) 160 161$(TESTDIR)/%.o : $(EXAMPLESDIR)/%.F90 | $$(@D)/.DIR 162ifeq ($(FC_MODULE_OUTPUT_FLAG),) 163 $(call quiet,FCMOD) $(TESTMODDIR) && $(FC) -c $(FC_FLAGS) $(FFLAGS) $(FCPPFLAGS) $(FC_DEPFLAGS) -I$(dir $<) $(abspath $<) -o $(abspath $@) 164else 165 $(PETSC_COMPILE.F) -I$(dir $<) $(abspath $<) -o $@ $(FC_MODULE_OUTPUT_FLAG)$(TESTMODDIR) $(FC_MODULE_FLAG)$(TESTMODDIR) 166endif 167 -@$(GFORTRAN_DEP_CLEANUP) 168 169# This is a hack to fix a broken gfortran. 170define GFORTRAN_DEP_CLEANUP 171 if test -e "$(@:%.o=%.d)" && head -1 "$(@:%.o=%.d)" | fgrep -q -v : ; then\ 172 echo "$(@): \\" > $(@:%.o=%.dtemp) ; \ 173 tr '\n' '@' < $(@:%.o=%.d) | cut -d: -f2- | tr '@' '\n' >> $(@:%.o=%.dtemp) ; \ 174 mv $(@:%.o=%.dtemp) $(@:%.o=%.d); \ 175 fi 176endef 177 178# link line constructed differently for gmakefile vs gmakefile.test invocation 179ifeq ($(libpetscall),) 180PETSC_TEST_LIB = $(PETSC_LIB) 181else 182PETSC_TEST_LIB = $(C_SH_LIB_PATH) $(PETSC_EXTERNAL_LIB_BASIC) 183endif 184 185# manually list some some library dependencies to check for circular dependencies 186$(TESTDIR)/sys/tests/ex9: PETSC_TEST_LIB = $(PETSC_SYS_LIB) 187$(TESTDIR)/vec/vec/tests/ex1: PETSC_TEST_LIB = $(PETSC_VEC_LIB) 188$(TESTDIR)/mat/tests/ex1: PETSC_TEST_LIB = $(PETSC_MAT_LIB) 189$(TESTDIR)/dm/tests/ex1: PETSC_TEST_LIB = $(PETSC_DM_LIB) 190$(TESTDIR)/ksp/ksp/tests/ex1: PETSC_TEST_LIB = $(PETSC_KSP_LIB) 191$(TESTDIR)/snes/tests/ex1: PETSC_TEST_LIB = $(PETSC_SNES_LIB) 192$(TESTDIR)/ts/tests/ex2: PETSC_TEST_LIB = $(PETSC_TS_LIB) 193$(TESTDIR)/tao/tutorials/ex1: PETSC_TEST_LIB = $(PETSC_TAO_LIB) 194 195# Test executables 196$(testexe.F) $(testexe.F90) : $(TESTDIR)/% : $(TESTDIR)/%.o $$^ $(libpetscall) 197 $(call quiet,FLINKER) -o $@ $^ $(PETSC_TEST_LIB) 198 199$(testexe.c) $(testexe.cu) : $(TESTDIR)/% : $(TESTDIR)/%.o $$^ $(libpetscall) 200 $(call quiet,CLINKER) -o $@ $^ $(PETSC_TEST_LIB) 201 202$(testexe.kokkos.cxx) : $(TESTDIR)/% : $(TESTDIR)/%.o $$^ $(libpetscall) 203 $(call quiet,PETSC_LINK.kokkos.cxx) -o $@ $^ $(PETSC_TEST_LIB) 204 205$(testexe.cxx) : $(TESTDIR)/% : $(TESTDIR)/%.o $$^ $(libpetscall) 206 $(call quiet,CXXLINKER) -o $@ $^ $(PETSC_TEST_LIB) 207 208# Fortran source files need petsc*.mod, which isn't explicitly managed in the makefile. 209$(foreach pkg, $(pkgs), $(call concattestlang,$(pkg),F F90)) : $(libpetscall) 210 211# Testing convenience targets 212.PHONY: test pre-clean 213 214test: report_tests 215 216pre-clean: 217 @$(RM) -rf $(TESTDIR)/counts $(TESTLOGTAPFILE) $(TESTLOGERRFILE) 218 @touch $(TESTLOGTAPFILE) $(TESTLOGERRFILE) 219 @echo "Using MAKEFLAGS:" ${MAKEFLAGS} 220 221check-test-errors: 222 @grep '^not ok' $(TESTLOGTAPFILE) | grep -v 'Exceeded timeout' | tee $(TESTDIR)/allgtests-tap-err.log 223 @test ! -s $(TESTDIR)/allgtests-tap-err.log 224 225.PHONY: $(foreach pkg, $(pkgs), test-$(pkg) $(foreach lang, $(testlangs), test-$(pkg).$(lang) test-rm-$(pkg).$(lang))) 226testpkgs := $(foreach pkg, $(pkgs), test-$(pkg)) 227# Targets to run tests in test-$pkg.$lang and delete the executables, language by language 228$(testpkgs) : test-% : $(foreach lang, $(testlangs), test-rm-%.$(lang)) 229# List of raw test run targets 230alltesttargets := $(foreach tp, $(testpkgs), $(foreach lang, $(testlangs), $($(tp).$(lang)))) 231 232# Run targets 233$(alltesttargets) : % : $(TESTDIR)/counts/%.counts 234.PHONY: $(alltesttargets) 235 236$(TESTDIR)/counts/%.counts : 237 $(quiettest) $< $(TESTFLAGS) 238 239# Targets to run tests and remove executables, by package-lang pairs. 240# Run the tests in each batch using recursive invocation of make because 241# we need all of them to complete before removing the executables. Make 242# doesn't guarantee an exploration order for the graph. Only recursive 243# if there is something to be done. 244alltest-rm := $(foreach pkg, $(pkgs), $(foreach lang, $(testlangs), test-rm-$(pkg).$(lang))) 245$(alltest-rm) : test-rm-% : test-% 246ifneq ($(NO_RM),1) 247 $(call quiet,RM) $(addprefix $(TESTDIR)/,$(basename $($(@:test-rm-%=testsrcs-%)))) 248endif 249 250# Remove intermediate .o files 251# This only removes the files at the end which is insufficient 252#.INTERMEDIATE: $(testsrcs.o:%.o=%) 253 254# all sources should get recompiled when petscvariables changes (i.e when configure is rerun or when petscvariables is manually edited.) 255$(testsrcs.o) : $(petscvariables) 256 257%/.DIR : 258 @mkdir -p $(@D) 259 @touch $@ 260 261.PRECIOUS: %/.DIR 262 263.SUFFIXES: # Clear .SUFFIXES because we don't use implicit rules 264.DELETE_ON_ERROR: # Delete likely-corrupt target file if rule fails 265 266.PHONY: clean cleantest all 267 268cleantest: 269 ${RM} -r $(TESTDIR) $(generatedtest) 270 271clean: cleantest 272 273alltest.d := $(testsrcs.o:%.o=%.d) 274# Tell make that alltest.d are all up to date. Without this, the include 275# below has quadratic complexity, taking more than one second for a 276# do-nothing build of PETSc (much worse for larger projects) 277$(alltest.d) : ; 278 279-include $(alltest.d) 280 281# Tests can be generated by searching 282# Percent is a wildcard (only one allowed): 283# make -f gmakefile test search=sys%ex2 284# To match internal substrings (matches *ex2*): 285# make -f gmakefile test searchin=ex2 286# Search and searchin can be combined: 287# make -f gmakefile test search='sys%' searchin=ex2 288# For args: 289# make -f gmakefile test argsearch=cuda 290# For general glob-style searching using python: 291# NOTE: uses shell which is possibly slower and is possibly more brittle 292# make -f gmakefile test globsearch='sys*ex2*' 293ifdef search 294 TESTTARGETS := $(filter $(search),$(alltesttargets)) 295 ifdef searchin 296 TESTTARGETS2 := $(foreach v,$(TESTTARGETS),$(if $(findstring $(searchin),$(v)),$(v))) 297 TESTTARGETS := $(TESTTARGETS2) 298 endif 299else ifdef searchin 300 TESTTARGETS := $(foreach v,$(alltesttargets),$(if $(findstring $(searchin),$(v)),$(v))) 301else ifdef argsearch 302 TESTTARGETS := $(foreach v,$(alltesttargets),$(if $(findstring $(argsearch),$($(v)_ARGS)),$(v))) 303else ifdef globsearch 304 TESTTARGETS := $(shell $(PYTHON) config/query_tests.py --petsc-dir=$(PETSC_DIR) --petsc-arch=$(PETSC_ARCH) 'name' '$(globsearch)') 305else ifdef test-fail 306 TESTTARGETS := $(shell $(PETSC_ARCH)/tests/echofailures.sh) 307else ifdef query 308 TESTTARGETS := $(shell $(PYTHON) config/query_tests.py --petsc-dir=$(PETSC_DIR) --petsc-arch=$(PETSC_ARCH) '$(query)' '$(queryval)') 309else # No filter - run them all, but delete the executables as we go 310 TESTTARGETS := $(testpkgs) 311endif 312 313.PHONY: report_tests print-test 314 315print-test: 316 $(info $(TESTTARGETS)) 317 @true 318 319show-fail: 320 -@$(PYTHON) $(CONFIGDIR)/report_tests.py -d $(TESTDIR)/counts -f 321 322 323 324# Don't start running tests until starttime has completed 325$(alltesttargets:%=$(TESTDIR)/counts/%.counts) : starttime 326 327# Ensure that libpetsc (if it is a prerequisite) has been built and clean the counts/logs before starting timer 328starttime: pre-clean $(libpetscall) 329 @$(eval STARTTIME := $(shell date +%s)) 330 331report_tests: starttime $(TESTTARGETS) 332 @$(eval ENDTIME := $(shell date +%s)) 333 -@if test ${PRINTONLY} -ne 1; then elapsed_time=$$(($(ENDTIME)- $(STARTTIME))) && \ 334 $(PYTHON) $(CONFIGDIR)/report_tests.py -m $(MAKE) -d $(TESTDIR)/counts -t 5 -e $${elapsed_time};\ 335 fi 336 337check_output: 338 $(PYTHON) $(CONFIGDIR)/gmakegentest.py --petsc-dir=$(PETSC_DIR) --petsc-arch=$(PETSC_ARCH) --testdir=$(TESTDIR) --check-output 339 340# Do not how how to invoke test from makefile 341HASGMAKEFILE := $(filter gmakefile,$(MAKEFILE_LIST)) 342ifeq ($(HASGMAKEFILE),gmakefile) 343helpdeps:=help-make help-targets 344makefile="gmakefile" 345other_help="To see full test help: make -f gmakefile.test help" 346else 347helpdeps:=help-make help-targets help-test 348makefile="gmakefile.test" 349other_help="" 350endif 351 352help: ${helpdeps} 353 -@echo "Above is from: ${helpdeps}" 354 -@echo "${other_help}" 355 356help-make: 357 -@echo 358 -@echo "Basic build usage:" 359 -@echo " make -f ${makefile} <options>" 360 -@echo 361 -@echo "Options:" 362 -@echo " V=0 Very quiet builds" 363 -@echo " V=1 Verbose builds" 364 -@echo 365 366help-targets: 367 -@echo "All makefile targets and their dependencies:" 368 -@grep ^[a-z] ${makefile} | grep : | grep -v = 369 -@echo 370 -@echo 371 372help-test: 373 -@echo "Basic test usage:" 374 -@echo " make -f ${makefile} test <options>" 375 -@echo 376 -@echo "Options:" 377 -@echo " NO_RM=1 Do not remove the executables after running" 378 -@echo " REPLACE=1 Replace the output in PETSC_DIR source tree (-m to test scripts)" 379 -@echo " OUTPUT=1 Show only the errors on stdout" 380 -@echo " ALT=1 Replace 'alt' output in PETSC_DIR source tree (-M to test scripts)" 381 -@echo " DIFF_NUMBERS=1 Diff the numbers in the output (-j to test scripts and petscdiff)" 382 -@echo " VALGRIND=1 Execute the tests using valgrind (-V to test scripts)" 383 -@echo " NP=<num proc> Set a number of processors to pass to scripts." 384 -@echo " FORCE=1 Force SKIP or TODO tests to run" 385 -@echo " PRINTONLY=1 Print the command, but do not run. For loops print first command" 386 -@echo " TIMEOUT=<time> Test timeout limit in seconds (default in config/petsc_harness.sh)" 387 -@echo " TESTDIR='tests' Subdirectory where tests are run ($${PETSC_DIR}/$${PETSC_ARCH}/$${TESTDIR}" 388 -@echo " or $${PREFIX_DIR}/$${TESTDIR}" 389 -@echo " or $${PREFIX_DIR}/share/petsc/examples/$${TESTDIR})" 390 -@echo " TESTBASE='tests' Subdirectory where tests are run ($${PETSC_DIR}/$${PETSC_ARCH}/$${TESTDIR}" 391 -@echo " OPTIONS='<args>' Override options to scripts (-a to test scripts)" 392 -@echo " EXTRA_OPTIONS='<args>' Add options to scripts (-e to test scripts)" 393 -@echo 394 -@echo "Tests can be generated by searching:" 395 -@echo " Percent is a wildcard (only one allowed):" 396 -@echo " make -f ${makefile} test search=sys%ex2" 397 -@echo 398 -@echo " To match internal substrings (matches *ex2*):" 399 -@echo " make -f ${makefile} test searchin=ex2" 400 -@echo 401 -@echo " Search and searchin can be combined:" 402 -@echo " make -f ${makefile} test search='sys%' searchin=ex2" 403 -@echo 404 -@echo " To match patterns in the arguments:" 405 -@echo " make -f ${makefile} test argsearch=cuda" 406 -@echo 407 -@echo " For general glob-style searching using python:" 408 -@echo " NOTE: uses shell which is possibly slower and more brittle" 409 -@echo " make -f ${makefile} test globsearch='sys*ex2*'" 410 -@echo 411 -@echo " To re-run the last tests which failed:" 412 -@echo " make -f ${makefile} test test-fail='1'" 413 -@echo 414 -@echo " To search for fields from the original test definitions:" 415 -@echo " make -f ${makefile} test query='requires' queryval='*MPI_PROCESS_SHARED_MEMORY*'" 416 -@echo 417 -@echo " To see which targets match a given pattern (useful for doing a specific target):" 418 -@echo " make -f ${makefile} print-test search=sys%" 419 -@echo " which is equivalent to:" 420 -@echo " make -f ${makefile} print VAR=TESTTARGETS search='sys%'" 421 -@echo 422 -@echo " To build an executable, give full path to location:" 423 -@echo ' make -f ${makefile} $${PETSC_ARCH}/tests/sys/tests/ex1' 424 -@echo " or make the test with NO_RM=1" 425 -@echo 426