projects
/
open-adventure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6152e35
)
Cleaned up tests/Makefile - added save generation to its own target
author
Aaron Traas
<aaron@traas.org>
Wed, 28 Jun 2017 14:31:47 +0000
(10:31 -0400)
committer
Eric S. Raymond
<esr@thyrsus.com>
Wed, 28 Jun 2017 14:57:28 +0000
(10:57 -0400)
tests/Makefile
patch
|
blob
|
history
diff --git
a/tests/Makefile
b/tests/Makefile
index f3ee2d6dba1c5ade2d8ed153e568a67b1d5b3e63..b9df1c8ea4dc68b2085d19fa9e03995542639a59 100644
(file)
--- a/
tests/Makefile
+++ b/
tests/Makefile
@@
-26,15
+26,19
@@
listcheck:
if ( head -3 $$f | grep -q '^ *##' ); then :; else echo "$$f needs a description"; fi; \
done
if ( head -3 $$f | grep -q '^ *##' ); then :; else echo "$$f needs a description"; fi; \
done
+savegames:
+ $(ECHO) "cheat: Generate save file with -1000 deaths"
+ ../cheat -d -1000 -o cheat_numdie.adv > /tmp/cheat_numdie
+ $(ECHO) "cheat: Generate save file with version -1337"
+ ../cheat -v -1337 -o resume_badversion.adv > /tmp/cheat_badversion
+ $(ECHO) "cheat: Generate save file 1000 saves"
+ ../cheat -s -1000 -o thousand_saves.adv > /tmp/cheat_1000saves
+ rm -f /tmp/cheat*
+
# General regression testing of commands and output; look at the *.log and
# corresponding *.chk files to see which tests this runs.
TESTLOADS := $(shell ls -1 *.log | sed '/.log/s///' | sort)
# General regression testing of commands and output; look at the *.log and
# corresponding *.chk files to see which tests this runs.
TESTLOADS := $(shell ls -1 *.log | sed '/.log/s///' | sort)
-buildregress:
- $(ECHO) "Generate save file with -1000 deaths: "
- ../cheat -d -1000 -o cheat_numdie.adv
- $(ECHO) "Generate save file with version -1337: "
- ../cheat -v -1337 -o resume_badversion.adv
- $(ECHO) "TEST cheat: Generate save file 1000 saves"
+buildregress: savegames
../cheat -s -1000 -o thousand_saves.adv > /tmp/regress1000saves
@for file in $(TESTLOADS); do \
echo "Remaking $${file}.chk"; \
../cheat -s -1000 -o thousand_saves.adv > /tmp/regress1000saves
@for file in $(TESTLOADS); do \
echo "Remaking $${file}.chk"; \
@@
-42,13
+46,7
@@
buildregress:
advent $$OPTS <$${file}.log >$${file}.chk 2>&1 || exit 1; \
done; \
rm -f scratch.tmp
advent $$OPTS <$${file}.log >$${file}.chk 2>&1 || exit 1; \
done; \
rm -f scratch.tmp
-regress:
- $(ECHO) "TEST cheat: Generate save file with -1000 deaths"
- ../cheat -d -1000 -o cheat_numdie.adv > /tmp/regressdumdie
- $(ECHO) "TEST cheat: Generate save file with version -1337"
- ../cheat -v -1337 -o resume_badversion.adv > /tmp/regressbadversion
- $(ECHO) "TEST cheat: Generate save file 1000 saves"
- ../cheat -s -1000 -o thousand_saves.adv > /tmp/regress1000saves
+regress: savegames
$(ECHO) "TEST cheat: Bogus option for save file generation"
../cheat -QqQ 2> /tmp/coverage_cheat_batopt | true
$(ECHO) "TEST cheat: Fail to save because we omit -o"
$(ECHO) "TEST cheat: Bogus option for save file generation"
../cheat -QqQ 2> /tmp/coverage_cheat_batopt | true
$(ECHO) "TEST cheat: Fail to save because we omit -o"