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

mbed-cli: 1.8.3 -> 1.9.1 #55916

Merged
merged 2 commits into from Feb 20, 2019
Merged

mbed-cli: 1.8.3 -> 1.9.1 #55916

merged 2 commits into from Feb 20, 2019

Conversation

rvolosatovs
Copy link
Member

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

I tried to enable tests, but they fail, saying that main cannot be imported from mbed.
I believe this file is the reason: https://github.com/ARMmbed/mbed-cli/blob/1.9.1/mbed/__main__.py

@rvolosatovs
Copy link
Member Author

Refs #53954 (comment)
cc @dotlambda

@worldofpeace
Copy link
Contributor

I think I got the tests to run doing

diff --git a/pkgs/development/tools/mbed-cli/default.nix b/pkgs/development/tools/mbed-cli/default.nix
index 8b96d3a3011..cd80a5ad9e6 100644
--- a/pkgs/development/tools/mbed-cli/default.nix
+++ b/pkgs/development/tools/mbed-cli/default.nix
@@ -1,4 +1,4 @@
-{ lib, python3Packages }:
+{ lib, python3Packages, git, mercurial }:
 
 with python3Packages;
 
@@ -11,7 +11,18 @@ buildPythonApplication rec {
     sha256 = "1228plh55id03qywsw0ai88ypdpbh9iz18jfcyhn21pci7mj77fv";
   };
 
-  doCheck = false; # Tests cannot import mbed.
+  checkInputs = [
+    git
+    mercurial
+    pytest
+  ];
+
+  checkPhase = ''
+    export GIT_COMMITTER_NAME=nixbld
+    export EMAIL=nixbld@localhost
+    export GIT_COMMITTER_DATE=$SOURCE_DATE_EPOCH
+    pytest test
+  '';
 
   meta = with lib; {
     homepage = https://github.com/ARMmbed/mbed-cli;

Had to set identity env vars because it was making the tests fail.

@rvolosatovs
Copy link
Member Author

@worldofpeace I commited the change you proposed dd4a1c1

@dotlambda
Copy link
Member

@GrahamcOfBorg build mbed-cli

@dotlambda dotlambda merged commit 83568dc into NixOS:master Feb 20, 2019
@rvolosatovs rvolosatovs deleted the update/mbed-cli branch February 20, 2019 19:37
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.

None yet

4 participants