From 34a529b937f568e06c367eb2568f1f09106bf6c8 Mon Sep 17 00:00:00 2001 From: Gavin Brown Date: Wed, 6 May 2026 13:42:49 +0100 Subject: [PATCH] generate two files closes #257 --- .gitignore | 3 ++- Makefile | 10 ++++++---- etc/index.md | 8 +++++--- tools/build-pages | 4 ++-- tools/generate-zonemaster-profile.pl | 13 ++++++++++++- 5 files changed, 27 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 5a7a772c..8cf7b922 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,8 @@ tmp rst-test-specs.html rst-test-specs.json rst-test-specs.yaml -rst.json +rst_dns.json +rst_dnssec.json rdapct_config*.json releases.json releases.md diff --git a/Makefile b/Makefile index 380f958e..d260c656 100644 --- a/Makefile +++ b/Makefile @@ -8,9 +8,11 @@ yaml: export ZM_VERSION=$(ZONEMASTER_VERSION) all: zonemaster-profile rdapct-config includes yaml lint json html zonemaster-profile: - @echo Generating Zonemaster profile... - @tools/generate-zonemaster-profile.pl "--version=$(ZONEMASTER_ENGINE_VERSION)" > rst.json - @echo wrote rst.json + @echo Generating Zonemaster profiles... + @tools/generate-zonemaster-profile.pl --suite=dns "--version=$(ZONEMASTER_ENGINE_VERSION)" > rst_dns.json + @echo wrote rst_dns.json + @tools/generate-zonemaster-profile.pl --suite=dnssec "--version=$(ZONEMASTER_ENGINE_VERSION)" > rst_dnssec.json + @echo wrote rst_dnssec.json rdapct-config: @echo Generating RDAP Conformance Tool configuration files... @@ -71,4 +73,4 @@ pages: rdapct-config zonemaster-profile clean: @echo Cleaning up... - @rm -rf tmp zonemaster _site tmp rst.json rst-test-specs.html rst-test-specs.json rst-test-specs.yaml rdapct_config*.json releases.md releases.json + @rm -rf tmp zonemaster _site tmp rst_dns.json rst_dnssec.json rst-test-specs.html rst-test-specs.json rst-test-specs.yaml rdapct_config*.json releases.md releases.json diff --git a/etc/index.md b/etc/index.md index c81045d6..bb00ba44 100644 --- a/etc/index.md +++ b/etc/index.md @@ -5,10 +5,12 @@ This site hosts the specifications for ICANN's [Registry System Testing Additional resources: -* [rst.json](rst.json) is the [Zonemaster +* [rst_dns.json](rst_dns.json) is the [Zonemaster profile](https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/profiles.md) - used by the [DNS](rst-test-specs.html#Test-Suite-StandardDNS) and - [DNSSEC](rst-test-specs.html#Test-Suite-StandardDNSSEC) test suites. + used by the [DNS](rst-test-specs.html#Test-Suite-StandardDNS) test suite. +* [rst_dnssec.json](rst_dnssec.json) is the [Zonemaster + profile](https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/profiles.md) + used by the [DNSSEC](rst-test-specs.html#Test-Suite-StandardDNSSEC) test suite. * [rdapct_config.json](rdapct_config.json) is the configuration file used by the [RDAP Conformance Tool](https://github.com/icann/rdap-conformance-tool) during production tests. diff --git a/tools/build-pages b/tools/build-pages index 4952b2d6..115f5785 100755 --- a/tools/build-pages +++ b/tools/build-pages @@ -73,8 +73,8 @@ tools/generate-superschema.pl > "$SITEDIR/epp-extensions/xsd/super.xsd" echo "Copying RDAP Conformance Tool configuration files..." cp rdapct_config*.json "$SITEDIR/" -echo "Copying Zonemaster profile..." -cp rst.json "$SITEDIR/" +echo "Copying Zonemaster profiles..." +cp rst_dns.json rst_dnssec.json "$SITEDIR/" chmod -R 0755 "$SITEDIR" diff --git a/tools/generate-zonemaster-profile.pl b/tools/generate-zonemaster-profile.pl index 175c4638..5e1d8cd1 100755 --- a/tools/generate-zonemaster-profile.pl +++ b/tools/generate-zonemaster-profile.pl @@ -13,12 +13,15 @@ }; use strict; -my $version; +my ($version, $suite); GetOptions( 'version=s' => \$version, 'help' => sub { pod2usage() }, + '--suite=s' => \$suite, ) || pod2usage(); +pod2usage({-message => "Bad suite '$suite'"}) unless ($suite =~ /^(dns|dnssec)$/); + my $config = YAML::XS::LoadFile(dirname(dirname(realpath(__FILE__))) .'/zonemaster-test-policies.yaml'); @@ -43,6 +46,14 @@ } } +if ('dnssec' eq $suite) { + $profile->{'test_cases'} = [ grep { $_ =~ /^dnssec/ } @{$profile->{'test_cases'}} ]; + +} else { + $profile->{'test_cases'} = [ grep { $_ !~ /^dnssec/ } @{$profile->{'test_cases'}} ]; + +} + # # change severity levels for messages we've overridden #