From 691edae505bc6023c700856ebce8fde8aa06c673 Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Tue, 18 Jul 2023 10:32:05 +0100 Subject: [PATCH 01/13] Test the boards only for now --- Jenkinsfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 825c129..5d8d950 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -174,7 +174,7 @@ pipeline { sh 'mkdir junit/' } } - stage('Unit Tests') { + /* stage('Unit Tests') { steps { // Empty config is sometimes needed in unit tests sh 'echo "# Empty config" > ~/.spinnaker.cfg' @@ -281,10 +281,13 @@ pipeline { run_pytest('Visualiser/visualiser_integration_tests', 12000, 'visualiser_Integration', 'integration', 'auto') } } - } + } */ stage('Run Whole Machine Tests') { - when { + /* when { environment name: 'THE_JOB', value: 'Integration_Tests_Cron_Job' + } */ + environment { + SPALLOC_PASSWORD = credentials('spalloc-password') } steps { catchError(stageResult: 'FAILURE', catchInterruptions: false) { From bce0bcca2b1277b1b24b8329d799728700e518f4 Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Mon, 18 Sep 2023 08:54:43 +0100 Subject: [PATCH 02/13] Try fully testing this (include more board tests) --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5d8d950..c55f013 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -174,7 +174,7 @@ pipeline { sh 'mkdir junit/' } } - /* stage('Unit Tests') { + stage('Unit Tests') { steps { // Empty config is sometimes needed in unit tests sh 'echo "# Empty config" > ~/.spinnaker.cfg' @@ -281,7 +281,7 @@ pipeline { run_pytest('Visualiser/visualiser_integration_tests', 12000, 'visualiser_Integration', 'integration', 'auto') } } - } */ + } stage('Run Whole Machine Tests') { /* when { environment name: 'THE_JOB', value: 'Integration_Tests_Cron_Job' From 0394a05c60a14e5c8aa26272d5b4d9f0cf137998 Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Mon, 25 Sep 2023 10:01:23 +0100 Subject: [PATCH 03/13] Run board tests separately to avoid overlap --- Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index c55f013..34e2893 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -292,7 +292,9 @@ pipeline { steps { catchError(stageResult: 'FAILURE', catchInterruptions: false) { create_spynnaker_config() - run_pytest('sPyNNaker/test_whole_board', 12000, 'test_whole_machine', 'integration', '16') + run_pytest('sPyNNaker/test_whole_board/test_borders.py', 12000, 'test_borders', 'integration', '16') + run_pytest('sPyNNaker/test_whole_board/test_board_sets.py', 12000, 'test_board_sets', 'integration', '16') + run_pytest('sPyNNaker/test_whole_board/test_whole_board.py', 12000, 'test_whole_machine', 'integration', '16') } } } From 1d37d2386bceb9a190c3b0857954d93a5e034485 Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Mon, 25 Sep 2023 10:02:08 +0100 Subject: [PATCH 04/13] Avoid doing all tests as a test --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 34e2893..4b62f99 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -174,7 +174,7 @@ pipeline { sh 'mkdir junit/' } } - stage('Unit Tests') { + /* stage('Unit Tests') { steps { // Empty config is sometimes needed in unit tests sh 'echo "# Empty config" > ~/.spinnaker.cfg' @@ -281,7 +281,7 @@ pipeline { run_pytest('Visualiser/visualiser_integration_tests', 12000, 'visualiser_Integration', 'integration', 'auto') } } - } + } */ stage('Run Whole Machine Tests') { /* when { environment name: 'THE_JOB', value: 'Integration_Tests_Cron_Job' From 92bc15a75cfef2b726a26ff675c3554229a3ea6a Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Tue, 26 Sep 2023 11:55:55 +0100 Subject: [PATCH 05/13] Try the link test --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 4b62f99..8b3b816 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -292,6 +292,7 @@ pipeline { steps { catchError(stageResult: 'FAILURE', catchInterruptions: false) { create_spynnaker_config() + run_pytest('SpiNNakerGraphFrontEnd/link_test/run_link_test.py', 12000, 'test_links', 'integration', '16') run_pytest('sPyNNaker/test_whole_board/test_borders.py', 12000, 'test_borders', 'integration', '16') run_pytest('sPyNNaker/test_whole_board/test_board_sets.py', 12000, 'test_board_sets', 'integration', '16') run_pytest('sPyNNaker/test_whole_board/test_whole_board.py', 12000, 'test_whole_machine', 'integration', '16') From 26850953d6e0d58223336fc7b9ef8ed2cad0fbd4 Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Tue, 26 Sep 2023 11:57:26 +0100 Subject: [PATCH 06/13] Try building this too --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 8b3b816..1983350 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -98,6 +98,7 @@ pipeline { run_in_pyenv('make -C sPyNNaker8NewModelTemplate/c_models') run_in_pyenv('make -C SpiNNakerGraphFrontEnd/gfe_examples') run_in_pyenv('make -C SpiNNakerGraphFrontEnd/gfe_integration_tests/') + run_in_pyenv('make -C SpiNNakerGraphFrontEnd/link_test/') run_in_pyenv('make -C SpiNNGym/c_code') run_in_pyenv('make -C MarkovChainMonteCarlo/c_models') run_in_pyenv('make -C SpiNNaker_PDP2/c_code') From a7c31ff22e31b4c6168b41a7dbf365d8519f14ae Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Tue, 26 Sep 2023 15:53:09 +0100 Subject: [PATCH 07/13] avoid errors stopping next test --- Jenkinsfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1983350..011dd49 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -291,11 +291,18 @@ pipeline { SPALLOC_PASSWORD = credentials('spalloc-password') } steps { + create_spynnaker_config() + create_gfe_config() catchError(stageResult: 'FAILURE', catchInterruptions: false) { - create_spynnaker_config() run_pytest('SpiNNakerGraphFrontEnd/link_test/run_link_test.py', 12000, 'test_links', 'integration', '16') + } + catchError(stageResult: 'FAILURE', catchInterruptions: false) { run_pytest('sPyNNaker/test_whole_board/test_borders.py', 12000, 'test_borders', 'integration', '16') + } + catchError(stageResult: 'FAILURE', catchInterruptions: false) { run_pytest('sPyNNaker/test_whole_board/test_board_sets.py', 12000, 'test_board_sets', 'integration', '16') + } + catchError(stageResult: 'FAILURE', catchInterruptions: false) { run_pytest('sPyNNaker/test_whole_board/test_whole_board.py', 12000, 'test_whole_machine', 'integration', '16') } } From 93db1a0cf36d43020bafae3e0573e815d1034fd9 Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Mon, 2 Oct 2023 08:24:05 +0100 Subject: [PATCH 08/13] Try a different distribution strategy --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 011dd49..8f0771c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -349,7 +349,8 @@ def run_pytest(String tests, int timeout, String results, String covfile, String covfile += '_cov.xml' sh 'echo "" > ' + resfile run_in_pyenv('py.test ' + tests + - ' -rs -n ' + threads + ' --forked --show-progress --cov-config=.coveragerc --cov-branch ' + + ' -rs -n ' + threads + ' --forked --maxschedchunk --show-progress' + + ' --cov-config=.coveragerc --cov-branch ' + '--cov spynnaker8 --cov spynnaker --cov spinn_front_end_common --cov pacman ' + '--cov data_specification --cov spinnman --cov spinn_machine --cov spalloc ' + '--cov spinn_utilities --cov spinnaker_graph_front_end ' + From 49398c5d1a3cd8407612958741e8043a1f0bfac7 Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Mon, 2 Oct 2023 08:27:44 +0100 Subject: [PATCH 09/13] Needs an argument! --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8f0771c..ba9e2fb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -349,7 +349,7 @@ def run_pytest(String tests, int timeout, String results, String covfile, String covfile += '_cov.xml' sh 'echo "" > ' + resfile run_in_pyenv('py.test ' + tests + - ' -rs -n ' + threads + ' --forked --maxschedchunk --show-progress' + + ' -rs -n ' + threads + ' --forked --maxschedchunk 1 --show-progress' + ' --cov-config=.coveragerc --cov-branch ' + '--cov spynnaker8 --cov spynnaker --cov spinn_front_end_common --cov pacman ' + '--cov data_specification --cov spinnman --cov spinn_machine --cov spalloc ' + From 3732ecc6524f0f66da0af9faa88e570453835f93 Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Mon, 2 Oct 2023 08:28:12 +0100 Subject: [PATCH 10/13] Fix argument --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ba9e2fb..99b1ba2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -349,7 +349,7 @@ def run_pytest(String tests, int timeout, String results, String covfile, String covfile += '_cov.xml' sh 'echo "" > ' + resfile run_in_pyenv('py.test ' + tests + - ' -rs -n ' + threads + ' --forked --maxschedchunk 1 --show-progress' + + ' -rs -n ' + threads + ' --forked --maxschedchunk=1 --show-progress' + ' --cov-config=.coveragerc --cov-branch ' + '--cov spynnaker8 --cov spynnaker --cov spinn_front_end_common --cov pacman ' + '--cov data_specification --cov spinnman --cov spinn_machine --cov spalloc ' + From 096461ca6c955f9ad41fcf793a2d831103f0d505 Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Tue, 10 Oct 2023 13:06:41 +0100 Subject: [PATCH 11/13] Make more normal for testing --- Jenkinsfile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 99b1ba2..638acda 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -98,7 +98,8 @@ pipeline { run_in_pyenv('make -C sPyNNaker8NewModelTemplate/c_models') run_in_pyenv('make -C SpiNNakerGraphFrontEnd/gfe_examples') run_in_pyenv('make -C SpiNNakerGraphFrontEnd/gfe_integration_tests/') - run_in_pyenv('make -C SpiNNakerGraphFrontEnd/link_test/') + // Keep for later + // run_in_pyenv('make -C SpiNNakerGraphFrontEnd/link_test/') run_in_pyenv('make -C SpiNNGym/c_code') run_in_pyenv('make -C MarkovChainMonteCarlo/c_models') run_in_pyenv('make -C SpiNNaker_PDP2/c_code') @@ -175,7 +176,7 @@ pipeline { sh 'mkdir junit/' } } - /* stage('Unit Tests') { + stage('Unit Tests') { steps { // Empty config is sometimes needed in unit tests sh 'echo "# Empty config" > ~/.spinnaker.cfg' @@ -282,18 +283,19 @@ pipeline { run_pytest('Visualiser/visualiser_integration_tests', 12000, 'visualiser_Integration', 'integration', 'auto') } } - } */ + } stage('Run Whole Machine Tests') { - /* when { + when { environment name: 'THE_JOB', value: 'Integration_Tests_Cron_Job' - } */ + } environment { SPALLOC_PASSWORD = credentials('spalloc-password') } steps { create_spynnaker_config() create_gfe_config() - catchError(stageResult: 'FAILURE', catchInterruptions: false) { + // Keep for later + /* catchError(stageResult: 'FAILURE', catchInterruptions: false) { run_pytest('SpiNNakerGraphFrontEnd/link_test/run_link_test.py', 12000, 'test_links', 'integration', '16') } catchError(stageResult: 'FAILURE', catchInterruptions: false) { @@ -301,7 +303,7 @@ pipeline { } catchError(stageResult: 'FAILURE', catchInterruptions: false) { run_pytest('sPyNNaker/test_whole_board/test_board_sets.py', 12000, 'test_board_sets', 'integration', '16') - } + } */ catchError(stageResult: 'FAILURE', catchInterruptions: false) { run_pytest('sPyNNaker/test_whole_board/test_whole_board.py', 12000, 'test_whole_machine', 'integration', '16') } From bc71ca7f5d285abb263a23ee8f5e799dde15cf70 Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Tue, 10 Oct 2023 13:55:09 +0100 Subject: [PATCH 12/13] Check this isn't what breaks it --- Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 638acda..e680071 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -351,8 +351,7 @@ def run_pytest(String tests, int timeout, String results, String covfile, String covfile += '_cov.xml' sh 'echo "" > ' + resfile run_in_pyenv('py.test ' + tests + - ' -rs -n ' + threads + ' --forked --maxschedchunk=1 --show-progress' + - ' --cov-config=.coveragerc --cov-branch ' + + ' -rs -n ' + threads + ' --forked --show-progress --cov-config=.coveragerc --cov-branch ' + '--cov spynnaker8 --cov spynnaker --cov spinn_front_end_common --cov pacman ' + '--cov data_specification --cov spinnman --cov spinn_machine --cov spalloc ' + '--cov spinn_utilities --cov spinnaker_graph_front_end ' + From 573377749ceaceb4867963cf9a79e187aeba8382 Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Tue, 10 Oct 2023 14:07:30 +0100 Subject: [PATCH 13/13] Go back to this, as it wasn't failing (doh) --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index e680071..638acda 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -351,7 +351,8 @@ def run_pytest(String tests, int timeout, String results, String covfile, String covfile += '_cov.xml' sh 'echo "" > ' + resfile run_in_pyenv('py.test ' + tests + - ' -rs -n ' + threads + ' --forked --show-progress --cov-config=.coveragerc --cov-branch ' + + ' -rs -n ' + threads + ' --forked --maxschedchunk=1 --show-progress' + + ' --cov-config=.coveragerc --cov-branch ' + '--cov spynnaker8 --cov spynnaker --cov spinn_front_end_common --cov pacman ' + '--cov data_specification --cov spinnman --cov spinn_machine --cov spalloc ' + '--cov spinn_utilities --cov spinnaker_graph_front_end ' +