From c0be772ebc1406b761eb870d97acd72ebebad541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Wed, 11 Dec 2019 12:04:29 +0100 Subject: [PATCH] Include prepare-softhsm2.sh in source tarballs The util/prepare-softhsm2.sh script is useful for initializing a working SoftHSM environment which can be used by unit tests and system tests. However, since it is a test-specific script, it does not really belong in the util/ subdirectory which is mostly pruned during the BIND source tarball creation process. Move the prepare-softhsm2.sh script to bin/tests/ so that its location is more appropriate for its purpose and also so that it does not get removed during the BIND source tarball creation process, allowing it to be used for setting up test environments for tarball-based builds. --- .gitlab-ci.yml | 2 +- {util => bin/tests}/prepare-softhsm2.sh | 0 bin/tests/system/runtime/tests.sh | 2 +- util/copyrights | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename {util => bin/tests}/prepare-softhsm2.sh (100%) mode change 100644 => 100755 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 654074c5b4..c72d8b52ea 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -202,7 +202,7 @@ stages: fi .setup_softhsm: &setup_softhsm | - sh -x util/prepare-softhsm2.sh + sh -x bin/tests/prepare-softhsm2.sh .system_test: &system_test_job <<: *default_triggering_rules diff --git a/util/prepare-softhsm2.sh b/bin/tests/prepare-softhsm2.sh old mode 100644 new mode 100755 similarity index 100% rename from util/prepare-softhsm2.sh rename to bin/tests/prepare-softhsm2.sh diff --git a/bin/tests/system/runtime/tests.sh b/bin/tests/system/runtime/tests.sh index e43e96e0ba..e35cb70267 100644 --- a/bin/tests/system/runtime/tests.sh +++ b/bin/tests/system/runtime/tests.sh @@ -204,7 +204,7 @@ if [ "$(id -u)" -eq 0 ] && [ -z "$CYGWIN" ]; then if [ "$?" -eq 0 ]; then copy_setports ns2/named-alt9.conf.in "${TEMP_NAMED_DIR}/named-alt9.conf" export SOFTHSM2_CONF="${TEMP_NAMED_DIR}/softhsm2.conf" - sh "$TOP/util/prepare-softhsm2.sh" + sh "$TOP/bin/tests/prepare-softhsm2.sh" chown -R nobody: "${TEMP_NAMED_DIR}" chmod 0700 "${TEMP_NAMED_DIR}" ( cd "${TEMP_NAMED_DIR}" && $NAMED -u nobody -c named-alt9.conf -d 99 -g -U 4 >> named$n.run 2>&1 & ) || ret=1 diff --git a/util/copyrights b/util/copyrights index a14a28c124..d8e7538431 100644 --- a/util/copyrights +++ b/util/copyrights @@ -349,6 +349,7 @@ ./bin/tests/pkcs11/benchmarks/sha1.c C 2014,2015,2016,2018,2019 ./bin/tests/pkcs11/benchmarks/sign.c C 2014,2015,2016,2018,2019 ./bin/tests/pkcs11/benchmarks/verify.c C 2014,2015,2016,2018,2019 +./bin/tests/prepare-softhsm2.sh X 2018,2019 ./bin/tests/startperf/README X 2011,2018,2019 ./bin/tests/startperf/clean.sh SH 2011,2012,2016,2018,2019 ./bin/tests/startperf/makenames.pl PERL 2011,2012,2016,2018,2019 @@ -2592,7 +2593,6 @@ ./util/nanny.pl PERL 2000,2001,2004,2007,2012,2016,2018,2019 ./util/new-func PERL 2005,2007,2012,2016,2018,2019 ./util/nt-kit SH 1999,2000,2001,2004,2007,2012,2016,2018,2019 -./util/prepare-softhsm2.sh X 2018,2019 ./util/spacewhack.pl PERL 2000,2001,2004,2007,2012,2016,2018,2019 ./util/tabify-changes SH 2004,2007,2012,2016,2018,2019 ./util/update-drafts.pl PERL 2000,2001,2004,2007,2012,2016,2018,2019