ARMmbed / mbed-os-tf-m-regression-tests

An Mbed OS application that runs the TF-M regression tests
2 stars 12 forks source link

Add vagrant #29

Closed Patater closed 4 years ago

Patater commented 4 years ago

Add a vagrantfile which can be used to set up an interactive development environment good for developing on TF-M and Mbed OS.

jainvikas8 commented 4 years ago

Please squash up commits as necessary, as these are newly added files. Explaining in commit message should be adequate to list features or any specific behavior.

jainvikas8 commented 4 years ago

One of the pip modules missing during vagrant machine

vagrant@vagrant:~/mbed-os-tf-m-regression-tests$ python3 build_psa_compliance.py -t GNUARM -m ARM_MUSCA_B1 -s IPC
[Build-PSA-Compliance-tests] 16:15:29: Using folder /home/vagrant/mbed-os-tf-m-regression-tests/mbed-os/features/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_IGNORE.
[Build-PSA-Compliance-tests] 16:15:29: psa-arch-tests repo exists, fetching latest....
[Build-PSA-Compliance-tests] 16:15:30: psa-arch-tests repo exists, checking out master....
[Build-PSA-Compliance-tests] 16:15:30: Checked out master successfully.
[Build-PSA-Compliance-tests] 16:15:30: trusted-firmware-m repo exists, fetching latest....
[Build-PSA-Compliance-tests] 16:15:31: trusted-firmware-m repo exists, checking out dev/feature-dualcore....
[Build-PSA-Compliance-tests] 16:15:31: Checked out dev/feature-dualcore successfully.
[Build-PSA-Compliance-tests] 16:15:31: Updating platform/manifests/driver_partition_psa.json manifest file.
[Build-PSA-Compliance-tests] 16:15:31: Updating platform/manifests/client_partition_psa.json manifest file.
[Build-PSA-Compliance-tests] 16:15:31: Updating platform/manifests/server_partition_psa.json manifest file.
[Build-PSA-Compliance-tests] 16:15:31: Traceback (most recent call last):.
[Build-PSA-Compliance-tests] 16:15:31:   File "tfm_parse_manifest_list.py", line 12, in <module>.
[Build-PSA-Compliance-tests] 16:15:31:     from jinja2 import Environment, BaseLoader, select_autoescape.
[Build-PSA-Compliance-tests] 16:15:31: ImportError: No module named jinja2.
[Build-PSA-Compliance-tests] 16:15:31: Unable to update TF-M database with PSA test manifests.
jainvikas8 commented 4 years ago

One of the pip modules missing during vagrant machine

vagrant@vagrant:~/mbed-os-tf-m-regression-tests$ python3 build_psa_compliance.py -t GNUARM -m ARM_MUSCA_B1 -s IPC
[Build-PSA-Compliance-tests] 16:15:29: Using folder /home/vagrant/mbed-os-tf-m-regression-tests/mbed-os/features/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_IGNORE.
[Build-PSA-Compliance-tests] 16:15:29: psa-arch-tests repo exists, fetching latest....
[Build-PSA-Compliance-tests] 16:15:30: psa-arch-tests repo exists, checking out master....
[Build-PSA-Compliance-tests] 16:15:30: Checked out master successfully.
[Build-PSA-Compliance-tests] 16:15:30: trusted-firmware-m repo exists, fetching latest....
[Build-PSA-Compliance-tests] 16:15:31: trusted-firmware-m repo exists, checking out dev/feature-dualcore....
[Build-PSA-Compliance-tests] 16:15:31: Checked out dev/feature-dualcore successfully.
[Build-PSA-Compliance-tests] 16:15:31: Updating platform/manifests/driver_partition_psa.json manifest file.
[Build-PSA-Compliance-tests] 16:15:31: Updating platform/manifests/client_partition_psa.json manifest file.
[Build-PSA-Compliance-tests] 16:15:31: Updating platform/manifests/server_partition_psa.json manifest file.
[Build-PSA-Compliance-tests] 16:15:31: Traceback (most recent call last):.
[Build-PSA-Compliance-tests] 16:15:31:   File "tfm_parse_manifest_list.py", line 12, in <module>.
[Build-PSA-Compliance-tests] 16:15:31:     from jinja2 import Environment, BaseLoader, select_autoescape.
[Build-PSA-Compliance-tests] 16:15:31: ImportError: No module named jinja2.
[Build-PSA-Compliance-tests] 16:15:31: Unable to update TF-M database with PSA test manifests.

I think the problem is Vagrant has python2 installed and the script tfm_parse_manifest_list.py runs as python2.
So :

Patater commented 4 years ago

Please squash up commits as necessary, as these are newly added files. Explaining in commit message should be adequate to list features or any specific behavior.

I would agree if I were fixing mistakes in the original commits, but I am not. I am extended and enhancing them gradually, and as each enhancement has its own separate justification, they deserve their own commits.

Patater commented 4 years ago

I think the problem is Vagrant has python2 installed and the script tfm_parse_manifest_list.py runs as python2. So :

* uninstall python2 completely from the vagrant machine, so that there are no surprises.

* fix #32

Switching to a newer version of Ubuntu should bring python3 as default. I'll try this route.

Patater commented 4 years ago

Works for me with #32 fixed now.

pc/test_i071/test_i071.c.o.
[Build-PSA-Compliance-tests] 08:11:09: [ 82%] Building C object CMakeFiles/client_partition.dir/ff/ipc/test_l088/test_l088.c.o.
[Build-PSA-Compliance-tests] 08:11:09: [ 84%] Linking C static library partition/client_partition.a.
[Build-PSA-Compliance-tests] 08:11:10: [ 84%] Built target client_partition.
[Build-PSA-Compliance-tests] 08:11:10: Scanning dependencies of target server_partition.
[Build-PSA-Compliance-tests] 08:11:10: [ 85%] Building C object CMakeFiles/server_partition.dir/ff/partition/server_partition.c.o.
[Build-PSA-Compliance-tests] 08:11:10: [ 86%] Building C object CMakeFiles/server_partition.dir/ff/ipc/test_i001/test_supp_i001.c.o.
[Build-PSA-Compliance-tests] 08:11:10: [ 88%] Building C object CMakeFiles/server_partition.dir/ff/ipc/test_i002/test_supp_i002.c.o.
[Build-PSA-Compliance-tests] 08:11:10: [ 89%] Building C object CMakeFiles/server_partition.dir/ff/ipc/test_i003/test_supp_i003.c.o.
[Build-PSA-Compliance-tests] 08:11:10: [ 91%] Building C object CMakeFiles/server_partition.dir/ff/ipc/test_i021/test_supp_i021.c.o.
[Build-PSA-Compliance-tests] 08:11:10: [ 92%] Building C object CMakeFiles/server_partition.dir/ff/ipc/test_i058/test_supp_i058.c.o.
[Build-PSA-Compliance-tests] 08:11:10: [ 94%] Building C object CMakeFiles/server_partition.dir/ff/ipc/test_i063/test_supp_i063.c.o.
[Build-PSA-Compliance-tests] 08:11:10: [ 95%] Building C object CMakeFiles/server_partition.dir/ff/ipc/test_i067/test_supp_i067.c.o.
[Build-PSA-Compliance-tests] 08:11:10: [ 97%] Building C object CMakeFiles/server_partition.dir/ff/ipc/test_i071/test_supp_i071.c.o.
[Build-PSA-Compliance-tests] 08:11:10: [ 98%] Building C object CMakeFiles/server_partition.dir/ff/ipc/test_l088/test_supp_l088.c.o.
[Build-PSA-Compliance-tests] 08:11:10: [100%] Linking C static library partition/server_partition.a.
[Build-PSA-Compliance-tests] 08:11:10: [100%] Built target server_partition.
[Build-PSA-Compliance-tests] 08:11:10: Copying val/val_nspe.a to test/lib/libval_nspe.a.
[Build-PSA-Compliance-tests] 08:11:10: Copying platform/pal_nspe.a to test/lib/libpal_nspe.a.
[Build-PSA-Compliance-tests] 08:11:10: Copying ff/ipc/test_combine.a to test/lib/libtest_combine.a.