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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. --vi-name "Windows 4 HD" "Windows 4 HighDef" \
  27. --vi-name 5 "In 5" \
  28. --vi-name "Input 6" "Camera 6" \
  29. --vo-name "Enc1 1" "Encoder 1" \
  30. --vo-name 16 Dev-Lo \
  31. --vo-lock 6 \
  32. --vo-lock "Output 15" \
  33. --vo-unlock 12 \
  34. --vo-unlock "Enc2 1" \
  35. --vo-route "Output 5" "Windows 1" \
  36. --vo-route 5 2 \
  37. --vo-route 5 "Windows 3" \
  38. $@ &> test/test-04.out
  39. check test/test-04 "Test multiple configuration commands"
  40. grep -v ^videohub: < test/test-03.out > test/test-05.out
  41. sed -e 's,| L |,| O |,g' < test/test-01.ok > test/test-05.ok
  42. check test/test-05 "Test if --backup restored correct config."
  43. ./videohubctrl --test-input test/input-00.txt --vi-name 0 "Test Input 0" $@ &> test/test-06.out
  44. ./videohubctrl --test-input test/input-00.txt --vi-name 18 "Test Input 18" $@ &>> test/test-06.out
  45. ./videohubctrl --test-input test/input-00.txt --vi-name "Input 18" "Test Input 18" $@ &>> test/test-06.out
  46. ./videohubctrl --test-input test/input-00.txt --vo-name 18 "Test Output 18" $@ &>> test/test-06.out
  47. ./videohubctrl --test-input test/input-00.txt --vo-name "Output 18" "Test Output 18" $@ &>> test/test-06.out
  48. ./videohubctrl --test-input test/input-00.txt --vo-lock 18 $@ &>> test/test-06.out
  49. ./videohubctrl --test-input test/input-00.txt --vo-lock "Output 18" $@ &>> test/test-06.out
  50. ./videohubctrl --test-input test/input-00.txt --vo-unlock 18 $@ &>> test/test-06.out
  51. ./videohubctrl --test-input test/input-00.txt --vo-unlock "Output 18" $@ &>> test/test-06.out
  52. ./videohubctrl --test-input test/input-00.txt --vo-route 0 0 $@ &>> test/test-06.out
  53. ./videohubctrl --test-input test/input-00.txt --vo-route 0 18 $@ &>> test/test-06.out
  54. ./videohubctrl --test-input test/input-00.txt --vo-route 18 0 $@ &>> test/test-06.out
  55. ./videohubctrl --test-input test/input-00.txt --vo-route 18 18 $@ &>> test/test-06.out
  56. ./videohubctrl --test-input test/input-00.txt --vo-route 1 18 $@ &>> test/test-06.out
  57. ./videohubctrl --test-input test/input-00.txt --vo-route 18 1 $@ &>> test/test-06.out
  58. ./videohubctrl --test-input test/input-00.txt --vo-route "Input 10" "Output 10" $@ &>> test/test-06.out
  59. ./videohubctrl --test-input test/input-00.txt --vo-route "Err Output" "Input 10" $@ &>> test/test-06.out
  60. ./videohubctrl --test-input test/input-00.txt --vo-route "Output 10" "Err Input" $@ &>> test/test-06.out
  61. check test/test-06 "Test errors on commands with invalid ports."
  62. videohubctrl --test-input test/input-00.txt --list-device $@ &> test/test-07.out
  63. check test/test-07 "Test --list-device option output"
  64. videohubctrl --test-input test/input-00.txt --list-vinputs $@ &> test/test-08.out
  65. check test/test-08 "Test --list-vinputs option output"
  66. videohubctrl --test-input test/input-00.txt --list-voutputs $@ &> test/test-09.out
  67. check test/test-09 "Test --list-voutputs option output"
  68. videohubctrl --test-input test/input-10.txt $@ &> test/test-10.out
  69. check test/test-10 "Test invalid protocol"
  70. videohubctrl --test-input test/input-11.txt $@ &> test/test-11.out
  71. check test/test-11 "Test invalid number of ports"
  72. videohubctrl --test-input test/input-12.txt $@ &> test/test-12.out
  73. check test/test-12 "Test device-not_present check"
  74. videohubctrl --test-input test/input-14.txt $@ &> test/test-14.out
  75. check test/test-14 "Test buggy input"