videohubctrl can be used to control Blackmagic Design Videohub SDI router device over the network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

run 7.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. #!/bin/sh
  2. # Simple test suite for videohubctrl functionality
  3. cd $(dirname $0)/..
  4. make
  5. ulimit -c unlimited
  6. export PATH=".:$PATH"
  7. check() {
  8. if diff -u $1.ok $1.out
  9. then
  10. echo "OK : $2"
  11. else
  12. echo "ERROR : $2"
  13. exit 1
  14. fi
  15. }
  16. videohubctrl --test-input test/input-00.txt $@ &> test/test-01.out
  17. check test/test-01 "Test parsing of test/input-00.txt"
  18. videohubctrl --test-input test/input-00.txt --backup $@ &> test/test-02.out
  19. check test/test-02 "Test --backup option output"
  20. (
  21. sed -e 's|\\||g' < test/test-02.ok | tr -d '\n'
  22. echo ' --test-input test/input-03.txt'
  23. ) | sh &> test/test-03.out
  24. check test/test-03 "Test --backup restore"
  25. videohubctrl --test-input test/input-00.txt \
  26. --set-name "Test name" \
  27. --vi-name "Windows 4 HD" "Windows 4 HighDef" \
  28. --vi-name 5 "In 5" \
  29. --vi-name "Input 6" "Camera 6" \
  30. --vo-name "Enc1 1" "Encoder 1" \
  31. --vo-name 16 Dev-Lo \
  32. --vo-lock 6 \
  33. --vo-lock "Output 15" \
  34. --vo-unlock 12 \
  35. --vo-unlock "Enc2 1" \
  36. --vo-input "Output 5" "Windows 1" \
  37. --vo-input 5 2 \
  38. --vo-input 5 "Windows 3" \
  39. --mo-name 1 "PC 1 Mon" \
  40. --mo-name "Monitor 4" "Decklink" \
  41. --mo-unlock 2 \
  42. --mo-lock 4 \
  43. --mo-name 3 "Loopback" \
  44. --mo-input 3 16 \
  45. --se-name 1 "Ren Ctrl 1" \
  46. --se-name "Deck 3" "Ren Deck 3" \
  47. --se-unlock 1 \
  48. --se-lock 2 \
  49. --se-input 2 1 \
  50. --se-dir 6 in \
  51. --se-dir 7 out \
  52. --se-dir 8 out --se-dir 8 auto \
  53. --se-input 4 5 \
  54. --se-input 6 7 \
  55. --se-clear 4 \
  56. --se-clear "Serial 6" \
  57. --pu-clear 1 --pu-clear 3 --pu-clear 4 \
  58. --pu-unlock 1 --pu-lock 1 --pu-connect 1 "Windows 4 HD" \
  59. --pu-connect 4 "DPlay1" --pu-lock 4 \
  60. --fr-name 1 "Pic 1" --fr-name 2 "Pic 2" \
  61. --fr-output 1 13 --fr-output 2 14 --fr-output 3 15 \
  62. --fr-clear 3 \
  63. --fr-lock 1 --fr-lock 2 --fr-lock 8 --fr-unlock 8 \
  64. $@ &> test/test-04.out
  65. check test/test-04 "Test multiple configuration commands"
  66. grep -v ^videohub: < test/test-03.out > test/test-05.out
  67. sed -e 's,| L |,| O |,g' < test/test-01.ok > test/test-05.ok
  68. check test/test-05 "Test if --backup restored correct config."
  69. ./videohubctrl --test-input test/input-00.txt --vi-name 0 "Test Input 0" $@ &> test/test-06.out
  70. ./videohubctrl --test-input test/input-00.txt --vi-name 18 "Test Input 18" $@ >> test/test-06.out 2>&1
  71. ./videohubctrl --test-input test/input-00.txt --vi-name "Input 18" "Test Input 18" $@ >> test/test-06.out 2>&1
  72. ./videohubctrl --test-input test/input-00.txt --vo-name 18 "Test Output 18" $@ >> test/test-06.out 2>&1
  73. ./videohubctrl --test-input test/input-00.txt --vo-name "Output 18" "Test Output 18" $@ >> test/test-06.out 2>&1
  74. ./videohubctrl --test-input test/input-00.txt --vo-lock 18 $@ >> test/test-06.out 2>&1
  75. ./videohubctrl --test-input test/input-00.txt --vo-lock "Output 18" $@ >> test/test-06.out 2>&1
  76. ./videohubctrl --test-input test/input-00.txt --vo-unlock 18 $@ >> test/test-06.out 2>&1
  77. ./videohubctrl --test-input test/input-00.txt --vo-unlock "Output 18" $@ >> test/test-06.out 2>&1
  78. ./videohubctrl --test-input test/input-00.txt --vo-input 0 0 $@ >> test/test-06.out 2>&1
  79. ./videohubctrl --test-input test/input-00.txt --vo-input 0 18 $@ >> test/test-06.out 2>&1
  80. ./videohubctrl --test-input test/input-00.txt --vo-input 18 0 $@ >> test/test-06.out 2>&1
  81. ./videohubctrl --test-input test/input-00.txt --vo-input 18 18 $@ >> test/test-06.out 2>&1
  82. ./videohubctrl --test-input test/input-00.txt --vo-input 1 18 $@ >> test/test-06.out 2>&1
  83. ./videohubctrl --test-input test/input-00.txt --vo-input 18 1 $@ >> test/test-06.out 2>&1
  84. ./videohubctrl --test-input test/input-00.txt --vo-input "Input 10" "Output 10" $@ >> test/test-06.out 2>&1
  85. ./videohubctrl --test-input test/input-00.txt --vo-input "Err Output" "Input 10" $@ >> test/test-06.out 2>&1
  86. ./videohubctrl --test-input test/input-00.txt --vo-input "Output 10" "Err Input" $@ >> test/test-06.out 2>&1
  87. ./videohubctrl --test-input test/input-00.txt --mo-name 18 "Test Output 18" $@ >> test/test-06.out 2>&1
  88. ./videohubctrl --test-input test/input-00.txt --mo-name "Output 18" "Test Output 18" $@ >> test/test-06.out 2>&1
  89. ./videohubctrl --test-input test/input-00.txt --mo-lock 18 $@ >> test/test-06.out 2>&1
  90. ./videohubctrl --test-input test/input-00.txt --mo-lock "Output 18" $@ >> test/test-06.out 2>&1
  91. ./videohubctrl --test-input test/input-00.txt --mo-unlock 18 $@ >> test/test-06.out 2>&1
  92. ./videohubctrl --test-input test/input-00.txt --mo-unlock "Output 18" $@ >> test/test-06.out 2>&1
  93. ./videohubctrl --test-input test/input-00.txt --se-name 18 "Test Serial 18" $@ >> test/test-06.out 2>&1
  94. ./videohubctrl --test-input test/input-00.txt --se-name "Serial 18" "Test Serial 18" $@ >> test/test-06.out 2>&1
  95. ./videohubctrl --test-input test/input-00.txt --se-clear 24 $@ >> test/test-06.out 2>&1
  96. ./videohubctrl --test-input test/input-00.txt --se-clear "Serial X" $@ >> test/test-06.out 2>&1
  97. ./videohubctrl --test-input test/input-00.txt --se-connect 24 7 $@ >> test/test-06.out 2>&1
  98. ./videohubctrl --test-input test/input-00.txt --se-lock 18 $@ >> test/test-06.out 2>&1
  99. ./videohubctrl --test-input test/input-00.txt --se-lock "Serial 18" $@ >> test/test-06.out 2>&1
  100. ./videohubctrl --test-input test/input-00.txt --se-unlock 18 $@ >> test/test-06.out 2>&1
  101. ./videohubctrl --test-input test/input-00.txt --se-unlock "Serial 18" $@ >> test/test-06.out 2>&1
  102. ./videohubctrl --test-input test/input-00.txt --se-dir 1 err-dir $@ >> test/test-06.out 2>&1
  103. ./videohubctrl --test-input test/input-00.txt --se-dir "Serial 5" err-dir $@ >> test/test-06.out 2>&1
  104. ./videohubctrl --test-input test/input-00.txt --set-name $@ >> test/test-06.out 2>&1
  105. check test/test-06 "Test errors on commands with invalid parameters."
  106. videohubctrl --test-input test/input-00.txt --list-device $@ &> test/test-07.out
  107. check test/test-07 "Test --list-device option output"
  108. videohubctrl --test-input test/input-00.txt --list-vinputs $@ &> test/test-08.out
  109. check test/test-08 "Test --list-vinputs option output"
  110. videohubctrl --test-input test/input-00.txt --list-voutputs $@ &> test/test-09.out
  111. check test/test-09 "Test --list-voutputs option output"
  112. videohubctrl --test-input test/input-10.txt $@ &> test/test-10.out
  113. check test/test-10 "Test invalid protocol"
  114. videohubctrl --test-input test/input-11.txt $@ &> test/test-11.out
  115. check test/test-11 "Test invalid number of ports"
  116. videohubctrl --test-input test/input-12.txt $@ &> test/test-12.out
  117. check test/test-12 "Test device-not_present check"
  118. videohubctrl --test-input test/input-14.txt $@ &> test/test-14.out
  119. check test/test-14 "Test buggy input"
  120. videohubctrl --test-input test/input-00.txt --list-moutputs $@ &> test/test-15.out
  121. check test/test-15 "Test --list-moutputs option output"
  122. videohubctrl --test-input test/input-00.txt --list-serial $@ &> test/test-16.out
  123. check test/test-16 "Test --list-serial option output"
  124. videohubctrl --test-input test/input-17.txt --info $@ &> test/test-17.out
  125. check test/test-17 "Test wider range of input commands"
  126. videohubctrl --test-input test/input-00.txt --list-proc-units $@ &> test/test-18.out
  127. check test/test-18 "Test --list-proc-units option output"
  128. videohubctrl --test-input test/input-00.txt --list-frames $@ &> test/test-19.out
  129. check test/test-19 "Test --list-frames option output"