Subject: [bug#31520] [PATCH] gnu: u-boot-tools: Enable tests.

From: [email-masked] (Ludovic Courtès)
Date: Sat, 26 May 2018 20:26:20 +0200

Hey Danny,

Danny Milosavljevic <[email-masked]> skribis:

> * gnu/packages/bootloaders.scm (dtc)[native-search-paths]: Add PYTHONPATH.
> (u-boot-tools)[native-inputs]: Add openssl, python2-coverage, python2-pytest,
> sdl.
> [arguments]<#:make-flags>: Remove NO_SDL.
> [arguments]<#:test-target>: Change to "tests".
> [arguments]<#:phases>[patch]: New phase.
> [arguments]<#:phases>[check]: Replace and move.

No need to repeat “[arguments]”.

> +    (native-search-paths
> +      (list (search-path-specification
> +             (variable "PYTHONPATH")
> +             (files '("/lib/python2.7/site-packages")))))

Why is it needed?  That would need a comment.  :-)  Even better if we
can achieve the same effect without defining this search path.

Also no need for the leading slash in ‘files’.

> +           (add-after 'install 'check
> +             (lambda* (#:key make-flags test-target #:allow-other-keys)
> +               (apply invoke "make" "mrproper" make-flags)
> +               (setenv "SDL_VIDEODRIVER" "dummy")
> +               (setenv "PAGER" "cat")
> +               (apply invoke "make" test-target make-flags)
> +               (symlink "build-sandbox_spl" "sandbox")
> +               (invoke "test/image/test-imagetools.sh"))))))

Please return #t.

Thanks!

Ludo’.