Skip to content

Commit

Permalink
[test] Add riscv_compliance to CI.
Browse files Browse the repository at this point in the history
This only adds the verilator version, the FPGA version works
only locally until CI enables FPGA test runs.

Signed-off-by: Timothy Chen <[email protected]>
  • Loading branch information
Timothy Chen authored and GregAC committed Dec 2, 2019
1 parent 82efee9 commit 7277963
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
30 changes: 30 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,35 @@ jobs:
ci/run_verilator_pytest.sh
displayName: 'Execute tests'
- job: "riscv_compliance_tests"
displayName: "Execute RISC-V compliance tests"
pool: "Default"
dependsOn:
- top_earlgrey_verilator
- execute_verilated_tests
steps:
- bash: |
sudo apt-get install -y python3 python3-pip build-essential srecord python3-setuptools zlib1g-dev libusb-1.0 libftdi1-dev libftdi1-2 libssl-dev \
&& sudo pip3 install -U -r python-requirements.txt
displayName: 'Install dependencies'
- download: current
artifact: 'dist-partial-top_earlgrey_verilator'
displayName: 'Download verilated simulator'
- bash: |
cd "$(Build.ArtifactStagingDirectory)"
tar --overwrite -xvf \
"$(Pipeline.Workspace)/dist-partial-top_earlgrey_verilator/dist-partial-top_earlgrey_verilator.tar"
displayName: 'Unpack pipeline artifacts'
- bash: |
export TARGET_SIM="$(Build.ArtifactStagingDirectory)/dist/hw/top_earlgrey/Vtop_earlgrey_verilator"
export RISCV_DEVICE=rv32imc
export RISCV_TARGET=opentitan
export OT_TARGET=verilator
export OT_TOOLS="${TOOLCHAIN_PATH}/bin"
cd sw/vendor/riscv_compliance
make RISCV_ISA=rv32i
displayName: 'Execute tests'
- job: "deploy_releaseartifacts"
displayName: "Package and deploy release distribution"
pool:
Expand All @@ -285,6 +314,7 @@ jobs:
- sw_build
- top_earlgrey_verilator
- top_earlgrey_nexysvideo
- riscv_compliance_tests
condition: eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0')
steps:
- bash: |
Expand Down
12 changes: 10 additions & 2 deletions test/systemtest/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ def logfile(pytestconfig):
log = pytestconfig.getoption('log')
if not log:
return
path = Path(log).resolve()
assert not path.is_dir()
# The strict option is only availabe on python 3.6
# CI currently uses >=3.5.2
# Turns out however even not using resolve doesn't work.
# The logging function in 3.5 uses os.path.isabs to check whether
# path is absolute and does not accept POSIXPATH objects
# path = Path(log).resolve(strict=False)
# assert not path.is_dir()

path = os.path.abspath(log)
assert not os.path.isdir(path)
return path

0 comments on commit 7277963

Please sign in to comment.