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 8.0KB

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