~sircmpwn/hare-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
3 3

[PATCH hare] scripts: add test-genoiddb

Details
Message ID
<20240728170332.14293-1-apreiml@strohwolke.at>
DKIM signature
pass
Download raw message
Patch: +9 -0
to catch accidental breakages or format changes during build.

Signed-off-by: Armin Preiml <apreiml@strohwolke.at>
---
 .builds/alpine.yml    | 3 +++
 scripts/test-genoiddb | 6 ++++++
 2 files changed, 9 insertions(+)
 create mode 100755 scripts/test-genoiddb

diff --git a/.builds/alpine.yml b/.builds/alpine.yml
index b9c95cce..1c484fde 100644
--- a/.builds/alpine.yml
+++ b/.builds/alpine.yml
@@ -60,6 +60,9 @@ tasks:
- lint: |
    cd hare
    ./scripts/lint.sh
- test-genoiddb: |
    cd hare
    ./scripts/test-genoiddb
- bootstrap: |
    cd hare
    make -j2 bootstrap
diff --git a/scripts/test-genoiddb b/scripts/test-genoiddb
new file mode 100755
index 00000000..d3b8c1cd
--- /dev/null
+++ b/scripts/test-genoiddb
@@ -0,0 +1,6 @@
#!/bin/sh

hare run cmd/genoiddb < encoding/asn1/stdoid/db.txt \
	| diff encoding/asn1/stdoid/db.ha - > /dev/null \
	|| (echo "Either something broke cmd/genoiddb or the database has to" \
		"be generated again." ; exit 1)
-- 
2.45.2

[hare/patches] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<D31C53W7HWQZ.7SYFIRJZOC8H@fra02>
In-Reply-To
<20240728170332.14293-1-apreiml@strohwolke.at> (view parent)
DKIM signature
missing
Download raw message
hare/patches: SUCCESS in 1m11s

[scripts: add test-genoiddb][0] from [Armin Preiml][1]

[0]: https://lists.sr.ht/~sircmpwn/hare-dev/patches/54136
[1]: apreiml@strohwolke.at

✓ #1287731 SUCCESS hare/patches/openbsd.yml https://builds.sr.ht/~sircmpwn/job/1287731
✓ #1287729 SUCCESS hare/patches/freebsd.yml https://builds.sr.ht/~sircmpwn/job/1287729
✓ #1287730 SUCCESS hare/patches/netbsd.yml  https://builds.sr.ht/~sircmpwn/job/1287730
✓ #1287728 SUCCESS hare/patches/alpine.yml  https://builds.sr.ht/~sircmpwn/job/1287728
Details
Message ID
<D31GUSC7XYUE.1FZUAYMOV0IWG@sebsite.pw>
In-Reply-To
<20240728170332.14293-1-apreiml@strohwolke.at> (view parent)
DKIM signature
pass
Download raw message
On Sun Jul 28, 2024 at 1:03 PM EDT, Armin Preiml wrote:
> +hare run cmd/genoiddb < encoding/asn1/stdoid/db.txt \
> +	| diff encoding/asn1/stdoid/db.ha - > /dev/null \
> +	|| (echo "Either something broke cmd/genoiddb or the database has to" \
> +		"be generated again." ; exit 1)

Instead of `diff > /dev/null`, you can use `cmp -s`, which will
immediately exit if the files differ.
Details
Message ID
<D31QISL4CQXE.12PRW49FF3JKR@d2evs.net>
In-Reply-To
<20240728170332.14293-1-apreiml@strohwolke.at> (view parent)
DKIM signature
pass
Download raw message
i'd recommend hooking this into the same infrastructure we use for make 
bootstrap: regenerate the ioddb in the ci build, then let it error out 
when the git status turns out dirty
Reply to thread Export thread (mbox)