No GNATtest in GNAT Community Edition?

房东的猫 提交于 2021-01-04 11:03:47

问题


When I try to generate unit tests in GNAT 2020 Community Edition (Windows 10 64 bit), I get an error on missing gnattest tool: could not locate gnattest. Same happens on Ubuntu 20.04 (in WSL) with package gnat-10: could not locate x86_64-linux-gnu-gnattest-10.

Is GNATtest not part of GNAT 2020 Community Edition, as shown on AdaCores website (https://www.adacore.com/gnatpro/comparison)?


回答1:


Yes in 2020 Community Edition gnattest is not included. Main reason: gnattest is tool based on library ASIS which is no longer maintained. AdaCore is moving towards libadalang library and for now gnattest is a victim of these changes. It will back soon or later to Community Edition (when it will be rewritten to use libadalang). Source: I was hit by this same problem and I got this answer from AdaCore :)

At this moment, you can download source package asis-2019-20190517-18AB5-src.tar.gz from previous version of GNAT and compile it by self. At least for me, it works.




回答2:


AdaCore are moving away from ASIS to their own libadalang technology, and GNAT CE 2020 doesn’t include ASIS.

The ASIS-based applications in GNAT CE 2019 are

gnat2xml
gnat2xsd
gnatcheck
gnatelim
gnatmetric *
gnatpp *
gnatstub *
gnattest

of which only the ones marked with an asterisk are in GNAT CE 2020 (for macOS, at any rate).

If you do go with @thindil’s answer, it’d be best to install the ASIS tools in their own directory, so as to avoid stomping on gnatpp etc.

For info, gnatelim is missing because - for targets using the GNU linker - -ffunction-sections, -fdata-sections, and -gc-sections do the equivalent job




回答3:


On Ubuntu you can just install asis applications with : sudo apt install asis-programs



来源:https://stackoverflow.com/questions/62405736/no-gnattest-in-gnat-community-edition

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!