* [PATCH] powertab: Enable tests and update.
@ 2015-07-04 9:24 Ricardo Wurmus
2015-07-05 10:22 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Wurmus @ 2015-07-04 9:24 UTC (permalink / raw)
To: Guix-devel
[-- Attachment #1: 0001-gnu-powertabeditor-Enable-tests.patch --]
[-- Type: text/x-patch, Size: 3469 bytes --]
From 2d11dfa79d388e409965cda8f05d77b3eafcee86 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Sat, 4 Jul 2015 11:11:19 +0200
Subject: [PATCH 1/2] gnu: powertabeditor: Enable tests.
* gnu/packages/music.scm (powertabeditor)[arguments]: Run "pte_tests" in
"check" phase; add phase "fix-tests".
---
gnu/packages/music.scm | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 8583c89..3beb151 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -323,9 +323,6 @@ your own lessons.")
(delete-file-recursively "external")
(substitute* "CMakeLists.txt"
(("include_directories\\(\\$\\{PROJECT_SOURCE_DIR\\}/external/.*") "")
- ;; TODO: tests cannot be built:
- ;; test/test_main.cpp:28:12: error: ‘Session’ is not a member of ‘Catch’
- (("add_subdirectory\\(test\\)") "")
(("add_subdirectory\\(external\\)") ""))
(substitute* "test/CMakeLists.txt"
(("include_directories\\(\\$\\{PROJECT_SOURCE_DIR\\}/external/.*") ""))
@@ -342,20 +339,34 @@ your own lessons.")
#t))))
(build-system cmake-build-system)
(arguments
- `(#:tests? #f ; no "check" target
- #:modules ((guix build cmake-build-system)
+ `(#:modules ((guix build cmake-build-system)
(guix build utils)
(ice-9 match))
#:configure-flags
;; CMake appears to lose the RUNPATH for some reason, so it has to be
;; explicitly set with CMAKE_INSTALL_RPATH.
- (list (string-append "-DCMAKE_INSTALL_RPATH="
+ (list "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE"
+ "-DCMAKE_ENABLE_PRECOMPILED_HEADERS=OFF" ; if ON pte_tests cannot be built
+ (string-append "-DCMAKE_INSTALL_RPATH="
(string-join (map (match-lambda
((name . directory)
(string-append directory "/lib")))
%build-inputs) ";")))
#:phases
(modify-phases %standard-phases
+ (replace
+ 'check
+ (lambda _
+ (zero? (system* "bin/pte_tests"
+ ;; Exclude this failing test
+ "~Formats/PowerTabOldImport/Directions"))))
+ (add-before
+ 'configure 'fix-tests
+ (lambda _
+ ;; Tests cannot be built with precompiled headers
+ (substitute* "test/CMakeLists.txt"
+ (("cotire\\(pte_tests\\)") ""))
+ #t))
(add-before
'configure 'remove-third-party-libs
(lambda* (#:key inputs #:allow-other-keys)
@@ -363,7 +374,7 @@ your own lessons.")
;; using the bundled version of withershins.
(substitute* '("source/CMakeLists.txt"
"test/CMakeLists.txt")
- (("target_link_libraries\\((powertabeditor)" _ target)
+ (("target_link_libraries\\((powertabeditor|pte_tests)" _ target)
(string-append "target_link_libraries(" target " "
(assoc-ref inputs "binutils")
"/lib/libbfd.a "
--
2.4.3
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-gnu-powertabeditor-Update-to-2.0.0-alpha8.patch --]
[-- Type: text/x-patch, Size: 1193 bytes --]
From 579c4ea1b7ff6c06fb66556da34786e09ecbba7a Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Sat, 4 Jul 2015 11:12:17 +0200
Subject: [PATCH 2/2] gnu: powertabeditor: Update to 2.0.0-alpha8.
* gnu/packages/music.scm (powertabeditor): Update to 2.0.0-alpha8.
---
gnu/packages/music.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 3beb151..9e7e012 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -306,7 +306,7 @@ your own lessons.")
(define-public powertabeditor
(package
(name "powertabeditor")
- (version "2.0.0-alpha7")
+ (version "2.0.0-alpha8")
(source (origin
(method url-fetch)
(uri (string-append
@@ -315,7 +315,7 @@ your own lessons.")
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
- "1yp6ck2r72c2pfq31z1kpw1j639rndrifj85l3cbj2kdf8rdzhkk"))
+ "0gaa2x209v3azql8ak3r1n9a9qbxjx2ssirvwdxwklv2lmfqkm82"))
(modules '((guix build utils)))
(snippet
'(begin
--
2.4.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powertab: Enable tests and update.
2015-07-04 9:24 [PATCH] powertab: Enable tests and update Ricardo Wurmus
@ 2015-07-05 10:22 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-07-05 10:22 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: Guix-devel
Ricardo Wurmus <rekado@elephly.net> skribis:
> From 2d11dfa79d388e409965cda8f05d77b3eafcee86 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <rekado@elephly.net>
> Date: Sat, 4 Jul 2015 11:11:19 +0200
> Subject: [PATCH 1/2] gnu: powertabeditor: Enable tests.
>
> * gnu/packages/music.scm (powertabeditor)[arguments]: Run "pte_tests" in
> "check" phase; add phase "fix-tests".
LGTM.
> From 579c4ea1b7ff6c06fb66556da34786e09ecbba7a Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <rekado@elephly.net>
> Date: Sat, 4 Jul 2015 11:12:17 +0200
> Subject: [PATCH 2/2] gnu: powertabeditor: Update to 2.0.0-alpha8.
>
> * gnu/packages/music.scm (powertabeditor): Update to 2.0.0-alpha8.
LGTM, thanks!
Ludo'.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-05 10:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-04 9:24 [PATCH] powertab: Enable tests and update Ricardo Wurmus
2015-07-05 10:22 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.