Skip to content

Commit 9d10f72

Browse files
author
nixnodes
committed
Add oldimdb log test
1 parent 1b2293a commit 9d10f72

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

DATA_STRUCTURES

+3
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ FLAGS:
188188
btxfer I Bytes transferred in the last loop (speed limiting)
189189
rate I Transfer rate in B/s, calculated from bxfer and lupdtime
190190

191+
191192
; glutil specific:
192193

193194
; IMDB
@@ -212,6 +213,8 @@ FLAGS:
212213
country S Country
213214
language S Language
214215
plot S Plot/synopsis
216+
screens I Number of screenings
217+
type S Media type (movie/tv/..)
215218

216219

217220
; TVRAGE

scripts/mk_test.sh

+17-7
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,15 @@ tvrage_lom_fields=("time showid started ended startyear endyear seasons")
8383
tvrage_lom_values=(1384575576 17 378687600 417222000 1982 1983 1)
8484
tvrage_values=(- 1384575576 Seven Scripted 17 http://www.tvrage.com/shows/id-17 Canceled/Ended Wednesday 20:00 60 378687600 417222000 Drama,Music US 1 1982 1983 CBS)
8585

86-
imdb_fields=("dir title time imdbid score votes genre year released runtime rated actors director plot")
87-
imdb_lom_fields=("time score votes year released runtime")
88-
imdb_lom_values=(1385027223 6.6 47 2008 1 14)
89-
imdb_values=(- One 1385027223 tt1302196 6.6 47 Short,Comedy 2008 1 14 blabla Joe Hattie WePlot)
86+
oldimdb_fields=("dir title time imdbid score votes genre year released runtime rated actors director plot")
87+
oldimdb_lom_fields=("time score votes year released runtime")
88+
oldimdb_lom_values=(1385027223 6.6 47 2008 1 14)
89+
oldimdb_values=(- One 1385027223 tt1302196 6.6 47 Short,Comedy 2008 1 14 blabla Joe Hattie WePlot)
90+
91+
imdb_fields=("dir title time imdbid score votes genre year released runtime rated actors director plot country language screens type")
92+
imdb_lom_fields=("time score votes year released runtime screens")
93+
imdb_lom_values=(1385027223 6.6 47 2008 1 14 10100)
94+
imdb_values=(- One 1385027223 tt1302196 6.6 47 Short,Comedy 2008 1 14 blabla Joe Hattie WePlot Spain Spanish 10100 movie)
9095

9196
gconf_fields=("r_path_clean r_path_postproc r_year_extract r_exclude_user paths use_shared_mem execute_on_lookup_fail path_exec_on_lookup_fail_imdb path_exec_on_lookup_fail_tvrage path_exec_on_match r_skip_basedir r_exclude_user_flags lookup_match_strictness_imdb lookup_match_strictness_tvrage logging imdb_skip_zero_score r_path_clean_icase log_string imdb_skip_zero_votes")
9297
gconf_lom_fields=("use_shared_mem execute_on_lookup_fail lookup_match_strictness_imdb lookup_match_strictness_tvrage logging imdb_skip_zero_score r_path_clean_icase imdb_skip_zero_votes")
@@ -153,6 +158,8 @@ launch_test() {
153158
r=0
154159
if [ "${lt_log}" = "tvrage" ]; then
155160
lt_ft="tvlog"
161+
elif [ "${lt_log}" = "oldimdb" ]; then
162+
lt_ft="imdblog_o"
156163
elif [ "${lt_log}" = "imdb" ]; then
157164
lt_ft="imdblog"
158165
elif [ "${lt_log}" = "game" ]; then
@@ -167,11 +174,12 @@ launch_test() {
167174
lt_ft="ge4log"
168175
elif [ "${lt_log}" = "gconf" ]; then
169176
lt_ft="gconf"
170-
171177
else
172178
lt_ft=${lt_log}
173179
fi
180+
174181
echo -n "$1: creating test log.. "
182+
175183
create_packet "${lt_log}_fields" "${lt_log}_values" | ${GLUTIL} --silent --nostats --nobackup -z ${lt_log} --${lt_ft} ${g_td} -vvvv &&
176184
create_packet "${lt_log}_fields" "${lt_log}_values" | ${GLUTIL} --silent --nostats --nobackup -z ${lt_log} --${lt_ft} ${g_td} -vvvv && {
177185
echo -e " \tOK"
@@ -186,7 +194,7 @@ launch_test() {
186194
echo -e " \tOK"
187195
} || {
188196
echo -e " \tFAILED"
189-
${GLUTIL} -q ${lt_log} --nofq --${lt_ft} ${g_td} --batch
197+
${GLUTIL} -q ${lt_log} --nofq --${lt_ft} ${g_td} -E
190198
echo ${lt_ms}
191199
r=1
192200
}
@@ -206,6 +214,7 @@ launch_test() {
206214
echo -e "\t\tOK"
207215
} || {
208216
echo -e "\t\tFAILED"
217+
${GLUTIL} -q ${lt_log} --nofq --${lt_ft} ${g_td} -E
209218
echo ${lt_ms}
210219
r=3
211220
}
@@ -249,7 +258,7 @@ launch_test() {
249258
echo $lt_rv
250259
return 1
251260
}
252-
261+
253262
return ${r}
254263
}
255264

@@ -270,6 +279,7 @@ trap "rm -f ${g_td}; rm -fR ${fs_td}; exit 2" 2 15 9 6 3 15
270279
launch_test dirlog || t_quit ${?}
271280
launch_test nukelog || t_quit ${?}
272281
launch_test tvrage || t_quit ${?}
282+
launch_test oldimdb || t_quit ${?}
273283
launch_test imdb || t_quit ${?}
274284
launch_test dupefile || t_quit ${?}
275285
launch_test lastonlog || t_quit ${?}

0 commit comments

Comments
 (0)