-
Notifications
You must be signed in to change notification settings - Fork 70
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
Fix Python tests #236
Merged
Merged
Fix Python tests #236
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bfd35e5
robotnix_common: fix and improve get_store_path()
jaen 27a3ebf
gitignore: add python caches
jaen 3a619a9
test_mk_repo_file: add initial branch parameter
jaen fdb1cd8
lineageos: drop stale updater test
jaen 40ec5a1
modules: update deps
jaen 9ed6761
git-repo: update to 2.45, patch to run locally
jaen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,6 @@ result | |
result-* | ||
|
||
__pycache__ | ||
.pytest_cache | ||
.mypy_cache | ||
.ruff_cache |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ system ? builtins.currentSystem }: | ||
let | ||
lock = builtins.fromJSON (builtins.readFile ./../flake.lock); | ||
flake-compat-entry = lock.nodes.root.inputs.flake-compat; | ||
|
||
inherit (lock.nodes."${ flake-compat-entry }".locked) owner repo narHash; | ||
|
||
flake-compat = builtins.fetchTarball { | ||
url = "https://github.com/${ owner }/${ repo }/archive/${ lock.nodes.flake-compat.locked.rev }.tar.gz"; | ||
sha256 = narHash; | ||
}; | ||
in | ||
import flake-compat { | ||
inherit system; | ||
|
||
src = ./..; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ lib, inputs, fetchFromGitHub, rsync, git, gnupg, less, openssh, ... }: | ||
let | ||
inherit (inputs) nixpkgs-unstable; | ||
|
||
unstablePkgs = nixpkgs-unstable.legacyPackages.x86_64-linux; | ||
in | ||
unstablePkgs.gitRepo.overrideAttrs(oldAttrs: rec { | ||
version = "2.45"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "android"; | ||
repo = "tools_repo"; | ||
rev = "v${ version }"; | ||
hash = "sha256-f765TcOHL8wdPa9qSmGegofjCXx1tF/K5bRQnYQcYVc="; | ||
}; | ||
|
||
nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ [ rsync git ]; | ||
|
||
repo2nixPatches = ./patches; | ||
|
||
# NOTE: why `git apply` instead of relying on `patches`? For some reason when | ||
# using `patches` the source `rsync`ed into `var/repo` is missing those changes | ||
installPhase = '' | ||
runHook preInstall | ||
|
||
mkdir -p var/repo | ||
rsync -a $src/ var/repo/ | ||
|
||
( | ||
export GIT_CONFIG_GLOBAL=$TMPDIR/.gitconfig | ||
export GIT_CONFIG_NOSYSTEM=true | ||
|
||
cd var/repo | ||
|
||
git config --global --add safe.directory "$PWD" | ||
git config --global user.email "nemo@nix" | ||
git config --global user.name "Nemo Nix" | ||
|
||
chmod +w -R . | ||
|
||
git init | ||
git add -A | ||
git commit -m "Upstream sources" | ||
|
||
git am $repo2nixPatches/*.patch | ||
|
||
git log -n 1 --format="%H" > ../../COMMITED_REPO_REV | ||
) | ||
|
||
mkdir -p $out/var/repo | ||
mkdir -p $out/bin | ||
|
||
rsync -a var/repo/ $out/var/repo/ | ||
|
||
# Copying instead of symlinking to the above directory is necessary, because otherwise | ||
# running `repo init` fails, as I assume the script gets confused by being located in | ||
# a git repo itself | ||
cp repo $out/bin/repo | ||
|
||
runHook postInstall | ||
''; | ||
|
||
# Specify the patched checkout as the default version of repo | ||
postFixup = '' | ||
wrapProgram "$out/bin/repo" \ | ||
--set REPO_URL "file://$out/var/repo" \ | ||
--set REPO_REV "$(cat ./COMMITED_REPO_REV)" \ | ||
--prefix PATH ":" "${ lib.makeBinPath [ git gnupg less openssh ] }" | ||
''; | ||
}) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay not 100% sure how to trace this commit to Android version, but I think that's right