Skip to content

Commit

Permalink
Run Python 3.X tests in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
skoolkid committed Sep 6, 2023
1 parent 5b2ac91 commit a8997d1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 25 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ usage:
@echo " man build the man pages"
@echo " clean clean the documentation and man pages"
@echo " hh build the Hungry Horace disassembly"
@echo " test run core tests in parallel"
@echo " test run core tests"
@echo " test3X run core tests with Python 3.X (8<=X<=11)"
@echo " test-cover run core tests with coverage info"
@echo " test-slow run slow tests in parallel"
@echo " test-all run core and disassembly tests in parallel"
@echo " test-slow run slow tests"
@echo " test-all run core and disassembly tests"
@echo " test3X-all run core and disassembly tests with Python 3.X (8<=X<=11)"
@echo " test-cover run core tests with coverage info"
@echo " release build a SkoolKit release tarball and zip archive"
@echo " tarball build a SkoolKit release tarball"
@echo " deb build a SkoolKit Debian package"
Expand All @@ -27,7 +27,7 @@ usage:
@echo "Variables:"
@echo " THEMES CSS theme(s) to use"
@echo " HTML_OPTS options passed to skool2html.py"
@echo " CORES number of processes to use when running tests in parallel"
@echo " CORES number of processes to use when running tests"

.PHONY: doc
doc:
Expand Down Expand Up @@ -67,11 +67,11 @@ test-all: write-disassembly-tests

.PHONY: test3%
test3%: remove-disassembly-tests
$(HOME)/Python/Python3.$*/bin/nose2
$(HOME)/Python/Python3.$*/bin/nose2 --plugin=nose2.plugins.mp -N $(CORES)

.PHONY: test3%-all
test3%-all: write-disassembly-tests
$(HOME)/Python/Python3.$*/bin/nose2
$(HOME)/Python/Python3.$*/bin/nose2 --plugin=nose2.plugins.mp -N $(CORES)

.PHONY: test-cover
test-cover: remove-disassembly-tests
Expand Down
6 changes: 3 additions & 3 deletions tools/disassembly.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ usage:
@echo " usage show this help"
@echo " html build the HTML disassembly"
@echo " asm build the ASM disassembly"
@echo " test run tests in parallel"
@echo " test run tests"
@echo " test3X run tests with Python 3.X (8<=X<=11)"
@$(MAKE) -s _targets
@echo ""
Expand All @@ -23,7 +23,7 @@ usage:
@echo " THEMES CSS theme(s) to use"
@echo " HTML_OPTS extra options passed to skool2html.py"
@echo " ASM_OPTS options passed to skool2asm.py"
@echo " CORES number of processes to use when running tests in parallel"
@echo " CORES number of processes to use when running tests"

.PHONY: _targets
_targets:
Expand All @@ -49,4 +49,4 @@ test: write-tests

.PHONY: test3%
test3%: write-tests
$(HOME)/Python/Python3.$*/bin/nose2
$(HOME)/Python/Python3.$*/bin/nose2 --plugin=nose2.plugins.mp -N $(CORES)
22 changes: 7 additions & 15 deletions tools/skrelease
Original file line number Diff line number Diff line change
Expand Up @@ -236,21 +236,13 @@ test_disassemblies() {
csclog=$CONTACTSAMCRUISE_HOME/build/tests.log
targets="test38 test39 test310 test311"

make -C $HUNGRYHORACE_HOME $targets &> $hhlog & PIDhh=$!
make -C $MANICMINER_HOME $targets &> $mmlog & PIDmm=$!
make -C $JETSETWILLY_HOME $targets &> $jswlog & PIDjsw=$!
make -C $ROM_DISASSEMBLY_HOME $targets &> $romlog & PIDrom=$!
make -C $SKOOLDAZE_HOME $targets &> $sdlog & PIDsd=$!
make -C $BACKTOSKOOL_HOME $targets &> $btslog & PIDbts=$!
make -C $CONTACTSAMCRUISE_HOME $targets &> $csclog & PIDcsc=$!

_wait "Hungry Horace tests" $PIDhh "(see $hhlog)" _
_wait "Manic Miner tests" $PIDmm "(see $mmlog)" _
_wait "Jet Set Willy tests" $PIDjsw "(see $jswlog)" _
_wait "Spectrum ROM tests" $PIDrom "(see $romlog)" _
_wait "Skool Daze tests" $PIDsd "(see $sdlog)" _
_wait "Back to Skool tests" $PIDbts "(see $btslog)" _
_wait "Contact Sam Cruise tests" $PIDcsc "(see $csclog)" _
_exec "Hungry Horace tests" "make -C $HUNGRYHORACE_HOME $targets" $hhlog
_exec "Manic Miner tests" "make -C $MANICMINER_HOME $targets" $mmlog
_exec "Jet Set Willy tests" "make -C $JETSETWILLY_HOME $targets" $jswlog
_exec "Spectrum ROM tests" "make -C $ROM_DISASSEMBLY_HOME $targets" $romlog
_exec "Skool Daze tests" "make -C $SKOOLDAZE_HOME $targets" $sdlog
_exec "Back to Skool tests" "make -C $BACKTOSKOOL_HOME $targets" $btslog
_exec "Contact Sam Cruise tests" "make -C $CONTACTSAMCRUISE_HOME $targets" $csclog
}

###############################################################################
Expand Down

0 comments on commit a8997d1

Please sign in to comment.