diff mbox

gnu: Add dlib.

Message ID 87k2ekq6jt.fsf@ike.i-did-not-set--mail-host-address--so-tickle-me
State New
Headers show

Commit Message

Marius Bakke Sept. 10, 2016, 12:32 p.m. UTC
Marius Bakke <mbakke@fastmail.com> writes:

> Leo Famulari <leo@famulari.name> writes:
>
>> Changing the subject, you could disable the tests per-architecture. Look
>> for uses of current-target-system and current-system for usage examples.
>> But this is not absolutely required, IMO.
>
> This latest patch series now disables tests on a per-arch basis.
>
> There may be others on MIPS failing after the timeout, but extending the
> list should be obvious.

Here are the patches again, with the "failing-tests" variable renamed to
"disabled-tests". Let me know if I can provide anything else. Thanks!

Comments

Leo Famulari Sept. 10, 2016, 6:16 p.m. UTC | #1
On Sat, Sep 10, 2016 at 01:32:22PM +0100, Marius Bakke wrote:
> Marius Bakke <mbakke@fastmail.com> writes:
> 
> > Leo Famulari <leo@famulari.name> writes:
> >
> >> Changing the subject, you could disable the tests per-architecture. Look
> >> for uses of current-target-system and current-system for usage examples.
> >> But this is not absolutely required, IMO.
> >
> > This latest patch series now disables tests on a per-arch basis.
> >
> > There may be others on MIPS failing after the timeout, but extending the
> > list should be obvious.
> 
> Here are the patches again, with the "failing-tests" variable renamed to
> "disabled-tests". Let me know if I can provide anything else. Thanks!

Looks reasonable to me. Does anyone else have any comments?
Leo Famulari Sept. 13, 2016, 5:14 a.m. UTC | #2
On Sat, Sep 10, 2016 at 02:16:09PM -0400, Leo Famulari wrote:
> On Sat, Sep 10, 2016 at 01:32:22PM +0100, Marius Bakke wrote:
> > Marius Bakke <mbakke@fastmail.com> writes:
> > 
> > > Leo Famulari <leo@famulari.name> writes:
> > >
> > >> Changing the subject, you could disable the tests per-architecture. Look
> > >> for uses of current-target-system and current-system for usage examples.
> > >> But this is not absolutely required, IMO.
> > >
> > > This latest patch series now disables tests on a per-arch basis.
> > >
> > > There may be others on MIPS failing after the timeout, but extending the
> > > list should be obvious.
> > 
> > Here are the patches again, with the "failing-tests" variable renamed to
> > "disabled-tests". Let me know if I can provide anything else. Thanks!
> 
> Looks reasonable to me. Does anyone else have any comments?

Okay, pushed! Thanks Marius!
Leo Famulari Sept. 13, 2016, 5:14 a.m. UTC | #3
On Sat, Sep 10, 2016 at 01:32:22PM +0100, Marius Bakke wrote:
> +         (add-after 'disable-asserts 'disable-failing-tests
> +           (lambda _
> +             ;; One test times out on MIPS, so we need to disable it.
> +             ;; The rest is known to fail on non-x86_64 platforms in the current release.
> +             ;; Some have been fixed in git; this list should be readjusted next update.
> +             (let* ((system ,(or (%current-target-system)
> +                                 (%current-system)))
> +                    (disabled-tests (cond
> +                                     ((string-prefix? "mips64" system)
> +                                      '("object_detector" ; timeout
> +                                        "data_io"))
> +                                     ((string-prefix? "armhf" system)
> +                                      '("learning_to_track" "max_cost_assignment"))
> +                                     ((string-prefix? "i686" system)
> +                                      '("optimization" "matrix2" "mpc"))
> +                                     (else '()))))
> +               ;; The following test fails due a bug in openblas < 0.2.18.

I updated OpenBLAS to 0.2.19 on core-updates.
diff mbox

Patch

From 268d1085beb3195f38e4d96e0bfee55e456d3093 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Fri, 9 Sep 2016 01:51:23 +0100
Subject: [PATCH 3/3] gnu: dlib: Disable failing tests.

* gnu/packages/machine-learning.scm (dlib)[arguments]: Add phase to
  disable tests that are known not to work in the current release.
  [inputs]: Add lapack.
---
 gnu/packages/machine-learning.scm | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index e94ffdd..b663b4f 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -499,6 +499,29 @@  single hidden layer, and for multinomial log-linear models.")
              (substitute* "dlib/config.h"
                (("^//#define DLIB_DISABLE_ASSERTS") "#define DLIB_DISABLE_ASSERTS"))
              #t))
+         (add-after 'disable-asserts 'disable-failing-tests
+           (lambda _
+             ;; One test times out on MIPS, so we need to disable it.
+             ;; The rest is known to fail on non-x86_64 platforms in the current release.
+             ;; Some have been fixed in git; this list should be readjusted next update.
+             (let* ((system ,(or (%current-target-system)
+                                 (%current-system)))
+                    (disabled-tests (cond
+                                     ((string-prefix? "mips64" system)
+                                      '("object_detector" ; timeout
+                                        "data_io"))
+                                     ((string-prefix? "armhf" system)
+                                      '("learning_to_track" "max_cost_assignment"))
+                                     ((string-prefix? "i686" system)
+                                      '("optimization" "matrix2" "mpc"))
+                                     (else '()))))
+               ;; The following test fails due a bug in openblas < 0.2.18.
+               (append! disabled-tests '("empirical_map"))
+               (for-each
+                (lambda (test)
+                  (substitute* "dlib/test/makefile"
+                    (((string-append "SRC \\+= " test "\\.cpp")) "")) #t)
+                disabled-tests))))
          (replace 'check
            (lambda _
              ;; No test target, so we build and run the unit tests here.
@@ -514,7 +537,7 @@  single hidden layer, and for multinomial log-linear models.")
      `(("pkg-config" ,pkg-config)))
     (inputs
      `(("giflib" ,giflib)
-       ;("lapack" ,lapack) XXX lapack here causes test failures in some setups.
+       ("lapack" ,lapack)
        ("libjpeg" ,libjpeg)
        ("libpng" ,libpng)
        ("libx11" ,libx11)
-- 
2.9.3