davmac314 / dinit

Service monitoring / "init" system
Apache License 2.0
622 stars 49 forks source link

meson: Use `igr-runner` for igr-tests #344

Closed mobin-2008 closed 5 months ago

mobin-2008 commented 5 months ago

Hi.

Summary of changes:

  1. igr_dinit_socket_path is removed and socket_path should be prepared for each test to avoid any race condition instead.
  2. Added ability to run a single test to support meson tests wrapper.
  3. Any path from source (such as expected results) should use igr_base_basedir which is set by meson (default values are for Make based runtime).

For meson igr-tests, I decide to stay with manual list but it's now really simple to add new test, Just add name of test to a list and everything will work out-of-box.

Fixes #302

Signed-off-by: Mobin Aydinfar <mobin@mobintestserver.ir>

mobin-2008 commented 5 months ago

@davmac314 Are you sure there should be a mconfig.h include in igr-runner.cc? It doesn't make sense to me.

davmac314 commented 5 months ago

@davmac314 Are you sure there should be a mconfig.h include in igr-runner.cc? It doesn't make sense to me.

SUPPORT_CGROUPS is needed in no_command_error_test, take a look

mobin-2008 commented 5 months ago

@davmac314 Are you sure there should be a mconfig.h include in igr-runner.cc? It doesn't make sense to me.

SUPPORT_CGROUPS is needed in no_command_error_test, take a look

It got compiled without that include (How?) and I didn't see that, Sorry. I'm quite sure that "../../build/includes/mconfig.h" is a ugly include and should be replaced with a proper include. I'm going to post a fix tomorrow.

davmac314 commented 5 months ago

It got compiled without that include (How?)

There's no reason why it wouldn't compile, but if SUPPORT_CGROUPS was supposed to be set, the test would fail.

davmac314 commented 5 months ago

I am unsubscribing because I don't want notifications until the PR is ready for review. It would be good if you could hold off on opening PRs until they are ready (at least locally tested).

mobin-2008 commented 5 months ago

I am unsubscribing because I don't want notifications until the PR is ready for review. It would be good if you could hold off on opening PRs until they are ready (at least locally tested).

I locally tested it and it worked but CI is failing. Sorry about inconvenience.

davmac314 commented 5 months ago

I locally tested it and it worked but CI is failing

CI is failing because the meson build is failing. I don't see how that could've succeeded locally.

mobin-2008 commented 5 months ago

I locally tested it and it worked but CI is failing

CI is failing because the meson build is failing. I don't see how that could've succeeded locally.

Because I found out right now that's OK because of previous make compile, I tested meson after make in my local.