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

Cannot run-tests with --sandbox #229

Closed
TingPing opened this issue Nov 11, 2018 · 3 comments · Fixed by #353
Closed

Cannot run-tests with --sandbox #229

TingPing opened this issue Nov 11, 2018 · 3 comments · Fixed by #353

Comments

@TingPing
Copy link
Member

I'm not sure why this is limited but it is a pretty big restriction that doesn't make sense to me.

TingPing added a commit to flathub/org.gnome.Devhelp that referenced this issue Nov 11, 2018
This is a limitation of `flatpak-builder` that it cannot
run tests in a sandbox apparently:

flatpak/flatpak-builder#229
@alexlarsson
Copy link
Member

I don't think it is disallowed. specifying test-args is, but that is just how you would get --share=network into the tests for instance, which obviously isn't compatible with sandboxing.

@TingPing
Copy link
Member Author

A the time (its been a year..) it errored out-right.

kdesysadmin pushed a commit to KDE/kid3 that referenced this issue Jun 16, 2020
Unfortunately, it is not possible to run tests in the nightly build of
https://binary-factory.kde.org/. As soon as "run-tests" is in the json,
it fails with "Error: Can't specify test-args in sandboxed build". This
contrasts with what is said in
flatpak/flatpak-builder#229,
the message is issued in builder_options_get_build_args() of
flatpak-builder/src/builder-options.c.
@Unrud
Copy link
Contributor

Unrud commented Jun 21, 2020

I don't think it is disallowed.

@alexlarsson It's a bug:

/* Always run tests readonly */
g_ptr_array_add (array, g_strdup ("--readonly"));

if (array->len > 0 && builder_context_get_sandboxed (context))
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Can't specify test-args in sandboxed build");
return NULL;
}

array->len > 0 is always true because the array always contains at least the --readonly argument.

Unrud added a commit to Unrud/flatpak-builder that referenced this issue Jun 22, 2020
elboulangero added a commit to flathub/io.gitlab.Goodvibes that referenced this issue Sep 20, 2020
ttps://github.com/flatpak/flatpak-builder/issues/229 was closed, so I
guess it's time to try again
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

Successfully merging a pull request may close this issue.

3 participants