mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 12:29:02 +02:00
Merge pull request #294117 from Pamplemousse/bash_unit
bash_unit: run tests in `checkPhase`
This commit is contained in:
commit
a651d4cb55
|
@ -13,6 +13,30 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "sha256-sYs7b6I1VhO2TLLhMFuaV9AtLoavcoKvCRYfVNGAg20=";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
runHook prePatch
|
||||
|
||||
patchShebangs bash_unit
|
||||
|
||||
for t in tests/test_*; do
|
||||
chmod +x "$t" # make test file visible to `patchShebangs`
|
||||
patchShebangs "$t"
|
||||
chmod -x "$t"
|
||||
done
|
||||
|
||||
runHook postPatch
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
./bash_unit ./tests/test_core.sh
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp bash_unit $out/bin/
|
||||
|
|
Loading…
Reference in a new issue