FEATURE: Added dependency resolution script
This commit is contained in:
15
README.md
15
README.md
@ -16,8 +16,9 @@ The rules that apply for working in this directory are described in:
|
||||
## Changelog
|
||||
See [Changelog](Changelog.md)
|
||||
|
||||
<!-- DO NOT CHANGE FORMAT: this section is parsed to resolve dependencies -->
|
||||
|
||||
# Dependencies
|
||||
## Library
|
||||
Directory structure as given below
|
||||
* Firmware
|
||||
* TCL
|
||||
@ -29,8 +30,14 @@ Directory structure as given below
|
||||
* VivadoIp
|
||||
* [axi\_slave\_ipif\_package](https://git.psi.ch/GFA/Libraries/Firmware/VivadoIp/axi_slave_ipif_package) (1.0.2 or higher)
|
||||
|
||||
## External
|
||||
None
|
||||
|
||||
<!-- END OF PARSED SECTION -->
|
||||
|
||||
Dependencies can also be checked out using the python script *scripts/dependencies.py*. For details, refer to the help of the script:
|
||||
|
||||
```
|
||||
python dependencies.py -help
|
||||
```
|
||||
|
||||
Note that the [dependencies package](https://github.com/paulscherrerinstitute/PsiFpgaLibDependencies) must be installed in order to run the script.
|
||||
|
||||
|
||||
|
19
ci/ciFlow.py
19
ci/ciFlow.py
@ -1,19 +0,0 @@
|
||||
import os
|
||||
|
||||
os.chdir("../sim")
|
||||
|
||||
os.system("vsim -c -do ci.do")
|
||||
|
||||
with open("Transcript.transcript") as f:
|
||||
content = f.read()
|
||||
|
||||
#Expected Errors
|
||||
if "###ERROR###" in content:
|
||||
exit(-1)
|
||||
#Unexpected Errors
|
||||
if "SIMULATIONS COMPLETED SUCCESSFULLY" not in content:
|
||||
exit(-2)
|
||||
|
||||
|
||||
#Success
|
||||
exit(0)
|
26
scripts/ciFlow.py
Normal file
26
scripts/ciFlow.py
Normal file
@ -0,0 +1,26 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2018 by Paul Scherrer Institute, Switzerland
|
||||
# All rights reserved.
|
||||
# Authors: Oliver Bruendler
|
||||
##############################################################################
|
||||
import os
|
||||
|
||||
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
os.chdir(THIS_DIR + "/../sim")
|
||||
|
||||
os.system("vsim -batch -do ci.do -logfile Transcript.transcript")
|
||||
|
||||
with open("Transcript.transcript") as f:
|
||||
content = f.read()
|
||||
|
||||
#Expected Errors
|
||||
if "###ERROR###" in content:
|
||||
exit(-1)
|
||||
#Unexpected Errors
|
||||
if "SIMULATIONS COMPLETED SUCCESSFULLY" not in content:
|
||||
exit(-2)
|
||||
|
||||
|
||||
#Success
|
||||
exit(0)
|
10
scripts/dependencies.py
Normal file
10
scripts/dependencies.py
Normal file
@ -0,0 +1,10 @@
|
||||
from PsiFpgaLibDependencies import *
|
||||
import sys
|
||||
import os
|
||||
|
||||
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
dependencies = Parse.FromReadme(THIS_DIR + "/../README.md")
|
||||
repo = os.path.abspath(THIS_DIR + "/..")
|
||||
|
||||
Actions.ExecMain(repo, dependencies)
|
Reference in New Issue
Block a user