yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
654b96933
master
1#!/usr/bin/env bash 2 3set -e 4 5script_dir =" $( cd " $( dirname " ${ BASH_SOURCE [0]} " ) " > /dev/null 2 >&1 && pwd ) " 6 7summary =() 8failure_count =0 9test_count =0 10 11test () { 12 localname 13 localexit_code 14name =$ 1 15shift 16pushd " $ name " 1 > /dev/null2 >&1 17echo "Running $ name ..." 18" $ @" ||exit_code =$ ? 19summary =(" ${ summary [@]} " " $ name : " ) 20if [[$ exit_code -eq 0 ]];then 21summary =(" ${ summary [@]} " " success" ) 22else 23summary =(" ${ summary [@]} " " failure (exit code: $ exit_code )" ) 24fi 25popd 1 > /dev/null2 >&1 26echo 27test_count =$((test_count + 1)) 28} 29 30cd " ${ script_dir } " 31 32test multiple-source-files slangc source1.slang source2.slang 33 34echo "" 35echo "Summary: " 36echo 37for line in " ${ summary [@]} " ;do 38printf ' %s\n' " $ line " 39done 40echo "" 41echo " $ failure_count failed, out of $ test_count tests" 42if [[$ failure_count -ne 0 ]];then 43exit 1 44fi