gnu: icedtea6: Split test fixing phases.

* gnu/packages/java.scm (icedtea6)[arguments]: Split phase 'fix-tests into
  three phases 'fix-test-framework, 'fix-hotspot-tests, and 'fix-jdk-tests.
This commit is contained in:
Ricardo Wurmus 2015-04-20 12:55:20 +02:00
parent 4ca009c036
commit 47c8ba5a51
1 changed files with 108 additions and 103 deletions

View File

@ -397,7 +397,7 @@ build process and its dependencies, whereas Make uses Makefile format.")
(setenv "PATH" (string-append antpath "/bin:" (setenv "PATH" (string-append antpath "/bin:"
(getenv "PATH"))))) (getenv "PATH")))))
(alist-cons-before (alist-cons-before
'check 'fix-tests 'check 'fix-test-framework
(lambda _ (lambda _
;; Fix PATH in test environment ;; Fix PATH in test environment
(substitute* "src/jtreg/com/sun/javatest/regtest/Main.java" (substitute* "src/jtreg/com/sun/javatest/regtest/Main.java"
@ -405,8 +405,10 @@ build process and its dependencies, whereas Make uses Makefile format.")
(string-append "PATH=" (getenv "PATH")))) (string-append "PATH=" (getenv "PATH"))))
(substitute* "src/jtreg/com/sun/javatest/util/SysEnv.java" (substitute* "src/jtreg/com/sun/javatest/util/SysEnv.java"
(("/usr/bin/env") (which "env"))) (("/usr/bin/env") (which "env")))
#t)
;; Hotspot tests (alist-cons-before
'check 'fix-hotspot-tests
(lambda _
(with-directory-excursion "openjdk/hotspot/test/" (with-directory-excursion "openjdk/hotspot/test/"
(substitute* "jprt.config" (substitute* "jprt.config"
(("PATH=\"\\$\\{path4sdk\\}\"") (("PATH=\"\\$\\{path4sdk\\}\"")
@ -418,15 +420,17 @@ build process and its dependencies, whereas Make uses Makefile format.")
(("/bin/rm") (which "rm")) (("/bin/rm") (which "rm"))
(("/bin/cp") (which "cp")) (("/bin/cp") (which "cp"))
(("/bin/mv") (which "mv")))) (("/bin/mv") (which "mv"))))
#t)
;; JDK tests (alist-cons-before
'check 'fix-jdk-tests
(lambda _
(with-directory-excursion "openjdk/jdk/test/" (with-directory-excursion "openjdk/jdk/test/"
(substitute* "com/sun/jdi/JdbReadTwiceTest.sh" (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
(("/bin/pwd") (which "pwd"))) (("/bin/pwd") (which "pwd")))
(substitute* "com/sun/jdi/ShellScaffold.sh" (substitute* "com/sun/jdi/ShellScaffold.sh"
(("/bin/kill") (which "kill"))) (("/bin/kill") (which "kill")))
(substitute* "start-Xvfb.sh" (substitute* "start-Xvfb.sh"
;(("/usr/bin/X11/Xvfb") (which "Xvfb")) ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
(("/usr/bin/nohup") (which "nohup"))) (("/usr/bin/nohup") (which "nohup")))
(substitute* "javax/security/auth/Subject/doAs/Test.sh" (substitute* "javax/security/auth/Subject/doAs/Test.sh"
(("/bin/rm") (which "rm"))) (("/bin/rm") (which "rm")))
@ -473,7 +477,8 @@ build process and its dependencies, whereas Make uses Makefile format.")
(substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java" (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
(("/bin/chmod") (which "chmod"))) (("/bin/chmod") (which "chmod")))
(substitute* "java/util/zip/ZipFile/Assortment.java" (substitute* "java/util/zip/ZipFile/Assortment.java"
(("/bin/sh") (which "sh"))))) (("/bin/sh") (which "sh"))))
#t)
(alist-replace (alist-replace
'check 'check
(lambda _ (lambda _
@ -507,7 +512,7 @@ build process and its dependencies, whereas Make uses Makefile format.")
(copy-recursively "openjdk.build/docs" doc) (copy-recursively "openjdk.build/docs" doc)
(copy-recursively "openjdk.build/j2re-image" jre) (copy-recursively "openjdk.build/j2re-image" jre)
(copy-recursively "openjdk.build/j2sdk-image" jdk))) (copy-recursively "openjdk.build/j2sdk-image" jdk)))
%standard-phases))))))))) %standard-phases)))))))))))
(native-inputs (native-inputs
`(("ant-bootstrap" `(("ant-bootstrap"
,(origin ,(origin