File indexing completed on 2024-04-06 12:18:19
0001
0002
0003
0004 function die {
0005 printf "\n%s: status %s\n" "$1" "$2"
0006 if [ $
0007 printf "%s\n" "=== Log File =========="
0008 cat $3
0009 printf "%s\n" "=== End of Log File ==="
0010 fi
0011 exit $2
0012 }
0013
0014 if [ -z "${SCRAM_TEST_PATH}" ]; then
0015 printf "\n%s\n\n" "ERROR -- environment variable SCRAM_TEST_PATH not defined"
0016 exit 1
0017 fi
0018
0019
0020
0021
0022 rm -rf test_hltFindDuplicates_mode0_output
0023
0024 hltFindDuplicates "${SCRAM_TEST_PATH}"/test_hltFindDuplicates_cfg.py -x="--mode=0" -v 2 \
0025 -o test_hltFindDuplicates_mode0_output &> test_hltFindDuplicates_mode0_log \
0026 || die 'Failure running hltFindDuplicates (mode: 0)' $? test_hltFindDuplicates_mode0_log
0027
0028 cat <<@EOF > test_hltFindDuplicates_mode0_groups_expected
0029
0030 d3x
0031 d3y
0032 m3x
0033 m3y
0034
0035
0036 d2x
0037 d2y
0038 m2x
0039 m2y
0040
0041
0042 d1x
0043 d1y
0044 m1x
0045 m1y
0046 @EOF
0047
0048 diff test_hltFindDuplicates_mode0_groups_expected test_hltFindDuplicates_mode0_output/groups.txt \
0049 || die "Unexpected differences in groups.txt output of hltFindDuplicates (mode: 0)" $?
0050
0051
0052
0053
0054 rm -rf test_hltFindDuplicates_mode1_output
0055
0056 hltFindDuplicates "${SCRAM_TEST_PATH}"/test_hltFindDuplicates_cfg.py -x="--mode=1" -v 2 \
0057 -o test_hltFindDuplicates_mode1_output &> test_hltFindDuplicates_mode1_log \
0058 || die 'Failure running hltFindDuplicates (mode: 1)' $? test_hltFindDuplicates_mode1_log
0059
0060 cat <<@EOF > test_hltFindDuplicates_mode1_groups_expected
0061
0062 d3x
0063 d3y
0064 m3x
0065
0066
0067 d2x
0068 d2y
0069 m2x
0070
0071
0072 d1x
0073 d1y
0074 m1x
0075 @EOF
0076
0077 diff test_hltFindDuplicates_mode1_groups_expected test_hltFindDuplicates_mode1_output/groups.txt \
0078 || die "Unexpected differences in groups.txt output of hltFindDuplicates (mode: 1)" $?