mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-26 08:48:38 +03:00
sgx-azure-quote-provider: add test-suite derivation
This commit is contained in:
parent
da0dc8339c
commit
4e937f0d6b
@ -7,6 +7,7 @@
|
||||
, openssl
|
||||
, pkg-config
|
||||
, linkFarmFromDrvs
|
||||
, callPackage
|
||||
}:
|
||||
|
||||
let
|
||||
@ -78,6 +79,10 @@ stdenv.mkDerivation rec {
|
||||
"prefix=$(out)"
|
||||
];
|
||||
|
||||
# Online test suite; run with
|
||||
# $(nix-build -A sgx-azure-dcap-client.tests.suite)/bin/tests
|
||||
passthru.tests.suite = callPackage ./test-suite.nix { };
|
||||
|
||||
meta = with lib; {
|
||||
description = "Interfaces between SGX SDKs and the Azure Attestation SGX Certification Cache";
|
||||
homepage = "https://github.com/microsoft/azure-dcap-client";
|
||||
|
27
pkgs/os-specific/linux/sgx/azure-dcap-client/test-suite.nix
Normal file
27
pkgs/os-specific/linux/sgx/azure-dcap-client/test-suite.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ lib
|
||||
, sgx-azure-dcap-client
|
||||
, gtest
|
||||
, makeWrapper
|
||||
}:
|
||||
sgx-azure-dcap-client.overrideAttrs (oldAttrs: {
|
||||
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [
|
||||
makeWrapper
|
||||
gtest
|
||||
];
|
||||
|
||||
buildFlags = [
|
||||
"tests"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D ./src/Linux/tests "$out/bin/tests"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram "$out/bin/tests" --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ sgx-azure-dcap-client ]}"
|
||||
'';
|
||||
})
|
Loading…
Reference in New Issue
Block a user