Skip to content
Snippets Groups Projects
Commit ffaedcbe authored by Daniel van der Schuur's avatar Daniel van der Schuur
Browse files

Added gitlab-ci dir.

parent ed7bd0b9
Branches
Tags
1 merge request!45Resolve L2SDP-535
Pipeline #23588 passed
# About this folder
This folder contains the unit tests that are triggered in ../.gitlab-ci.yml.
import unittest
import os
RBF = '/home/schuur/git/hdl/applications/lofar2/images/lofar2_unb2b_sdp_station_full-r8026db491.rbf'
#RBF = '/home/schuur/git/hdl/applications/lofar2/images/lofar2_unb2b_sdp_station_bf-rc125dfd6d.rbf'
# The design name that should be read out
IMAGE= 'lofar2_unb2b_sdp_station_full-r1684353841'
class HardwareTest(unittest.TestCase):
def setUp(self):
"""
Program the FPGA. Below code will be replaced by calls to the OPC-UA
python client. For now we are using UPE GEAR in a shell script to
progam.
"""
os.system(f'./program_fpga.sh {RBF}')
def test_design_name(self):
"""
Read out the firmware design name and check if the name matches the
programming file. This will be replaced by code that uses the OPC-UA
python client.
"""
self.assertEqual(os.system(f'./read_design_name.sh {IMAGE}'), 0)
if __name__ == '__main__':
unittest.main()
#!/bin/bash
RBF=$1
UNB=2
PN=0
cd /home/schuur/git/upe_gear
source init_upe.sh
util_system_info.py --unb2 $UNB --pn $PN -n 4
#util_epcs.py --unb2 $UNB --pn2 $PN -n 4 -s $RBF
#!/bin/bash
IMAGE=$1
UNB=2
PN=0
cd /home/schuur/git/upe_gear
source init_upe.sh
# Below command will return 0 when design name matches, otherwise 1.
util_system_info.py --unb2 2 --pn2 0 -n 2 | grep Design | grep $IMAGE
# exit with return code of last command
exit $?
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment