hickory-dns/justfile

258 lines
10 KiB
Makefile
Raw Normal View History

2023-05-30 01:19:32 +00:00
## Script for executing commands for the project.
2023-05-31 17:23:43 +00:00
export TARGET_DIR := join(justfile_directory(), "target")
export TDNS_BIND_PATH := join(TARGET_DIR, "bind")
2023-06-02 04:37:58 +00:00
export TEST_DATA := join(join(justfile_directory(), "tests"), "test-data")
2023-05-31 17:23:43 +00:00
NIGHTLY_DATE := "2024-05-23"
## MSRV
MSRV := env_var_or_default('MSRV', "")
2023-06-06 18:54:05 +00:00
## Code coverage config
COV_RUSTFLAGS := "-C instrument-coverage -C llvm-args=--instrprof-atomic-counter-update-all --cfg=coverage --cfg=trybuild_no_target"
COV_CARGO_INCREMENTAL := "0"
COV_CARGO_LLVM_COV := "1"
COV_CARGO_LLVM_COV_TARGET_DIR := join(TARGET_DIR, "llvm-cov-target")
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
COV_LLVM_PROFILE_FILE := join(COV_CARGO_LLVM_COV_TARGET_DIR, "hickory-dns-%p-%m_%c.profraw")
2023-06-06 18:54:05 +00:00
2023-05-31 17:23:43 +00:00
BIND_VER := "9.16.41"
2023-05-30 01:19:32 +00:00
2023-06-01 22:01:36 +00:00
# Check, build, and test all crates with default features enabled
default feature='' ignore='': (check feature ignore) (build feature ignore) (test feature ignore)
# Check, build, and test all crates with all-features enabled
all-features: (default "--all-features")
# Check, build, and test all crates with no-default-features
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
no-default-features: (default "--no-default-features" "--ignore=\\{hickory-compatibility\\}")
2023-06-01 22:01:36 +00:00
# Check, build, and test all crates with dns-over-rustls enabled
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
dns-over-rustls: (default "--features=dns-over-rustls" "--ignore=\\{async-std-resolver,hickory-compatibility\\}")
2023-06-01 22:01:36 +00:00
# Check, build, and test all crates with dns-over-https-rustls enabled
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
dns-over-https-rustls: (default "--features=dns-over-https-rustls" "--ignore=\\{async-std-resolver,hickory-compatibility\\}")
2023-06-01 22:01:36 +00:00
# Check, build, and test all crates with dns-over-quic enabled
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
dns-over-quic: (default "--features=dns-over-quic" "--ignore=\\{async-std-resolver,hickory-compatibility\\}")
2023-06-01 22:01:36 +00:00
2023-07-07 15:42:31 +00:00
# Check, build, and test all crates with dns-over-h3 enabled
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
dns-over-h3: (default "--features=dns-over-h3" "--ignore=\\{async-std-resolver,hickory-compatibility,hickory-client\\}")
2023-07-07 15:42:31 +00:00
2023-06-01 22:01:36 +00:00
# Check, build, and test all crates with dns-over-native-tls enabled
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
dns-over-native-tls: (default "--features=dns-over-native-tls" "--ignore=\\{async-std-resolver,hickory-compatibility,hickory-server,hickory-dns,hickory-util,hickory-integration\\}")
2023-06-01 22:01:36 +00:00
# Check, build, and test all crates with dns-over-openssl enabled
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
dns-over-openssl: (default "--features=dnssec-openssl" "--ignore=\\{async-std-resolver,hickory-compatibility\\}")
2023-06-01 22:01:36 +00:00
# Check, build, and test all crates with dnssec-openssl enabled
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
dnssec-openssl: (default "--features=dnssec-openssl" "--ignore=\\{async-std-resolver,hickory-compatibility\\}")
2023-06-01 22:01:36 +00:00
# Check, build, and test all crates with dnssec-ring enabled
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
dnssec-ring: (default "--features=dnssec-ring" "--ignore=\\{async-std-resolver,hickory-compatibility\\}")
2023-05-30 01:19:32 +00:00
# Run check on all projects in the workspace
2023-06-01 22:01:36 +00:00
check feature='' ignore='':
cargo ws exec {{ignore}} cargo {{MSRV}} check --all-targets --benches --examples --bins --tests {{feature}}
cargo {{MSRV}} check --manifest-path fuzz/Cargo.toml --all-targets --benches --examples --bins --tests
2023-05-30 01:19:32 +00:00
# Run build on all projects in the workspace
2023-06-01 22:01:36 +00:00
build feature='' ignore='':
cargo ws exec {{ignore}} cargo {{MSRV}} build --all-targets --benches --examples --bins --tests {{feature}}
2023-05-30 01:19:32 +00:00
# Run tests on all projects in the workspace
2023-06-01 22:01:36 +00:00
test feature='' ignore='':
cargo ws exec {{ignore}} cargo {{MSRV}} test --all-targets --benches --examples --bins --tests {{feature}}
doc feature='':
cargo ws exec --ignore=hickory-dns cargo {{MSRV}} test --doc {{feature}}
2023-05-31 04:41:12 +00:00
# This tests compatibility with BIND9, TODO: support other feature sets besides openssl for tests
compatibility: init-bind9
2023-05-31 04:41:12 +00:00
cargo test --manifest-path tests/compatibility-tests/Cargo.toml --all-targets --benches --examples --bins --tests --no-default-features --features=none;
cargo test --manifest-path tests/compatibility-tests/Cargo.toml --all-targets --benches --examples --bins --tests --no-default-features --features=bind;
2023-05-30 01:19:32 +00:00
2023-05-31 17:41:39 +00:00
# Build all bench marking tools, i.e. check that they work, but don't run
build-bench:
cargo ws exec cargo +nightly-{{NIGHTLY_DATE}} bench --no-run
2023-05-31 17:41:39 +00:00
2023-05-31 18:09:24 +00:00
[private]
clippy-inner feature='':
cargo ws exec cargo {{MSRV}} clippy --all-targets --benches --examples --bins --tests {{feature}} -- -D warnings
2023-05-31 18:09:24 +00:00
# Run clippy on all targets and all sources
clippy:
find {{justfile_directory()}} -name '*.rs' -exec touch {} \;
just clippy-inner --no-default-features
just clippy-inner
just clippy-inner --all-features
2023-05-31 18:13:11 +00:00
# Check the format of all the Rust code with rustfmt
fmt:
cargo ws exec cargo fmt -- --check
cargo fmt --manifest-path fuzz/Cargo.toml -- --check
2023-05-31 18:26:59 +00:00
# Audit all depenedencies
audit: init-audit (check '--all-features')
cargo audit --deny warnings
cargo audit --file fuzz/Cargo.lock --deny warnings
2023-05-31 18:33:14 +00:00
# Task to run clippy, rustfmt, and audit on all crates
cleanliness: clippy fmt audit
2023-06-01 03:04:00 +00:00
# Generate coverage report
coverage: init-llvm-cov
#!/usr/bin/env bash
set -euxo pipefail
2023-06-06 18:54:05 +00:00
export RUSTFLAGS="{{COV_RUSTFLAGS}}"
export CARGO_LLVM_COV={{COV_CARGO_LLVM_COV}}
export CARGO_LLVM_COV_TARGET_DIR={{COV_CARGO_LLVM_COV_TARGET_DIR}}
export LLVM_PROFILE_FILE={{COV_LLVM_PROFILE_FILE}}
2023-06-01 03:04:00 +00:00
echo $RUSTFLAGS
cargo +nightly llvm-cov clean
2023-06-06 18:54:05 +00:00
mkdir -p {{COV_CARGO_LLVM_COV_TARGET_DIR}}
2023-06-01 03:04:00 +00:00
cargo +nightly build --workspace --all-targets --all-features
2023-06-06 18:54:05 +00:00
cargo +nightly llvm-cov test --workspace --no-report --all-targets --benches --examples --bins --tests --all-features
cargo +nightly llvm-cov test --workspace --no-report --doc --doctests --all-features
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
cargo +nightly llvm-cov report --codecov --output-path {{join(COV_CARGO_LLVM_COV_TARGET_DIR, "hickory-dns-coverage.json")}}
2023-06-01 03:04:00 +00:00
# Open the html view of the coverage report
coverage-html: coverage
#!/usr/bin/env bash
set -euxo pipefail
2023-06-06 18:54:05 +00:00
export RUSTFLAGS="{{COV_RUSTFLAGS}}"
export CARGO_LLVM_COV={{COV_CARGO_LLVM_COV}}
export CARGO_LLVM_COV_TARGET_DIR={{COV_CARGO_LLVM_COV_TARGET_DIR}}
export LLVM_PROFILE_FILE={{COV_LLVM_PROFILE_FILE}}
2023-06-06 18:54:05 +00:00
cargo +nightly llvm-cov report --html --open --output-dir {{COV_CARGO_LLVM_COV_TARGET_DIR}}
2023-06-02 04:37:58 +00:00
# (Re)generates Test Certificates, if tests are failing, this needs to be run yearly
generate-test-certs: init-openssl
2023-12-02 20:09:51 +00:00
cd {{TEST_DATA}} && rm -f ca.key ca.pem cert.key cert-key.pkcs8 cert.csr cert.pem cert.p12
2023-06-02 04:37:58 +00:00
scripts/gen_certs.sh
2023-06-01 22:08:28 +00:00
# Publish all crates
publish:
cargo ws publish --from-git --token $CRATES_IO_TOKEN
# Removes the target directory cleaning all built artifacts
2023-05-31 17:23:43 +00:00
clean:
rm -rf {{TARGET_DIR}}
2024-05-29 13:54:39 +00:00
conformance: (conformance-framework) (conformance-unbound) (conformance-bind) (conformance-hickory) (conformance-ignored) (conformance-clippy) (conformance-fmt)
conformance-framework:
DNS_TEST_VERBOSE_DOCKER_BUILD=1 cargo t --manifest-path conformance/Cargo.toml -p dns-test
conformance-unbound filter='':
DNS_TEST_VERBOSE_DOCKER_BUILD=1 DNS_TEST_PEER=bind DNS_TEST_SUBJECT=unbound cargo t --manifest-path conformance/Cargo.toml -p conformance-tests -- --include-ignored {{filter}}
conformance-bind filter='':
DNS_TEST_VERBOSE_DOCKER_BUILD=1 DNS_TEST_PEER=unbound DNS_TEST_SUBJECT=bind cargo t --manifest-path conformance/Cargo.toml -p conformance-tests -- --include-ignored {{filter}}
conformance-hickory filter='':
DNS_TEST_VERBOSE_DOCKER_BUILD=1 DNS_TEST_PEER=unbound DNS_TEST_SUBJECT="hickory {{justfile_directory()}}" cargo t --manifest-path conformance/Cargo.toml -p conformance-tests -- {{filter}}
conformance-ignored:
#!/usr/bin/env bash
tmpfile="$(mktemp)"
DNS_TEST_VERBOSE_DOCKER_BUILD=1 DNS_TEST_PEER=unbound DNS_TEST_SUBJECT="hickory {{justfile_directory()}}" cargo test --manifest-path conformance/Cargo.toml -p conformance-tests -- --ignored | tee "$tmpfile"
grep 'test result: FAILED. 0 passed' "$tmpfile" || ( echo "expected ALL tests to fail but at least one passed; the passing tests must be un-#[ignore]-d" && exit 1 )
conformance-clippy:
cargo clippy --manifest-path conformance/Cargo.toml --workspace --all-targets -- -D warnings
conformance-fmt:
cargo fmt --manifest-path conformance/Cargo.toml --all -- --check
conformance-clean: (conformance-clean-containers) (conformance-clean-networks)
conformance-clean-containers:
docker rm -f $(docker ps | grep dns-test | cut -f 1 -d " ")
conformance-clean-networks:
docker network rm $(docker network ls | grep dns-test | cut -f 1 -d " ")
2023-05-31 04:41:12 +00:00
[private]
[macos]
2023-06-02 04:37:58 +00:00
init-openssl:
openssl version || brew install openssl@1.1
[private]
[linux]
init-openssl:
openssl version
[private]
[macos]
init-bind9-deps: init-openssl
2023-05-31 04:41:12 +00:00
pip install ply
brew install wget
[private]
[linux]
init-bind9-deps:
if apt-get --version ; then sudo apt-get install -y python3-ply ; fi
2023-05-31 17:23:43 +00:00
# Install BIND9, needed for compatability tests
2023-05-31 04:41:12 +00:00
[unix]
init-bind9:
2023-05-31 04:41:12 +00:00
#!/usr/bin/env bash
set -euxo pipefail
if {{TDNS_BIND_PATH}}/sbin/named -v ; then exit 0 ; fi
just init-bind9-deps
2023-05-31 04:41:12 +00:00
## This must run after OpenSSL installation
if openssl version ; then WITH_OPENSSL="--with-openssl=$(dirname $(dirname $(which openssl)))" ; fi
2023-05-30 01:19:32 +00:00
2023-05-31 04:41:12 +00:00
mkdir -p {{TARGET_DIR}}
echo "----> downloading bind"
rm -rf {{TARGET_DIR}}/bind-{{BIND_VER}}
2023-05-31 17:23:43 +00:00
wget -O {{TARGET_DIR}}/bind-{{BIND_VER}}.tar.xz https://downloads.isc.org/isc/bind9/{{BIND_VER}}/bind-{{BIND_VER}}.tar.xz
ls -la {{TARGET_DIR}}/bind-{{BIND_VER}}.tar.xz
tar -xJf {{TARGET_DIR}}/bind-{{BIND_VER}}.tar.xz -C {{TARGET_DIR}}
2023-05-31 04:41:12 +00:00
echo "----> compiling bind"
cd {{TARGET_DIR}}/bind-{{BIND_VER}}
./configure --prefix {{TDNS_BIND_PATH}} ${WITH_OPENSSL}
make install
cd -
2023-05-31 17:23:43 +00:00
{{TDNS_BIND_PATH}}/sbin/named -v
2023-05-31 04:41:12 +00:00
2023-05-31 17:23:43 +00:00
rm {{TARGET_DIR}}/bind-{{BIND_VER}}.tar.xz
rm -rf {{TARGET_DIR}}/bind-{{BIND_VER}}
2023-05-31 04:41:12 +00:00
# Check for the cargo-workspaces command, install if it does not exist
init-cargo-workspaces:
@cargo ws --version || cargo install cargo-workspaces
2023-06-02 04:37:58 +00:00
# Install audit tools
2023-05-31 18:26:59 +00:00
init-audit:
@cargo audit --version || cargo install cargo-audit
2023-06-01 03:04:00 +00:00
2023-06-02 04:37:58 +00:00
# Install the code coverage components for LLVM
2023-06-01 03:04:00 +00:00
init-llvm-cov:
@cargo llvm-cov --version || cargo install cargo-llvm-cov
@rustup component add llvm-tools-preview
2023-06-01 03:04:00 +00:00
2023-05-31 04:41:12 +00:00
# Initialize all tools needed for running tests, etc.
2023-05-31 18:26:59 +00:00
init: init-cargo-workspaces init-audit init-bind9
2023-05-31 04:41:12 +00:00
@echo 'all tools initialized'
# Run the server with example config, for manual testing purposes
run-example:
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
@cargo {{MSRV}} run --bin hickory-dns -- -d -c {{TEST_DATA}}/test_configs/example.toml -z {{TEST_DATA}}/test_configs -p 2053
2024-05-29 13:54:39 +00:00