From 520e3d267ecc3964af301ab9341462e905f234c6 Mon Sep 17 00:00:00 2001 From: Jean-Pierre De Jesus DIAZ Date: Tue, 28 Nov 2023 12:34:47 +0100 Subject: guix: Add target-avr?. * guix/utils.scm (target-avr?): New procedure. * tests/utils.scm: Add tests for target-avr? procedure. Change-Id: Iaa0fa97a2b6bc45d45f907f43157f1548a0ba3fa Signed-off-by: Efraim Flashner --- tests/utils.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/utils.scm b/tests/utils.scm index 648e91f242..5664165c85 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2016 Mathieu Lirzin ;;; Copyright © 2021 Simon Tournier ;;; Copyright © 2021 Maxime Devos +;;; Copyright © 2023 Foundation Devices, Inc. ;;; ;;; This file is part of GNU Guix. ;;; @@ -329,6 +330,17 @@ (define (test-compression/decompression method run?) ;; However, it isn't 32-bit. ,(format #f "x86_~a-linux-gnu" (expt 2 109))))) +(test-equal "target-avr?" + '(#t #t #t #f #f) + (map target-avr? + '("avr" "avr-unknown-none" + ;; In addition LLVM also uses this form. + "avr-unknown-unknown" + ;; The AVR32 architecture also was made by Atmel/Microchip but it + ;; does not resemble the AVR family, they aren't compatible in any + ;; way. + "avr32" "avr32-unknown-none"))) + (test-end) (false-if-exception (delete-file temp-file)) -- cgit v1.2.3