1#!/bin/sh 2# Valid tests to run 3tests="utest_binary \ 4 utest_bits \ 5 utest_common \ 6 utest_hash_table \ 7 utest_inet_types \ 8 utest_int8 \ 9 utest_json \ 10 utest_list \ 11 utest_merge \ 12 utest_metadata \ 13 utest_parser_yang \ 14 utest_parser_yin \ 15 utest_pattern \ 16 utest_printer_yang \ 17 utest_printer_yin \ 18 utest_range \ 19 utest_schema \ 20 utest_set \ 21 utest_string \ 22 utest_tree_data \ 23 utest_tree_schema_compile \ 24 utest_types \ 25 utest_xml \ 26 utest_xpath \ 27 utest_yang_types \ 28 utest_yanglib" 29 30# cd into right directory 31ptestdir=$(dirname "$(readlink -f "$0")") 32cd "$ptestdir"/tests || exit 33 34# Run specified tests 35for f in $tests 36do 37 if test -e ./"$f"; then 38 if ./"$f" > ./"$f".out 2> ./"$f".err; then 39 echo "PASS: $f" 40 else 41 echo "FAIL: $f" 42 fi 43 else 44 echo "SKIP: $f" 45 fi 46done 47