I'm trying to run gnattest on a Ada project file:
gnattest -P(projectname)
and I get the following errors:
object path not found for runtime native gnattest: initialization failed
I made sure the gnatpro-v20.2/bin directory was part of the path. I tried adding other gnat directories to the path. I tried running the command inside of GPS and from command line.
I think I figured it out. The fact that running the sample gave me a different error inspired me to try creating a new, from scratch, gpr just for the unit testing. The project I was using before had a bunch of conditions in it and a main. I created a simple gpr, based on the sample, that didn't have a main.
At my company, when IT installs a product they do so on their accounts, so the environment for the users is not always updated . During my research I found there is a file called aunit.gpr that is in the share/gpr folder. I created a variable called GPR_PROJECT_PATH that pointed at that folder. This seems to have fixed it.