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

androidenv: Fix avdmanager create avd #213871

Merged
merged 3 commits into from
Mar 3, 2023

Conversation

hadilq
Copy link
Contributor

@hadilq hadilq commented Jan 31, 2023

Description of changes

After adding cmdline-tools, the avdmanager create avd has the following problem

$ yes "" | avdmanager create avd --force --name testAVD --package 'system-images;android-33;google_apis;x86_64'
Error: Package path is not valid. Valid system image paths are:
null

where it cannot find the system-images. This PR fixes that problem, and also added example and test for it. Also there are some improvements in emulate-app.nix .

Nevertheless, this is a part of #208047

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@hadilq
Copy link
Contributor Author

hadilq commented Jan 31, 2023

@numinit Hey Morgan, would you please review this one as well. Thanks!

@hadilq
Copy link
Contributor Author

hadilq commented Feb 1, 2023

@ofborg build androidenv.test-suite.passthru.tests

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/using-allowunfree-to-run-tests-in-ofborg/25528/1

@hadilq
Copy link
Contributor Author

hadilq commented Feb 17, 2023

To resolve the conflict, I rebased, then push force, this branch. However, locally git log shows

* 18d3eb52d0d (HEAD -> androidenv/fix-create-avd) androidenv: set config.allowUnfree = true for integration tests
* c313bbc03c5 androidenv: add shell-with-emulator.nix to have test and more examples
* 58fa0626e40 androidenv: fix problem with avdmanager when trying to create an avd
*   2f19ce62f8f (origin/master, origin/HEAD) Merge pull request #216781 from viraptor/fnc-darwin

but github shows a commit, e70d685, that's not in my branch, locally! any idea?

@hadilq
Copy link
Contributor Author

hadilq commented Feb 17, 2023

I can squash those 3 commits into one, if you prefer to, but other than that, it's ready to merge.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/1838

@hadilq
Copy link
Contributor Author

hadilq commented Feb 17, 2023

ofborg failed with

error: reading from file: Connection reset by peer

       … while evaluating the attribute 'src' of the derivation 'python3.10-sphinxcontrib-devhelp-1.0.2'

which doesn't look like a problem in this PR!

@hadilq
Copy link
Contributor Author

hadilq commented Feb 17, 2023

rebased again :D it's fun!!

@Artturin
Copy link
Member

eval was broken in #199294 and fixed in 427d0b7 so rebased this pr on master again

To do so, we gathered different system images with the same
abiVersion in the same derivation.
androidenv: replace buildInputs with nativeBuildInputs
androidenv: set config.allowUnfree = true for integration tests

androidenv: fix concerns in the PR
@hadilq
Copy link
Contributor Author

hadilq commented Feb 28, 2023

Hey @Artturin , @SuperSandro2000 , @numinit ! I just squashed some commits, then rebased, and force pushed. let me know if there's any problem here. Thanks!

@Artturin Artturin merged commit 117fc28 into NixOS:master Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants