Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7d30b4d1b57f
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0dfdfc263d18
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Dec 10, 2019

  1. Verified

    This commit was signed with the committer’s verified signature.
    peterromfeldhk Peter Romfeld
    Copy the full SHA
    e9007b3 View commit details

Commits on Apr 24, 2020

  1. Merge pull request #75117 from davidak/phoronix-test-suite-tests

    phoronix-test-suite: add tests
    garbas authored Apr 24, 2020
    Copy the full SHA
    0dfdfc2 View commit details
Showing with 25 additions and 1 deletion.
  1. +5 −1 pkgs/tools/misc/phoronix-test-suite/default.nix
  2. +20 −0 pkgs/tools/misc/phoronix-test-suite/tests.nix
6 changes: 5 additions & 1 deletion pkgs/tools/misc/phoronix-test-suite/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, php, which, gnused, makeWrapper, gnumake, gcc }:
{ stdenv, fetchurl, php, which, gnused, makeWrapper, gnumake, gcc, callPackage }:

stdenv.mkDerivation rec {
pname = "phoronix-test-suite";
@@ -19,6 +19,10 @@ stdenv.mkDerivation rec {
--prefix PATH : ${stdenv.lib.makeBinPath [ gnumake gcc ]}
'';

passthru.tests = {
simple-execution = callPackage ./tests.nix { };
};

meta = with stdenv.lib; {
description = "Open-Source, Automated Benchmarking";
homepage = "https://www.phoronix-test-suite.com/";
20 changes: 20 additions & 0 deletions pkgs/tools/misc/phoronix-test-suite/tests.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{ runCommand, phoronix-test-suite }:

let
inherit (phoronix-test-suite) pname version;
in

runCommand "${pname}-tests" { meta.timeout = 3; }
''
# automatic initial setup to prevent interactive questions
${phoronix-test-suite}/bin/phoronix-test-suite enterprise-setup >/dev/null
# get version of installed program and compare with package version
if [[ `${phoronix-test-suite}/bin/phoronix-test-suite version` != *"${version}"* ]]; then
echo "Error: program version does not match package version"
exit 1
fi
# run dummy command
${phoronix-test-suite}/bin/phoronix-test-suite dummy_module.dummy-command >/dev/null
# needed for Nix to register the command as successful
touch $out
''