mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
visidata: enable tests
This commit is contained in:
parent
d291623887
commit
4a8d262c7c
@ -1,5 +1,6 @@
|
||||
{ buildPythonApplication
|
||||
{ stdenv
|
||||
, lib
|
||||
, buildPythonApplication
|
||||
, fetchFromGitHub
|
||||
, dateutil
|
||||
, pandas
|
||||
@ -18,6 +19,7 @@
|
||||
, wcwidth
|
||||
, zstandard
|
||||
, setuptools
|
||||
, git
|
||||
, withPcap ? true, dpkt, dnslib
|
||||
}:
|
||||
buildPythonApplication rec {
|
||||
@ -61,7 +63,33 @@ buildPythonApplication rec {
|
||||
setuptools
|
||||
] ++ lib.optionals withPcap [ dpkt dnslib ];
|
||||
|
||||
doCheck = false;
|
||||
checkInputs = [
|
||||
git
|
||||
];
|
||||
|
||||
# check phase uses the output bin, which is not possible when cross-compiling
|
||||
doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
|
||||
|
||||
checkPhase = ''
|
||||
# disable some tests which require access to the network
|
||||
rm tests/load-http.vd # http
|
||||
rm tests/graph-cursor-nosave.vd # http
|
||||
rm tests/messenger-nosave.vd # dns
|
||||
|
||||
# disable some tests which expect Python == 3.6 (not our current version)
|
||||
# see https://github.com/saulpw/visidata/issues/1014
|
||||
rm tests/describe.vd
|
||||
rm tests/describe-error.vd
|
||||
rm tests/edit-type.vd
|
||||
|
||||
# tests use git to compare outputs to references
|
||||
git init -b "test-reference"
|
||||
git config user.name "nobody"; git config user.email "no@where"
|
||||
git add .; git commit -m "test reference"
|
||||
|
||||
substituteInPlace dev/test.sh --replace "bin/vd" "$out/bin/vd"
|
||||
bash dev/test.sh
|
||||
'';
|
||||
|
||||
meta = {
|
||||
inherit version;
|
||||
|
Loading…
Reference in New Issue
Block a user