Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Never seem to get a cgreen-runner executable #299

Closed
JonJagger opened this issue Jun 26, 2022 · 5 comments
Closed

Never seem to get a cgreen-runner executable #299

JonJagger opened this issue Jun 26, 2022 · 5 comments

Comments

@JonJagger
Copy link

JonJagger commented Jun 26, 2022

Hi,
There are several cgreen test-frameworks installed in https://cyber-dojo.org
I'm trying to upgrade them (at the same time as upgrading the base C compiler).
Whatever I try I am completely failing to ever get a cgreen-runner executable.
I've tried building in an Alpine docker image and an Ubuntu docker image.
On Alpine I'm trying this...

apk add cmake wget unzip
wget https://github.com/cgreen-devs/cgreen/archive/refs/tags/1.5.1.zip
unzip 1.5.1.zip
cd cgreen-1.5.1

make
make test
make install
cd ..

And on Ubuntu the same except I use apt-get install --yes instead of apk add.
To be clear, after I've run this script; there is no cgreen-runner binary on the PATH.
There does not appear to be one in the cgreen-1.5.1 dir.
There does not appear to be one anywhere at all off the root / dir!
Any help would be greatly appreciated.
Thanks

@JonJagger JonJagger changed the title Never seem to get the cgreen-runner executable Never seem to get a cgreen-runner executable Jun 26, 2022
@thoni56
Copy link
Contributor

thoni56 commented Jun 26, 2022

Do you get any errors, or is the build finishing ok but no cgreen-runner?

If you get the library built, then I think you might have encountered the situation described in the README. To get the cgreen-runner you also need libbfd.

On Ubuntu this should do it

apt install binutils-dev

If not, get back with more details.

(Migrating from nm to libbfd to auto-discover tests introduced automatic "intelligence" to not build the runner if that library was not found. We should probably look into making a bigger warning when that happens, since using the runner is the prefered way to use cgreen.)

@JonJagger
Copy link
Author

JonJagger commented Jun 26, 2022

The build finished ok, with no apparant warnings, but no cgreen-runner :-(
Yes I did indeed need binutils-dev (on Alpine), and then it all was fine.
Thanks for the help
I definitely agree that adding some warnings for this situation would be nice.

I had to remove the line make test, leaving just make and make install
as 7 of the tests were failing (again on Alpine).

@thoni56
Copy link
Contributor

thoni56 commented Jun 26, 2022

Thanks for cyber-dojo! And I'm glad it was nothing more complicated.

@thoni56 thoni56 closed this as completed Jun 26, 2022
@thoni56
Copy link
Contributor

thoni56 commented Jun 26, 2022

I had to remove the line make test, leaving just make and make install
as 7 of the tests were failing (again on Alpine).

This seems strange. I haven't built on Alpine, but it builds and passes all tests on Ubuntu.

(Although I found that the Makefile invokes ctest with incorrect arguments. It doesn't take a "dir" argument, so should be "cd build; ctest" instead.)

Could you attach the output from the failing tests run with verbose, please? (cd build; ctest -V)

@thoni56
Copy link
Contributor

thoni56 commented Jun 26, 2022

Ok. I pulled the Alpine Docker image and see the errors:

The following tests FAILED:
      7 - constraint_messsages (BAD_COMMAND)
      8 - custom_constraint_messsages (BAD_COMMAND)
      9 - mock_messsages (BAD_COMMAND)
     10 - failure_messages (Failed)
     11 - assertion_messages (BAD_COMMAND)
     12 - ignore_messages (Failed)
     13 - xml_output (BAD_COMMAND)

Right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants