Commit 59dcd8c8 authored by Aimee Sutton's avatar Aimee Sutton Committed by udinator
Browse files

Update scripts for Metrics CI regression:


 bug fixes, change ISS to spike in CI regression
Signed-off-by: default avatarAimee Sutton <aimee.sutton@metrics.ca>
parent c1ef9953
......@@ -7,8 +7,8 @@ name: metrics-regress
on:
push:
branches: [ master ]
#pull_request:
# branches: [ master ]
# pull_request_target:
# branches: [ master ]
# If you fork this repository, you must create a new Metrics project for your fork
# and set the environment variable $METRICS_PROJECT_ID accordingly
......@@ -22,5 +22,6 @@ jobs:
METRICS_CI_TOKEN: ${{ secrets.METRICS_CI_TOKEN }}
METRICS_REGRESSION_NAME: riscv-dv_regression
METRICS_PROJECT_ID: ${{ secrets.METRICS_PROJECT_ID }}
PR_NUMBER: ${{ github.event.pull_request.number }}
shell: bash
{
"variables": {
"DSIM" : "${DSIM_HOME}/bin/dsim",
"DSIM_LIB_PATH" : "${DSIM_HOME}/uvm-1.2/src/dpi",
"RISCV_GCC" : "${RISCV_TOOLCHAIN}/bin/riscv-none-embed-gcc",
"RISCV_OBJCOPY" : "${RISCV_TOOLCHAIN}/bin/riscv-none-embed-objcopy",
"OVPSIM_PATH" : "/customer-tools/riscv-ovpsim/bin/Linux64"
},
"builds": {
"list": [{
"name": "rv32imc",
"image": "ibex-dsim-toolchain:latest",
"image": "ibex-toolchain:v2",
"memory" : "1",
"cmd": "python3 run.py --test riscv_arithmetic_basic_test --simulator dsim --output out --verbose --co",
"wavesCmd": "python3 run.py --test riscv_arithmetic_basic_test --simulator dsim --output out --verbose --co"
......@@ -27,8 +20,8 @@
"name": "riscv_arithmetic_basic_test",
"build": "rv32imc",
"iterations": 2,
"cmd": "cd /mux-flow/results; python3 <rootDir>/run.py --test riscv_arithmetic_basic_test --seed <seed> --simulator dsim --iss ovpsim --so --out <rootDir>/out --verbose; <rootDir>/scripts/check-status $?; rm -fr <rootDir>/out/dsim",
"wavesCmd": "python3 <rootDir>/run.py --test riscv_arithmetic_basic_test --seed <seed> --simulator dsim --iss ovpsim --so --out <rootDir>/out --verbose; <rootDir>/scripts/check-status $?; rm -rf out/dsim",
"cmd": "cd /mux-flow/results; python3 <rootDir>/run.py --test riscv_arithmetic_basic_test --seed <seed> --simulator dsim --iss spike --so --out <rootDir>/out --verbose; <rootDir>/scripts/check-status $?; rm -fr <rootDir>/out/dsim",
"wavesCmd": "python3 <rootDir>/run.py --test riscv_arithmetic_basic_test --seed <seed> --simulator dsim --iss spike --so --out <rootDir>/out --verbose; <rootDir>/scripts/check-status $?; rm -rf out/dsim",
"logFile": "simulation.log",
"metricsFile": "metrics.db",
"isPass": "Test passed",
......
......@@ -20,7 +20,7 @@
import json
runCmdBase = "cd /mux-flow/results; python3 <rootDir>/run.py --test TESTNAME --simulator dsim --iss ovpsim --seed <seed> --so --out <rootDir>/out --verbose; <rootDir>/scripts/check-status $?; rm -fr <rootDir>/out/dsim"
runCmdBase = "cd /mux-flow/results; python3 <rootDir>/run.py --test TESTNAME --simulator dsim --iss spike --seed <seed> --so --out <rootDir>/out --verbose; <rootDir>/scripts/check-status $?; rm -fr <rootDir>/out/dsim"
## Based on testlist located in <rootDir>/yaml/base_testlist.yaml
base_testList = ["riscv_arithmetic_basic_test",
......
......@@ -39,15 +39,21 @@ getRegressionRunInfo = '/api/v1/projects/'+args.projectId+'/regressionRuns/'
## Start regression
reqParams = {}
reqParams['regressionName'] = args.regressionName
reqParams['branch'] = str(os.environ['GITHUB_REF'])
# Determine the git reference to pass to Metrics. For PRs, the reference
# is of the format refs/pull/<PR-number>/merge
if str(os.environ['GITHUB_EVENT_NAME']) == 'pull_request_target':
reqParams['branch'] = 'refs/pull/' + str(os.environ['PR_NUMBER']) + '/merge'
else:
reqParams['branch'] = str(os.environ['GITHUB_REF'])
params = json.dumps(reqParams)
response, regressionData = make_http_request('POST', postRegression, params)
## Check response
if response.status is not 201:
if response.status != 201:
print('Error, regression was not started. Response: ' + str(response.status) + ':' \
+ str(response.reason))
+ str(response.reason) + ' ' + str(regressionData))
print('Exit with code 1')
exit(1)
else:
......@@ -59,7 +65,7 @@ regressionRunId = regressionData['id']
while True:
time.sleep(10)
response, regressionData = make_http_request('GET', getRegressionRunInfo+regressionRunId)
if response.status is 200:
if response.status == 200:
if 'complete' in regressionData['status']:
print('Regression complete')
break
......
......@@ -20,7 +20,7 @@
- iss: ovpsim
path_var: OVPSIM_PATH
cmd: >
<path_var>/riscvOVPsim.exe
<path_var>/riscvOVPsimPlus.exe
--controlfile <cfg_path>/riscvOVPsim.ic
--objfilenoentry <elf>
--override riscvOVPsim/cpu/simulateexceptions=T
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment