diff options
Diffstat (limited to 'pkgs/development/compilers/openjdk/tests')
4 files changed, 0 insertions, 126 deletions
diff --git a/pkgs/development/compilers/openjdk/tests/hello-logging.nix b/pkgs/development/compilers/openjdk/tests/hello-logging.nix deleted file mode 100644 index 71f3a5543f7c..000000000000 --- a/pkgs/development/compilers/openjdk/tests/hello-logging.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ jdk -, jre -, pkgs -}: - -/* 'Hello world' Java application derivation for use in tests */ -let - source = pkgs.writeTextDir "src/Hello.java" '' - import java.util.logging.Logger; - import java.util.logging.Level; - - class Hello { - static Logger logger = Logger.getLogger(Hello.class.getName()); - - public static void main(String[] args) { - logger.log(Level.INFO, "Hello, world!"); - } - } - ''; -in - pkgs.stdenv.mkDerivation { - pname = "hello"; - version = "1.0.0"; - - src = source; - - buildPhase = '' - runHook preBuildPhase - ${jdk}/bin/javac src/Hello.java - runHook postBuildPhase - ''; - installPhase = '' - runHook preInstallPhase - - mkdir -p $out/lib - cp src/Hello.class $out/lib - - mkdir -p $out/bin - cat >$out/bin/hello <<EOF; - #!/usr/bin/env sh - ${jre}/bin/java -cp $out/lib Hello - EOF - chmod a+x $out/bin/hello - - runHook postInstallPhase - ''; - } diff --git a/pkgs/development/compilers/openjdk/tests/hello.nix b/pkgs/development/compilers/openjdk/tests/hello.nix deleted file mode 100644 index bc5be4a9e9a9..000000000000 --- a/pkgs/development/compilers/openjdk/tests/hello.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ jdk -, jre -, pkgs -}: - -/* 'Hello world' Java application derivation for use in tests */ -let - source = pkgs.writeTextDir "src/Hello.java" '' - class Hello { - public static void main(String[] args) { - System.out.println("Hello, world!"); - } - } - ''; -in - pkgs.stdenv.mkDerivation { - pname = "hello"; - version = "1.0.0"; - - src = source; - - buildPhase = '' - runHook preBuildPhase - ${jdk}/bin/javac src/Hello.java - runHook postBuildPhase - ''; - installPhase = '' - runHook preInstallPhase - - mkdir -p $out/lib - cp src/Hello.class $out/lib - - mkdir -p $out/bin - cat >$out/bin/hello <<EOF; - #!/usr/bin/env sh - ${jre}/bin/java -cp $out/lib Hello - EOF - chmod a+x $out/bin/hello - - runHook postInstallPhase - ''; - } diff --git a/pkgs/development/compilers/openjdk/tests/test_jre_minimal.nix b/pkgs/development/compilers/openjdk/tests/test_jre_minimal.nix deleted file mode 100644 index ed7b839cd22b..000000000000 --- a/pkgs/development/compilers/openjdk/tests/test_jre_minimal.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ runCommand -, callPackage -, jdk -, jre_minimal -}: - -let - hello = callPackage ./hello.nix { - jdk = jdk; - jre = jre_minimal; - }; -in - runCommand "test" {} '' - ${hello}/bin/hello | grep "Hello, world!" - touch $out - '' diff --git a/pkgs/development/compilers/openjdk/tests/test_jre_minimal_with_logging.nix b/pkgs/development/compilers/openjdk/tests/test_jre_minimal_with_logging.nix deleted file mode 100644 index b9c417d3949c..000000000000 --- a/pkgs/development/compilers/openjdk/tests/test_jre_minimal_with_logging.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ runCommand -, callPackage -, jdk -, jre_minimal -}: - -let - hello-logging = callPackage ./hello-logging.nix { - jdk = jdk; - jre = jre_minimal.override { - modules = [ - "java.base" - "java.logging" - ]; - }; - }; -in - runCommand "test" {} '' - ${hello-logging}/bin/hello &>/dev/stdout | grep "Hello, world!" - touch $out - '' |