Skip to content
Carl Karsten edited this page May 12, 2024 · 5 revisions
  1. CI test.

On the road to the first real automated test:

https://github.com/CarlFK/pici/tree/main/ansible/roles/ci/files/t1

You too can run these commands and see the results!

Test fails because we didn't load top.bit:

$ ssh -p 10222 [email protected] "openFPGALoader -b arty --reset"
Jtag frequency : requested 10.00MHz  -> real 10.00MHz 

$ ssh -p 10222 [email protected] "cd ci/t1; python t1.py"
Traceback (most recent call last):
  File "/home/pi/ci/t1/t1.py", line 7, in <module>
    assert button.value==1
           ^^^^^^^^^^^^^^^
AssertionError

$ echo $?
1

Load top.bit, test passes:

$ ssh -p 10222 [email protected] "cd ci/t1; openFPGALoader -b arty top.bit"
Jtag frequency : requested 10.00MHz  -> real 10.00MHz 
Open file DONE
Parse file DONE
load program
Flash SRAM: [==================================================] 100.00%
Done

$ ssh -p 10222 [email protected] "cd ci/t1; python t1.py"

$ echo $?
0

Shell script to reset, load, test:

$ ssh -p 10222 [email protected] "cd ci/t1;./t1.sh"
+ openFPGALoader -b arty --reset
Jtag frequency : requested 10.00MHz  -> real 10.00MHz 
+ openFPGALoader -b arty top.bit
Jtag frequency : requested 10.00MHz  -> real 10.00MHz 
Open file DONE
Parse file DONE
load program
Flash SRAM: [==================================================] 100.00%
Done
+ python3 t1.py

$ echo $?
0
Clone this wiki locally