Skip to content

Commit

Permalink
Makefile: Switch test targets to do_regtest.py
Browse files Browse the repository at this point in the history
  • Loading branch information
oschuett committed Oct 27, 2021
1 parent 3706901 commit 29435e6
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,10 @@ $(EXE_NAMES): makedep | dirs exts
all: makedep | dirs exts
@+$(MAKE) --no-print-directory -C $(OBJDIR) -f $(MAKEFILE) all INCLUDE_DEPS=true

# foreground testing, compilation happens in do_regtest
test: dirs
cd $(TSTDIR); $(TOOLSRC)/regtesting/do_regtest -quick -arch $(ARCH) -version $(ONEVERSION) -cp2kdir ../../../ $(TESTOPTS)
# compilation for testing happens here
test: dirs makedep all
@+$(MAKE) --no-print-directory -C $(TSTDIR) -f $(MAKEFILE) test INCLUDE_DEPS=true

# background testing, compilation happens here
testbg: dirs makedep all
@+$(MAKE) --no-print-directory -C $(TSTDIR) -f $(MAKEFILE) testbg INCLUDE_DEPS=true

Expand Down Expand Up @@ -262,13 +261,13 @@ $(EXEDIR)/cp2k.popt: $(EXEDIR)/cp2k.psmp
$(EXEDIR)/cp2k_shell.$(ONEVERSION): $(EXEDIR)/cp2k.$(ONEVERSION)
cd $(EXEDIR); ln -sf cp2k.$(ONEVERSION) cp2k_shell.$(ONEVERSION)

test:
@$(TOOLSRC)/regtesting/do_regtest.py $(ARCH) $(ONEVERSION) $(TESTOPTS)

testbg:
@echo "testing: $(ONEVERSION) : full log in $(TSTDIR)/regtest.log "
@$(TOOLSRC)/regtesting/do_regtest -nobuild $(ARCH) -version $(ONEVERSION) -cp2kdir ../../../ $(TESTOPTS) >& $(TSTDIR)/regtest.log
@cat `grep 'regtesting location error_summary file:' $(TSTDIR)/regtest.log | awk '{print $$NF}'`
@cat `grep 'regtesting location summary file:' $(TSTDIR)/regtest.log | awk '{print $$NF}'`
@grep "Number of FAILED tests 0" $(TSTDIR)/regtest.log >& /dev/null
@grep "Number of WRONG tests 0" $(TSTDIR)/regtest.log >& /dev/null
@$(TOOLSRC)/regtesting/do_regtest.py $(ARCH) $(ONEVERSION) $(TESTOPTS) > $(TSTDIR)/regtest.log 2>&1
@grep -e "Summary:" -e "Status:" $(TSTDIR)/regtest.log

endif
endif
Expand Down

0 comments on commit 29435e6

Please sign in to comment.