<commit_before>#!/bin/bash

rpm=$1
[[ -n "$rpm" ]] || { echo "error: rpm file not specified" >&2; exit 1; }

this_dir=$(dirname $0)
stbt_dir=$(cd $this_dir/../.. && pwd)
set -x

docker rm -f test-stb-tester-fedora-rpm &>/dev/null
docker run -t \
    --name test-stb-tester-fedora-rpm \
    -v $(pwd)/$rpm:/tmp/$rpm:ro \
    -v $stbt_dir:/usr/src/stb-tester:ro \
    fedora:20 \
    /bin/bash -c "
        set -x &&
        sudo yum install -y /tmp/$rpm &&
        stbt --version &&
        stbt --help &&
        man stbt | cat &&
        cd /usr/src/stb-tester &&
        ./tests/run-tests.sh -i"<commit_msg>extra/fedora/test-rpm.sh: Allow also installing stb-tester-camera rpm<commit_after>#!/bin/bash

[[ $# -gt 0 ]] || { echo "error: No rpm files specified" >&2; exit 1; }

this_dir=$(dirname $0)
stbt_dir=$(cd $this_dir/../.. && pwd)
set -x

docker rm -f test-stb-tester-fedora-rpm &>/dev/null
docker run -t \
    --name test-stb-tester-fedora-rpm \
    $(for rpm in "$@"; do
        echo "-v $PWD/$rpm:/tmp/$rpm:ro"
      done | tr '\n' ' ') \
    -v $stbt_dir:/usr/src/stb-tester:ro \
    fedora:20 \
    /bin/bash -c "
        set -x &&
        sudo yum install -y ${*/#/tmp/} &&
        stbt --version &&
        stbt --help &&
        man stbt | cat &&
        cd /usr/src/stb-tester &&
        ./tests/run-tests.sh -i"
{'fraction_non_alphanumeric': 0.2054176072234763, 'fraction_numerical': 0.009029345372460496, 'mean_word_length': 1.878787878787879, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5414811', 'n_tokens_mistral': 574, 'n_tokens_neox': 535, 'n_words': 121}