Unverified Commit c32dd072 authored by Bob van der Linden's avatar Bob van der Linden
Browse files

pjsip: add version and pkg-config tests

parent 532911e9
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
{ lib
, testers
, stdenv
, fetchFromGitHub
, fetchpatch
@@ -102,6 +103,16 @@ stdenv.mkDerivation (finalAttrs: {
  # We need the libgcc_s.so.1 loadable (for pthread_cancel to work)
  dontPatchELF = true;

  passthru.tests.version = testers.testVersion {
    package = finalAttrs.finalPackage;
    command = "pjsua --version";
  };

  passthru.tests.pkg-config = testers.hasPkgConfigModule {
    package = finalAttrs.finalPackage;
    moduleName = "libpjproject";
  };

  passthru.tests.python-pjsua2 = runCommand "python-pjsua2" { } ''
    ${(python3.withPackages (pkgs: [ pkgs.pjsua2 ])).interpreter} -c "import pjsua2" > $out
  '';