<commit_before>#!/bin/bash

# OpenSCAP test suite
# Tests NIST validation requirements
# Author:
#     <NAME> <<EMAIL>>

. ${srcdir}/../test_common.sh

set -e -o pipefail

function test_nist {
	test_dir="$1"
	./test_worker.py --scanner "${top_builddir}/run $OSCAP" $test_dir
	ret_val=$?
	if [ $ret_val -eq 1 ]; then
		return 1<commit_msg>Use absolute builddir and srcdir in nist_test.sh<commit_after>#!/bin/bash

# OpenSCAP test suite
# Tests NIST validation requirements
# Author:
#     <NAME> <<EMAIL>>

. ${srcdir}/../test_common.sh

set -e -o pipefail

function test_nist {
	test_dir="$1"
	run_script="$(cd ${builddir}; pwd)/run"
	${srcdir}/test_worker.py --scanner "${run_script} $OSCAP" ${srcdir}/$test_dir/
	ret_val=$?
	if [ $ret_val -eq 1 ]; then
		return 1
{'fraction_non_alphanumeric': 0.16732026143790849, 'fraction_numerical': 0.00784313725490196, 'mean_word_length': 4.006535947712418, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '4788646', 'n_tokens_mistral': 309, 'n_tokens_neox': 300, 'n_words': 72}