nixos/gjs: add test
This commit is contained in:
parent
b2238b7383
commit
7713889556
|
@ -260,6 +260,7 @@ in rec {
|
||||||
tests.fleet = callTestOnTheseSystems ["x86_64-linux"] tests/fleet.nix {};
|
tests.fleet = callTestOnTheseSystems ["x86_64-linux"] tests/fleet.nix {};
|
||||||
#tests.gitlab = callTest tests/gitlab.nix {};
|
#tests.gitlab = callTest tests/gitlab.nix {};
|
||||||
tests.gitolite = callTest tests/gitolite.nix {};
|
tests.gitolite = callTest tests/gitolite.nix {};
|
||||||
|
tests.gjs = callTest tests/gjs.nix {};
|
||||||
tests.gocd-agent = callTest tests/gocd-agent.nix {};
|
tests.gocd-agent = callTest tests/gocd-agent.nix {};
|
||||||
tests.gocd-server = callTest tests/gocd-server.nix {};
|
tests.gocd-server = callTest tests/gocd-server.nix {};
|
||||||
tests.gnome3 = callTest tests/gnome3.nix {};
|
tests.gnome3 = callTest tests/gnome3.nix {};
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
# run installed tests
|
||||||
|
import ./make-test.nix ({ pkgs, ... }: {
|
||||||
|
name = "gjs";
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
maintainers = pkgs.gnome3.gjs.meta.maintainers;
|
||||||
|
};
|
||||||
|
|
||||||
|
machine = { pkgs, ... }: {
|
||||||
|
imports = [ ./common/x11.nix ];
|
||||||
|
environment.systemPackages = with pkgs; [ gnome-desktop-testing ];
|
||||||
|
environment.variables.XDG_DATA_DIRS = [ "${pkgs.gnome3.gjs.installedTests}/share" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = ''
|
||||||
|
$machine->waitForX;
|
||||||
|
$machine->succeed("gnome-desktop-testing-runner");
|
||||||
|
'';
|
||||||
|
})
|
|
@ -1,16 +1,35 @@
|
||||||
{ fetchurl, stdenv, pkgconfig, gnome3, gtk3, gobjectIntrospection
|
{ fetchurl, stdenv, pkgconfig, gnome3, gtk3, atk, gobjectIntrospection
|
||||||
, spidermonkey_52, pango, readline, glib, libxml2, dbus }:
|
, spidermonkey_52, pango, readline, glib, libxml2, dbus, gdk_pixbuf
|
||||||
|
, makeWrapper }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
inherit (import ./src.nix fetchurl) name src;
|
inherit (import ./src.nix fetchurl) name src;
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
outputs = [ "out" "installedTests" ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ pkgconfig makeWrapper ];
|
||||||
buildInputs = [ libxml2 gobjectIntrospection gtk3 glib pango readline dbus ];
|
buildInputs = [ libxml2 gobjectIntrospection gtk3 glib pango readline dbus ];
|
||||||
|
|
||||||
propagatedBuildInputs = [ spidermonkey_52 ];
|
propagatedBuildInputs = [ spidermonkey_52 ];
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
"--enable-installed-tests"
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
for f in installed-tests/*.test.in; do
|
||||||
|
substituteInPlace "$f" --subst-var-by pkglibexecdir "$installedTests/libexec/gjs"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
sed 's|-lreadline|-L${readline.out}/lib -lreadline|g' -i $out/lib/libgjs.la
|
sed 's|-lreadline|-L${readline.out}/lib -lreadline|g' -i $out/lib/libgjs.la
|
||||||
|
|
||||||
|
moveToOutput "share/installed-tests" "$installedTests"
|
||||||
|
moveToOutput "libexec/gjs/installed-tests" "$installedTests"
|
||||||
|
|
||||||
|
wrapProgram "$installedTests/libexec/gjs/installed-tests/minijasmine" \
|
||||||
|
--prefix GI_TYPELIB_PATH : "${stdenv.lib.makeSearchPath "lib/girepository-1.0" [ gtk3 atk pango.out gdk_pixbuf ]}:$installedTests/libexec/gjs/installed-tests"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
|
Loading…
Reference in New Issue