<commit_before>#!/bin/bash - 
set -o nounset
if [ -r `dirname $0`/colors.sh ];then
    . `dirname $0`/colors.sh
fi
if [ $# -lt 2 ];then
    echo "Usage: $1 </path/cli/lib/prefix> <partner_id>"
    exit 1
fi
PREFIX=$1
PARTNER_ID=$2
shopt -s expand_aliases
. $PREFIX/kalcliAutoComplete
. $PREFIX/kalcliAliases.sh
PASSED=0
FAILED=0
inc_counter()
{
    VAL=$1
    if [ $VAL -eq 0 ];then
	PASSED=`expr $PASSED + 1`
    else
	FAILED=`expr $FAILED + 1`
    fi
}
TEST_FLV="`dirname $0`/DemoVideo.flv"
echo -e "${BRIGHT_BLUE}######### Running tests ###########${NORMAL}"
KS=`genks -b $PARTNER_ID`
kalcli -x media list ks=$KS
inc_counter $?
SOME_ENTRY_ID=`kalcli -x baseentry list pager:objectType=KalturaFilterPager pager:pageSize=1 filter:objectType=KalturaBaseEntryFilter   filter:typeEqual=1 ks=$KS|awk '$1 == "id" {print $2}'`
inc_counter $?
kalcli -x baseentry updateThumbnailFromSourceEntry  entryId=$SOME_ENTRY_ID sourceEntryId=$SOME_ENTRY_ID ks=$KS  timeOffset=3
inc_counter $?
kalcli -x  partner register partner:objectType=KalturaPartner partner:name=apartner partner:adminName=apartner partner:adminEmail=<EMAIL> partner:description=someone cmsPassword=<PASSWORD>
inc_counter $?<commit_msg>Usage should print $0 not $1, also, color usage msg in red.<commit_after>#!/bin/bash - 
set -o nounset
if [ -r `dirname $0`/colors.sh ];then
    . `dirname $0`/colors.sh
fi
if [ $# -lt 2 ];then
    echo -e "${BRIGHT_RED}Usage: $0 </path/cli/lib/prefix> <partner_id>${NORMAL}"
    exit 1
fi
PREFIX=$1
PARTNER_ID=$2
shopt -s expand_aliases
. $PREFIX/kalcliAutoComplete
. $PREFIX/kalcliAliases.sh
PASSED=0
FAILED=0
inc_counter()
{
    VAL=$1
    if [ $VAL -eq 0 ];then
	PASSED=`expr $PASSED + 1`
    else
	FAILED=`expr $FAILED + 1`
    fi
}
TEST_FLV="`dirname $0`/DemoVideo.flv"
echo -e "${BRIGHT_BLUE}######### Running tests ###########${NORMAL}"
KS=`genks -b $PARTNER_ID`
kalcli -x media list ks=$KS
inc_counter $?
SOME_ENTRY_ID=`kalcli -x baseentry list pager:objectType=KalturaFilterPager pager:pageSize=1 filter:objectType=KalturaBaseEntryFilter   filter:typeEqual=1 ks=$KS|awk '$1 == "id" {print $2}'`
inc_counter $?
kalcli -x baseentry updateThumbnailFromSourceEntry  entryId=$SOME_ENTRY_ID sourceEntryId=$SOME_ENTRY_ID ks=$KS  timeOffset=3
inc_counter $?
kalcli -x  partner register partner:objectType=KalturaPartner partner:name=apartner partner:adminName=apartner partner:adminEmail=<EMAIL> partner:description=someone cmsPassword=<PASSWORD>
inc_counter $?
{'fraction_non_alphanumeric': 0.15071283095723015, 'fraction_numerical': 0.016293279022403257, 'mean_word_length': 5.514588859416445, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '4723290', 'n_tokens_mistral': 950, 'n_tokens_neox': 930, 'n_words': 210}