Skip to content
Snippets Groups Projects
Commit d389f762 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Some more development conveniences

eg: nix-build --arg trialArgs '["-x"]'
parent 1bc95d9a
Branches
No related tags found
1 merge request!59Unblinded token web interface
{ pkgs ? import ./nixpkgs.nix { }, hypothesisProfile ? null, collectCoverage ? false, testSuite ? null }:
pkgs.python27Packages.zkapauthorizer.override { inherit hypothesisProfile collectCoverage testSuite; }
{ pkgs ? import ./nixpkgs.nix { }, hypothesisProfile ? null, collectCoverage ? false, testSuite ? null, trialArgs ? [] }:
pkgs.python27Packages.zkapauthorizer.override { inherit hypothesisProfile collectCoverage testSuite trialArgs; }
......@@ -4,10 +4,12 @@
, hypothesisProfile ? null
, collectCoverage ? false
, testSuite ? null
, trialArgs ? []
}:
let
hypothesisProfile' = if hypothesisProfile == null then "default" else hypothesisProfile;
testSuite' = if testSuite == null then "_zkapauthorizer" else testSuite;
extraTrialArgs = builtins.concatStringsSep " " trialArgs;
in
buildPythonPackage rec {
version = "0.0";
......@@ -39,15 +41,14 @@ buildPythonPackage rec {
treq
];
checkPhase = ''
runHook preCheck
set -x
"${pyflakes}/bin/pyflakes" src/_zkapauthorizer
ZKAPAUTHORIZER_HYPOTHESIS_PROFILE=${hypothesisProfile'} python -m ${if collectCoverage
then "coverage run --branch --source _zkapauthorizer,twisted.plugins.zkapauthorizer --module"
else ""
} twisted.trial ${testSuite'}
} twisted.trial ${extraTrialArgs} ${testSuite'}
runHook postCheck
'';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment