-
Notifications
You must be signed in to change notification settings - Fork 3
/
dbwebb2-inspect-oophp.bash
145 lines (106 loc) · 2.54 KB
/
dbwebb2-inspect-oophp.bash
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#---------------------------- INSPECT oophp START --------------------------
#
# Test general
#
function oophp()
{
inspectIntro
}
#
# Test general, last in sequence
#
function oophplast()
{
inspectMe "me/anax-lite" "" "" "" "anax-lite"
}
#
#
#
function oophpRepo()
{
local repo="$1"
local target="me/$repo"
headerForTest "-- Repo $repo" "-- ${DBW_WWW}$DBW_COURSE/$target"
openFilesInEditor "$target"
printUrl "" "$target"
isGitRepo "$target"
hasGitTagBetween "$EXEC_DIR/$repo" "$2" "$3" > /dev/null
if [ ! -z "$4" ]; then
hasGitTagBetween "$EXEC_DIR/$repo" "$4" "$5" > /dev/null
fi
if [ ! -z "$4" ]; then
tag=$( hasGitTagBetween "$EXEC_DIR/$repo" "$2" "$5" )
else
tag=$( hasGitTagBetween "$EXEC_DIR/$repo" "$2" "$3" )
fi
inspectCommand "" "$EXEC_DIR/$repo" "git remote -v" ""
inspectCommand "" "$EXEC_DIR/$repo" "git tag" ""
inspectCommand "" "$EXEC_DIR/$repo" "git status" ""
inspectCommand "" "$EXEC_DIR/$repo" "git log -n 20 --pretty=format:\"%h_%ad_:_%s%d_[%an]\" --graph --date=short" ""
#inspectCommand "" "$EXEC_DIR/$repo" "git stash" ""
#inspectCommand "" "$EXEC_DIR/$repo" "git checkout -b inspect $tag" ""
# All repos does not include make test
# Make test need test environment
#inspectCommand "Makefile" "$EXEC_DIR/$repo" "make test" ""
}
#
# Test kmom
#
function oophpkmom01()
{
oophpRepo "anax-lite" "1.0.0" "2.0.0"
inspectExerciseHeader "guess" "uppgift/gissa-numret" "$KMOM/guess"
printUrl "index.php" "me/$KMOM/guess"
inspectExerciseHeader "skolan" "uppgift/kom-igang-med-sql" "kmom01/skolan"
viewFileContent "skolan.sql" "me/kmom01/skolan"
# should execute the sql-file skolan/skolan.sql
}
#
# Test kmom
#
function oophpkmom02()
{
oophpRepo "anax-lite" "2.0.0" "3.0.0"
inspectExerciseHeader "skolan" "uppgift/kom-igang-med-sql" "kmom01/skolan"
viewFileContent "skolan.sql" "me/kmom01/skolan"
# should execute the sql-file skolan/skolan.sql
}
#
# Test kmom
#
function oophpkmom03()
{
oophpRepo "anax-lite" "3.0.0" "4.0.0"
inspectExerciseHeader "skolan" "uppgift/kom-igang-med-sql" "kmom01/skolan"
viewFileContent "skolan.sql" "me/kmom01/skolan"
# should execute the sql-file skolan/skolan.sql
}
#
# Test kmom
#
function oophpkmom04()
{
:
}
#
# Test kmom
#
function oophpkmom05()
{
:
}
#
# Test kmom
#
function oophpkmom06()
{
:
}
#
# Test kmom
#
function oophpkmom10()
{
:
}
#---------------------------- INSPECT oophp END ----------------------------