Parallel Code Coverage for CI

This commit is contained in:
Johannes Feldmann
2018-12-18 09:39:48 +01:00
parent 002925bc25
commit 037a9686a7
4 changed files with 24 additions and 3 deletions

View File

@@ -23,12 +23,17 @@ build:
- cd build
- qmake ../DRAMSys/DRAMSys.pro
- make -j4
- mkdir -p coverage
coverage:
stage: Coverage
coverage: '/^TOTAL.*\s+(\d+\%)$/'
script:
- gcovr -r build/
- lcov `find coverage -type f -exec echo "-a {}" \;` -o coverage/final.out
artifacts:
paths:
- coverage/final.out
include:
- '/DRAMSys/tests/DDR3/ci.yml'

View File

@@ -10,9 +10,12 @@ example_ddr3:
- perl -e 'if(`sqldiff ../../DRAMSys/tests/DDR3/expected/ddr3-example_ddr3_ch0.tdb ddr3-example_ddr3_ch0.tdb` eq "") {exit(0)} else {exit(-1)}'
- cd ../traceAnalyzer
- python3 ../../DRAMSys/traceAnalyzer/scripts/tests.py ../simulator/ddr3-example_ddr3_ch0.tdb | if ! grep "failed"; then exit 0; else exit 1; fi
# Run Code Coverage
- lcov -c -d build/ -o coverage/{$CI_JOB_NAME}.out
artifacts:
paths:
- build/simulator/ddr3-example_ddr3_ch0.tdb
- coverage/{$CI_JOB_NAME}.out
expire_in: 2 days
# Testing Reordering with FR_FCFS Scheduling Algorithm:
@@ -27,12 +30,15 @@ fr_fcfs:
- perl -e 'if(`sqldiff ../../DRAMSys/tests/DDR3/expected/ddr3-fr_fcfs_ddr3_ch0.tdb ddr3-fr_fcfs_ddr3_ch0.tdb` eq "") {exit(0)} else {exit(-1)}'
- cd ../traceAnalyzer
- python3 ../../DRAMSys/traceAnalyzer/scripts/tests.py ../simulator/ddr3-fr_fcfs_ddr3_ch0.tdb | if ! grep "failed"; then exit 0; else exit 1; fi
# Run Code Coverage
- lcov -c -d build/ -o coverage/{$CI_JOB_NAME}.out
allow_failure: true # TODO should be removed after first tests
artifacts:
paths:
- build/simulator/ddr3-fr_fcfs_ddr3_ch0.tdb
- coverage/{$CI_JOB_NAME}.out
expire_in: 2 days
# Testing with TLM Protocol Cchecker
@@ -42,3 +48,10 @@ protocol_checker:
- cd build/simulator
- ./DRAMSys ../../DRAMSys/tests/DDR3/simulations/ddr3-protocol_checker.xml ../../DRAMSys/tests/DDR3/
- echo "TODO"
# Run Code Coverage
- lcov -c -d build/ -o coverage/{$CI_JOB_NAME}.out
artifacts:
paths:
- coverage/{$CI_JOB_NAME}.out
expire_in: 2 days

View File

@@ -15,7 +15,9 @@ example_wideio:
- python3 ../../DRAMSys/traceAnalyzer/scripts/tests.py ../simulator/wideio-example_wideio_ch1.tdb | if ! grep "failed"; then exit 0; else exit 1; fi
- python3 ../../DRAMSys/traceAnalyzer/scripts/tests.py ../simulator/wideio-example_wideio_ch2.tdb | if ! grep "failed"; then exit 0; else exit 1; fi
- python3 ../../DRAMSys/traceAnalyzer/scripts/tests.py ../simulator/wideio-example_wideio_ch3.tdb | if ! grep "failed"; then exit 0; else exit 1; fi
# Run Code Coverage
- lcov -c -d build/ -o coverage/{$CI_JOB_NAME}.out
allow_failure: true # TODO: should be removed once the problems are fixed!
artifacts:
@@ -24,5 +26,6 @@ example_wideio:
- build/simulator/wideio-example_wideio_ch1.tdb
- build/simulator/wideio-example_wideio_ch2.tdb
- build/simulator/wideio-example_wideio_ch3.tdb
- coverage/{$CI_JOB_NAME}.out
expire_in: 2 days

View File

@@ -6,7 +6,7 @@ framework that consists of models reflecting the DRAM functionality, power
consumption, temperature behaviour and retention time errors.
Pipeline Status: [![pipeline status](https://git.eit.uni-kl.de/ems/astdm/dram.sys/badges/master/pipeline.svg)](https://git.eit.uni-kl.de/ems/astdm/dram.sys/commits/master)
[![Coverage report](https://git.eit.uni-kl.de/ems/astdm/dram.sys/badges/master/coverage.svg?job=coverage)](https://git.eit.uni-kl.de/ems/astdm/dram.sys/commits/master)
## Basic Setup
Open a terminal window, go to your home directory, create a directory for your