Split QA test running for now

Eventually we probably want to just pick one target for it,
but for now this means we can get faster test results as long
as we have a faster Ubuntu runner.
This commit is contained in:
Jon Evans 2021-03-31 21:30:09 -04:00
parent 31b50aac76
commit 41decb0f40
3 changed files with 39 additions and 23 deletions

View File

@ -86,58 +86,65 @@ report_metrics:
# Run the code unit tests. Each QA executable is split into a separate job so that the display # Run the code unit tests. Each QA executable is split into a separate job so that the display
# gives the test results broken down by the test executable. # gives the test results broken down by the test executable.
########################################################################## ##########################################################################
qa_python: .unit_test_fedora:
extends: extends:
- .unit_test - .unit_test
needs:
- job: build_linux
artifacts: true
qa_python:
extends:
- .unit_test_fedora
- .only_code - .only_code
variables: variables:
TEST: 'qa_python' TEST: 'qa_python'
qa_common: qa_common:
extends: extends:
- .unit_test - .unit_test_fedora
- .only_code - .only_code
variables: variables:
TEST: 'qa_common' TEST: 'qa_common'
qa_gerbview: qa_gerbview:
extends: extends:
- .unit_test - .unit_test_fedora
- .only_code - .only_code
variables: variables:
TEST: 'qa_gerbview' TEST: 'qa_gerbview'
qa_pcbnew: qa_pcbnew:
extends: extends:
- .unit_test - .unit_test_fedora
- .only_code - .only_code
variables: variables:
TEST: 'qa_pcbnew' TEST: 'qa_pcbnew'
qa_eeschema: qa_eeschema:
extends: extends:
- .unit_test - .unit_test_fedora
- .only_code - .only_code
variables: variables:
TEST: 'qa_eeschema' TEST: 'qa_eeschema'
qa_kimath: qa_kimath:
extends: extends:
- .unit_test - .unit_test_fedora
- .only_code - .only_code
variables: variables:
TEST: 'qa_kimath' TEST: 'qa_kimath'
qa_sexpr: qa_sexpr:
extends: extends:
- .unit_test - .unit_test_fedora
- .only_code - .only_code
variables: variables:
TEST: 'qa_sexpr' TEST: 'qa_sexpr'
qa_kicad2step: qa_kicad2step:
extends: extends:
- .unit_test - .unit_test_fedora
- .only_code - .only_code
variables: variables:
TEST: 'qa_kicad2step' TEST: 'qa_kicad2step'

View File

@ -53,12 +53,12 @@ build_ubuntu20.04:
- build/linux/compilation_log.txt - build/linux/compilation_log.txt
# Upload the compilation log in an easily downloadable form # Upload the compilation log in an easily downloadable form
report_build_warn: report_build_warn_ubuntu20.04:
stage: report stage: report
extends: .only_code extends: .only_code
when: always when: always
needs: needs:
- job: build_linux - job: build_ubuntu20.04
artifacts: true artifacts: true
script: script:
- echo "Uploading compilation log" - echo "Uploading compilation log"
@ -71,12 +71,12 @@ report_build_warn:
- compilation_log.txt - compilation_log.txt
# Report on the metrics of the code # Report on the metrics of the code
report_metrics: report_metrics_ubuntu20.04:
stage: report stage: report
extends: .only_code extends: .only_code
when: always when: always
needs: needs:
- job: build_linux - job: build_ubuntu20.04
artifacts: true artifacts: true
script: script:
- cat build/linux/compilation_log.txt | { grep "warning:" || test $? = 1; } | awk 'END{print "number_of_warnings "NR}' > metrics.txt - cat build/linux/compilation_log.txt | { grep "warning:" || test $? = 1; } | awk 'END{print "number_of_warnings "NR}' > metrics.txt
@ -85,63 +85,75 @@ report_metrics:
reports: reports:
metrics: metrics.txt metrics: metrics.txt
.unit_test_ubuntu20.04:
extends:
- .unit_test
needs:
########################################################################## ##########################################################################
# Run the code unit tests. Each QA executable is split into a separate job so that the display # Run the code unit tests. Each QA executable is split into a separate job so that the display
# gives the test results broken down by the test executable. # gives the test results broken down by the test executable.
########################################################################## ##########################################################################
qa_python: .unit_test_ubuntu20.04:
extends: extends:
- .unit_test - .unit_test
needs:
- job: build_ubunt20.04
artifacts: true
qa_python:
extends:
- .unit_test_ubuntu20.04
- .only_code - .only_code
variables: variables:
TEST: 'qa_python' TEST: 'qa_python'
qa_common: qa_common:
extends: extends:
- .unit_test - .unit_test_ubuntu20.04
- .only_code - .only_code
variables: variables:
TEST: 'qa_common' TEST: 'qa_common'
qa_gerbview: qa_gerbview:
extends: extends:
- .unit_test - .unit_test_ubuntu20.04
- .only_code - .only_code
variables: variables:
TEST: 'qa_gerbview' TEST: 'qa_gerbview'
qa_pcbnew: qa_pcbnew:
extends: extends:
- .unit_test - .unit_test_ubuntu20.04
- .only_code - .only_code
variables: variables:
TEST: 'qa_pcbnew' TEST: 'qa_pcbnew'
qa_eeschema: qa_eeschema:
extends: extends:
- .unit_test - .unit_test_ubuntu20.04
- .only_code - .only_code
variables: variables:
TEST: 'qa_eeschema' TEST: 'qa_eeschema'
qa_kimath: qa_kimath:
extends: extends:
- .unit_test - .unit_test_ubuntu20.04
- .only_code - .only_code
variables: variables:
TEST: 'qa_kimath' TEST: 'qa_kimath'
qa_sexpr: qa_sexpr:
extends: extends:
- .unit_test - .unit_test_ubuntu20.04
- .only_code - .only_code
variables: variables:
TEST: 'qa_sexpr' TEST: 'qa_sexpr'
qa_kicad2step: qa_kicad2step:
extends: extends:
- .unit_test - .unit_test_ubuntu20.04
- .only_code - .only_code
variables: variables:
TEST: 'qa_kicad2step' TEST: 'qa_kicad2step'

View File

@ -17,9 +17,6 @@
.unit_test: .unit_test:
stage: test stage: test
when: on_success when: on_success
needs:
- job: build_linux
artifacts: true
# We define this using a before script because GitLab cannot merge variable # We define this using a before script because GitLab cannot merge variable
# definitions across inheritance (so the variables block from this would disappear) # definitions across inheritance (so the variables block from this would disappear)
before_script: before_script: