<commit_before>#!/usr/bin/env bash
#
# Configure and sign 4 zones with one repository using multi-threaded Enforcer
# and 3 different policies, 1 with shared keys and 2 without.

if [ -n "$HAVE_MYSQL" ]; then
	ods_setup_conf conf.xml conf-mysql.xml
fi &&

ods_reset_env &&

log_this_timeout ods-control-enforcer-start 60 ods-control enforcer start &&
syslog_waitfor 60 'ods-enforcerd: .*Sleeping for' &&
syslog_waitfor 60 'ods-enforcerd: .*\[worker\[4\]\]: started' &&

log_this_timeout ods-control-signer-start 60 ods-control signer start &&
syslog_waitfor 60 'ods-signerd: .*\[engine\] signer started' &&

syslog_waitfor 60 'ods-signerd: .*\[STATS\] ods' &&
syslog_waitfor 60 'ods-signerd: .*\[STATS\] ods2' &&
syslog_waitfor 60 'ods-signerd: .*\[STATS\] ods3' &&
syslog_waitfor 60 'ods-signerd: .*\[STATS\] ods4' &&

test -f "$INSTALL_ROOT/var/opendnssec/signed/ods" &&
test -f "$INSTALL_ROOT/var/opendnssec/signed/ods2" &&
test -f "$INSTALL_ROOT/var/opendnssec/signed/ods3" &&
test -f "$INSTALL_ROOT/var/opendnssec/signed/ods4" &&

log_this_timeout ods-control-start 60 ods-control stop &&
syslog_waitfor 60 'ods-enforcerd: .*all done' &&
syslog_waitfor 60 'ods-signerd: .*\[engine\] signer shutdown' &&
return 0

ods_kill
return 1<commit_msg>Only check for workers if its MySQL database backend<commit_after>#!/usr/bin/env bash
#
# Configure and sign 4 zones with one repository using multi-threaded Enforcer
# and 3 different policies, 1 with shared keys and 2 without.

if [ -n "$HAVE_MYSQL" ]; then
	ods_setup_conf conf.xml conf-mysql.xml
fi &&

ods_reset_env &&

log_this_timeout ods-control-enforcer-start 60 ods-control enforcer start &&
syslog_waitfor 60 'ods-enforcerd: .*Sleeping for' &&
if [ -n "$HAVE_MYSQL" ]; then
	syslog_waitfor 60 'ods-enforcerd: .*\[worker\[4\]\]: started'
fi &&

log_this_timeout ods-control-signer-start 60 ods-control signer start &&
syslog_waitfor 60 'ods-signerd: .*\[engine\] signer started' &&

syslog_waitfor 60 'ods-signerd: .*\[STATS\] ods' &&
syslog_waitfor 60 'ods-signerd: .*\[STATS\] ods2' &&
syslog_waitfor 60 'ods-signerd: .*\[STATS\] ods3' &&
syslog_waitfor 60 'ods-signerd: .*\[STATS\] ods4' &&

test -f "$INSTALL_ROOT/var/opendnssec/signed/ods" &&
test -f "$INSTALL_ROOT/var/opendnssec/signed/ods2" &&
test -f "$INSTALL_ROOT/var/opendnssec/signed/ods3" &&
test -f "$INSTALL_ROOT/var/opendnssec/signed/ods4" &&

log_this_timeout ods-control-start 60 ods-control stop &&
syslog_waitfor 60 'ods-enforcerd: .*all done' &&
syslog_waitfor 60 'ods-signerd: .*\[engine\] signer shutdown' &&
return 0

ods_kill
return 1
{'fraction_non_alphanumeric': 0.15075964160498637, 'fraction_numerical': 0.028827425009738995, 'mean_word_length': 4.631578947368421, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6342300', 'n_tokens_mistral': 1087, 'n_tokens_neox': 977, 'n_words': 240}