Package: jigit
Version: 1.22
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu kinetic ubuntu-patch

Dear Maintainer,

We (Ubuntu) intend to promote jigit to main as it is now a dependency of
usb-creator: I then added the small test that was described in
libjte/test/demo.c as an autopkgtest in order to improve test coverage.

Thanks for considering the patch.


-- System Information:
Debian Release: bookworm/sid
  APT prefers jammy-updates
  APT policy: (500, 'jammy-updates'), (500, 'jammy-security'), (500, 'jammy'), 
(100, 'jammy-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.15.0-30-generic (SMP w/16 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru jigit-1.22/debian/tests/control jigit-1.22/debian/tests/control
--- jigit-1.22/debian/tests/control     1970-01-01 01:00:00.000000000 +0100
+++ jigit-1.22/debian/tests/control     2022-06-08 17:37:48.000000000 +0200
@@ -0,0 +1,3 @@
+Tests: launch_demo.sh
+Depends: jigit
+Restrictions: build-needed
diff -Nru jigit-1.22/debian/tests/launch_demo.sh 
jigit-1.22/debian/tests/launch_demo.sh
--- jigit-1.22/debian/tests/launch_demo.sh      1970-01-01 01:00:00.000000000 
+0100
+++ jigit-1.22/debian/tests/launch_demo.sh      2022-06-08 17:37:48.000000000 
+0200
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+cd libjte
+
+# Extract the root directory of the current path
+debian_mapping=`pwd | cut -d'/' -f 2`
+
+# The following sequence was copied from test/demo.c (slightly adapted because
+# md5 script does not exist anymore):
+
+# Produce an .md5 file
+find . -name '*.c' -exec bin/jigdo-gen-checksum-list '{}' ';' >test/file.md5
+
+# Produce payload image "test/file.outfile", the template file and
+# the jigdo file. Input is test/file.md5 and the data files *.c
+test/demo -outfile test/file.outfile \
+          -template test/file.template \
+          -jigdo test/file.jigdo \
+          -md5 test/file.md5 \
+          -mapping Debian="/$debian_mapping/" \
+          *.c
+
+jigit-mkimage -t test/file.template \
+              -j test/file.jigdo \
+              -m Debian="/$debian_mapping/" \
+              -o test/file.rebuilt
+
+diff -q test/file.outfile test/file.rebuilt
+
+exit $?

Reply via email to