forked from telit/linux-version-finder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest
executable file
·94 lines (86 loc) · 3.34 KB
/
test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/expect -f
set basedir [file dirname $argv0]
set tool $basedir/linux-version-finder
# Check a single commit without backports
spawn $tool b2d229d4ddb17db541098b83524d901257e93845
expect "v5.18-rc3\r"
expect eof
# Check a merge commit that cannot have backports trough the child
spawn $tool b2d229d4ddb17db541098b83524d901257e93845~
expect "v5.18-rc3\r"
expect eof
# Check a commit with backports
spawn $tool 2939e1a86f758b55cdba73e29397dd3d94df13bc
expect "v4.10-rc1 v4.9.1 v4.8.16 v4.4.40 v3.16.42\r"
expect eof
# Return just the second
spawn $tool 2939e1a86f758b55cdba73e29397dd3d94df13bc 2d327a79ee176930dc72c131a970c891d367c1dc
expect "v5.18-rc1 v5.17.1 v5.16.18 v5.15.32 v5.10.109 v5.4.188 v4.19.237 v4.14.274 v4.9.309\r"
expect eof
# Return just the second
spawn $tool 2939e1a86f758b55cdba73e29397dd3d94df13bc 22b106e5355d6e7a9c3b5cb5ed4ef22ae585ea94
expect "v5.19-rc1 v5.18.3 v5.17.14 v5.15.46 v5.10.121\r"
expect eof
# Return just the first (is reversed respect to the previous one)
spawn $tool 22b106e5355d6e7a9c3b5cb5ed4ef22ae585ea94 2939e1a86f758b55cdba73e29397dd3d94df13bc
expect "v5.19-rc1 v5.18.3 v5.17.14 v5.15.46 v5.10.121\r"
expect eof
# Check finding version without all commits
spawn $tool --no-all 2939e1a86f758b55cdba73e29397dd3d94df13bc 22b106e5355d6e7a9c3b5cb5ed4ef22ae585ea94
expect "v5.16: 22b106e5355d\r"
expect "v5.14: 22b106e5355d\r"
expect "v5.13: 22b106e5355d\r"
expect "v5.12: 22b106e5355d\r"
expect "v5.11: 22b106e5355d\r"
expect "v5.9: 22b106e5355d\r"
expect "v5.8: 22b106e5355d\r"
expect "v5.7: 22b106e5355d\r"
expect "v5.6: 22b106e5355d\r"
expect "v5.5: 22b106e5355d\r"
expect "v5.3: 22b106e5355d\r"
expect "v5.2: 22b106e5355d\r"
expect "v5.1: 22b106e5355d\r"
expect "v5.0: 22b106e5355d\r"
expect "v4.20: 22b106e5355d\r"
expect "v4.19: 22b106e5355d\r"
expect "v4.18: 22b106e5355d\r"
expect "v4.17: 22b106e5355d\r"
expect "v4.16: 22b106e5355d\r"
expect "v4.15: 22b106e5355d\r"
expect "v4.14: 22b106e5355d\r"
expect "v4.13: 22b106e5355d\r"
expect "v4.12: 22b106e5355d\r"
expect "v4.11: 22b106e5355d\r"
expect "v4.10: 22b106e5355d\r"
expect "v4.9: 22b106e5355d\r"
expect "v4.8: 22b106e5355d\r"
expect "v4.7: 2939e1a86f75 22b106e5355d\r"
expect "v4.6: 2939e1a86f75 22b106e5355d\r"
expect "v4.5: 2939e1a86f75 22b106e5355d\r"
expect "v4.4: 22b106e5355d\r"
expect "v4.3: 2939e1a86f75 22b106e5355d\r"
expect "v4.2: 2939e1a86f75 22b106e5355d\r"
expect "v4.1: 22b106e5355d\r"
expect "v4.0: 2939e1a86f75 22b106e5355d\r"
expect "v3.19: 2939e1a86f75 22b106e5355d\r"
expect "v3.18: 2939e1a86f75 22b106e5355d\r"
expect "v3.17: 2939e1a86f75 22b106e5355d\r"
expect "v3.16: 22b106e5355d\r"
expect "v3.15: 2939e1a86f75 22b106e5355d\r"
expect "v3.14: 2939e1a86f75 22b106e5355d\r"
expect "v3.13: 2939e1a86f75 22b106e5355d\r"
expect "v3.12: 2939e1a86f75 22b106e5355d\r"
expect "v3.11: 2939e1a86f75 22b106e5355d\r"
expect "v3.10: 2939e1a86f75 22b106e5355d\r"
expect "v3.9: 2939e1a86f75 22b106e5355d\r"
expect "v3.8: 2939e1a86f75 22b106e5355d\r"
expect "v3.7: 2939e1a86f75 22b106e5355d\r"
expect "v3.6: 2939e1a86f75 22b106e5355d\r"
expect "v3.5: 2939e1a86f75 22b106e5355d\r"
expect "v3.4: 2939e1a86f75 22b106e5355d\r"
expect "v3.3: 2939e1a86f75 22b106e5355d\r"
expect "v3.2: 2939e1a86f75 22b106e5355d\r"
expect "v3.1: 2939e1a86f75 22b106e5355d\r"
expect "v3.0: 2939e1a86f75 22b106e5355d\r"
expect "v2.6: 2939e1a86f75 22b106e5355d\r"
expect eof