FEATURE: Added dependency resolution script

This commit is contained in:
Oliver Bruendler
2019-07-03 10:33:57 +02:00
parent 33915d6457
commit a8f4b821bd
4 changed files with 47 additions and 23 deletions

View File

@ -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.

View File

@ -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
View 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
View 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)