Browse Source

test: Fix tests to work out of the box on OS X (difference in getopt messages)

Georgi Chorbadzhiyski 6 years ago
parent
commit
1bee26847a
2 changed files with 42 additions and 41 deletions
  1. 41
    40
      test/run
  2. 1
    1
      test/test-06.ok

+ 41
- 40
test/run View File

@@ -2,6 +2,7 @@
2 2
 # Simple test suite for videohubctrl functionality
3 3
 
4 4
 cd $(dirname $0)/..
5
+export PATH=".:$PATH"
5 6
 
6 7
 make
7 8
 
@@ -79,46 +80,46 @@ grep -v ^videohub: < test/test-03.out > test/test-05.out
79 80
 sed -e 's,| L |,| O |,g' < test/test-01.ok > test/test-05.ok
80 81
 check test/test-05 "Test if --backup restored correct config."
81 82
 
82
-./videohubctrl --test-input test/input-00.txt --in-name 0           "Test Input 0"   $@ &> test/test-06.out
83
-./videohubctrl --test-input test/input-00.txt --in-name 18          "Test Input 18"  $@ >> test/test-06.out 2>&1
84
-./videohubctrl --test-input test/input-00.txt --in-name "Input 18"  "Test Input 18"  $@ >> test/test-06.out 2>&1
85
-./videohubctrl --test-input test/input-00.txt --out-name 18          "Test Output 18" $@ >> test/test-06.out 2>&1
86
-./videohubctrl --test-input test/input-00.txt --out-name "Output 18" "Test Output 18" $@ >> test/test-06.out 2>&1
87
-./videohubctrl --test-input test/input-00.txt --in-output "Input 22" "Output 15"     $@ >> test/test-06.out 2>&1
88
-./videohubctrl --test-input test/input-00.txt --in-output "Input 14" "Output 22"     $@ >> test/test-06.out 2>&1
89
-./videohubctrl --test-input test/input-00.txt --in-monitor "Input 22" "Monitor 3"    $@ >> test/test-06.out 2>&1
90
-./videohubctrl --test-input test/input-00.txt --in-monitor "Input 14" "Monitor 33"   $@ >> test/test-06.out 2>&1
91
-./videohubctrl --test-input test/input-00.txt --out-lock 18                           $@ >> test/test-06.out 2>&1
92
-./videohubctrl --test-input test/input-00.txt --out-lock "Output 18"                  $@ >> test/test-06.out 2>&1
93
-./videohubctrl --test-input test/input-00.txt --out-unlock 18                         $@ >> test/test-06.out 2>&1
94
-./videohubctrl --test-input test/input-00.txt --out-unlock "Output 18"                $@ >> test/test-06.out 2>&1
95
-./videohubctrl --test-input test/input-00.txt --out-input 0 0                         $@ >> test/test-06.out 2>&1
96
-./videohubctrl --test-input test/input-00.txt --out-input 0 18                        $@ >> test/test-06.out 2>&1
97
-./videohubctrl --test-input test/input-00.txt --out-input 18 0                        $@ >> test/test-06.out 2>&1
98
-./videohubctrl --test-input test/input-00.txt --out-input 18 18                       $@ >> test/test-06.out 2>&1
99
-./videohubctrl --test-input test/input-00.txt --out-input 1  18                       $@ >> test/test-06.out 2>&1
100
-./videohubctrl --test-input test/input-00.txt --out-input 18 1                        $@ >> test/test-06.out 2>&1
101
-./videohubctrl --test-input test/input-00.txt --out-input "Input 10" "Output 10"      $@ >> test/test-06.out 2>&1
102
-./videohubctrl --test-input test/input-00.txt --out-input "Err Output" "Input 10"     $@ >> test/test-06.out 2>&1
103
-./videohubctrl --test-input test/input-00.txt --out-input "Output 10" "Err Input"     $@ >> test/test-06.out 2>&1
104
-./videohubctrl --test-input test/input-00.txt --mon-name 18          "Test Output 18" $@ >> test/test-06.out 2>&1
105
-./videohubctrl --test-input test/input-00.txt --mon-name "Output 18" "Test Output 18" $@ >> test/test-06.out 2>&1
106
-./videohubctrl --test-input test/input-00.txt --mon-lock 18                           $@ >> test/test-06.out 2>&1
107
-./videohubctrl --test-input test/input-00.txt --mon-lock "Output 18"                  $@ >> test/test-06.out 2>&1
108
-./videohubctrl --test-input test/input-00.txt --mon-unlock 18                         $@ >> test/test-06.out 2>&1
109
-./videohubctrl --test-input test/input-00.txt --mon-unlock "Output 18"                $@ >> test/test-06.out 2>&1
110
-./videohubctrl --test-input test/input-00.txt --ser-name 18          "Test Serial 18" $@ >> test/test-06.out 2>&1
111
-./videohubctrl --test-input test/input-00.txt --ser-name "Serial 18" "Test Serial 18" $@ >> test/test-06.out 2>&1
112
-./videohubctrl --test-input test/input-00.txt --ser-clear 24                          $@ >> test/test-06.out 2>&1
113
-./videohubctrl --test-input test/input-00.txt --ser-clear "Serial X"                  $@ >> test/test-06.out 2>&1
114
-./videohubctrl --test-input test/input-00.txt --ser-connect 24 7                      $@ >> test/test-06.out 2>&1
115
-./videohubctrl --test-input test/input-00.txt --ser-lock 18                           $@ >> test/test-06.out 2>&1
116
-./videohubctrl --test-input test/input-00.txt --ser-lock "Serial 18"                  $@ >> test/test-06.out 2>&1
117
-./videohubctrl --test-input test/input-00.txt --ser-unlock 18                         $@ >> test/test-06.out 2>&1
118
-./videohubctrl --test-input test/input-00.txt --ser-unlock "Serial 18"                $@ >> test/test-06.out 2>&1
119
-./videohubctrl --test-input test/input-00.txt --ser-dir 1 err-dir                     $@ >> test/test-06.out 2>&1
120
-./videohubctrl --test-input test/input-00.txt --ser-dir "Serial 5" err-dir            $@ >> test/test-06.out 2>&1
121
-./videohubctrl --test-input test/input-00.txt --set-name                             $@ >> test/test-06.out 2>&1
83
+videohubctrl --test-input test/input-00.txt --in-name 0           "Test Input 0"   $@ &> test/test-06.out
84
+videohubctrl --test-input test/input-00.txt --in-name 18          "Test Input 18"  $@ >> test/test-06.out 2>&1
85
+videohubctrl --test-input test/input-00.txt --in-name "Input 18"  "Test Input 18"  $@ >> test/test-06.out 2>&1
86
+videohubctrl --test-input test/input-00.txt --out-name 18          "Test Output 18" $@ >> test/test-06.out 2>&1
87
+videohubctrl --test-input test/input-00.txt --out-name "Output 18" "Test Output 18" $@ >> test/test-06.out 2>&1
88
+videohubctrl --test-input test/input-00.txt --in-output "Input 22" "Output 15"     $@ >> test/test-06.out 2>&1
89
+videohubctrl --test-input test/input-00.txt --in-output "Input 14" "Output 22"     $@ >> test/test-06.out 2>&1
90
+videohubctrl --test-input test/input-00.txt --in-monitor "Input 22" "Monitor 3"    $@ >> test/test-06.out 2>&1
91
+videohubctrl --test-input test/input-00.txt --in-monitor "Input 14" "Monitor 33"   $@ >> test/test-06.out 2>&1
92
+videohubctrl --test-input test/input-00.txt --out-lock 18                           $@ >> test/test-06.out 2>&1
93
+videohubctrl --test-input test/input-00.txt --out-lock "Output 18"                  $@ >> test/test-06.out 2>&1
94
+videohubctrl --test-input test/input-00.txt --out-unlock 18                         $@ >> test/test-06.out 2>&1
95
+videohubctrl --test-input test/input-00.txt --out-unlock "Output 18"                $@ >> test/test-06.out 2>&1
96
+videohubctrl --test-input test/input-00.txt --out-input 0 0                         $@ >> test/test-06.out 2>&1
97
+videohubctrl --test-input test/input-00.txt --out-input 0 18                        $@ >> test/test-06.out 2>&1
98
+videohubctrl --test-input test/input-00.txt --out-input 18 0                        $@ >> test/test-06.out 2>&1
99
+videohubctrl --test-input test/input-00.txt --out-input 18 18                       $@ >> test/test-06.out 2>&1
100
+videohubctrl --test-input test/input-00.txt --out-input 1  18                       $@ >> test/test-06.out 2>&1
101
+videohubctrl --test-input test/input-00.txt --out-input 18 1                        $@ >> test/test-06.out 2>&1
102
+videohubctrl --test-input test/input-00.txt --out-input "Input 10" "Output 10"      $@ >> test/test-06.out 2>&1
103
+videohubctrl --test-input test/input-00.txt --out-input "Err Output" "Input 10"     $@ >> test/test-06.out 2>&1
104
+videohubctrl --test-input test/input-00.txt --out-input "Output 10" "Err Input"     $@ >> test/test-06.out 2>&1
105
+videohubctrl --test-input test/input-00.txt --mon-name 18          "Test Output 18" $@ >> test/test-06.out 2>&1
106
+videohubctrl --test-input test/input-00.txt --mon-name "Output 18" "Test Output 18" $@ >> test/test-06.out 2>&1
107
+videohubctrl --test-input test/input-00.txt --mon-lock 18                           $@ >> test/test-06.out 2>&1
108
+videohubctrl --test-input test/input-00.txt --mon-lock "Output 18"                  $@ >> test/test-06.out 2>&1
109
+videohubctrl --test-input test/input-00.txt --mon-unlock 18                         $@ >> test/test-06.out 2>&1
110
+videohubctrl --test-input test/input-00.txt --mon-unlock "Output 18"                $@ >> test/test-06.out 2>&1
111
+videohubctrl --test-input test/input-00.txt --ser-name 18          "Test Serial 18" $@ >> test/test-06.out 2>&1
112
+videohubctrl --test-input test/input-00.txt --ser-name "Serial 18" "Test Serial 18" $@ >> test/test-06.out 2>&1
113
+videohubctrl --test-input test/input-00.txt --ser-clear 24                          $@ >> test/test-06.out 2>&1
114
+videohubctrl --test-input test/input-00.txt --ser-clear "Serial X"                  $@ >> test/test-06.out 2>&1
115
+videohubctrl --test-input test/input-00.txt --ser-connect 24 7                      $@ >> test/test-06.out 2>&1
116
+videohubctrl --test-input test/input-00.txt --ser-lock 18                           $@ >> test/test-06.out 2>&1
117
+videohubctrl --test-input test/input-00.txt --ser-lock "Serial 18"                  $@ >> test/test-06.out 2>&1
118
+videohubctrl --test-input test/input-00.txt --ser-unlock 18                         $@ >> test/test-06.out 2>&1
119
+videohubctrl --test-input test/input-00.txt --ser-unlock "Serial 18"                $@ >> test/test-06.out 2>&1
120
+videohubctrl --test-input test/input-00.txt --ser-dir 1 err-dir                     $@ >> test/test-06.out 2>&1
121
+videohubctrl --test-input test/input-00.txt --ser-dir "Serial 5" err-dir            $@ >> test/test-06.out 2>&1
122
+videohubctrl --test-input test/input-00.txt --set-name                             $@ >> test/test-06.out 2>&1
122 123
 check test/test-06 "Test errors on commands with invalid parameters."
123 124
 
124 125
 videohubctrl --test-input test/input-00.txt --list-device $@ &> test/test-07.out

+ 1
- 1
test/test-06.ok View File

@@ -37,4 +37,4 @@ ERROR: Unknown serial port number/name: 18
37 37
 ERROR: Unknown serial port number/name: Serial 18
38 38
 ERROR: Invalid serial port direction 'err-dir'. Allowed are: in, out, auto.
39 39
 ERROR: Invalid serial port direction 'err-dir'. Allowed are: in, out, auto.
40
-./videohubctrl: option '--set-name' requires an argument
40
+videohubctrl: option `--set-name' requires an argument

Loading…
Cancel
Save