Lines Matching refs:history
82 # add a few more entries to the history - we don't care
91 """Verify all history options are accepted or rejected as
94 self.pkg("history")
95 self.pkg("history -l")
96 self.pkg("history -H")
97 self.pkg("history -n 5")
98 self.pkg("history -n foo", exit=2)
99 self.pkg("history -n -5", exit=2)
100 self.pkg("history -n 0", exit=2)
101 self.pkg("history -lH", exit=2)
102 self.pkg("history -t 2010-10-20T14:18:17 -n 1", exit=2)
103 self.pkg("history -t 2010-10-20T14:18:17,rubbish", exit=1)
104 self.pkg("history -t 'this is not a time-stamp'", exit=1)
105 self.pkg("history -t northis", exit=1)
106 self.pkg("history -o time,command -l", exit=2)
107 self.pkg("history -o time,time", exit=2)
108 self.pkg("history -o unknow_column", exit=2)
109 self.pkg("history -o time,command,finish", exit=2)
110 self.pkg("history -o time,reason,finish", exit=2)
143 # work, writing a history entry in the process
150 self.pkg("history -H")
162 self.pkg("history -o start,command")
172 self.pkg("purge-history")
174 self.pkg("history -l")
178 self.pkg("history -l")
182 """Verify that the purge-history command works as expected.
184 self.pkg("purge-history")
185 self.pkg("history -H")
187 # Ensure that the first item in history output is now
188 # purge-history.
190 re.search("purge-history", o.splitlines()[0]) != None)
194 both make the same history entry.
197 self.pkg("purge-history")
200 self.pkg("history -H -o start,operation,client,outcome,reason")
209 self.assertTrue(tmp[1] in ("purge-history",
214 both make the same history entry.
224 self.pkg("purge-history")
226 self.pkg("history -H -o start,operation,client,outcome,reason")
237 self.assertTrue(tmp[1] in ("purge-history",
241 """Verify that corrupt history entries won't cause the client to
245 hist_path = self.get_img_api_obj().img.history.path
250 self.pkg("history")
256 hist_path = self.get_img_api_obj().img.history.path
258 self.pkg("history")
281 self.pkg("purge-history")
285 self.pkg("history -H")
310 self.pkg("history -l")
328 self.pkg("history -Hn 3")
331 self.pkg("history -ln 3")
336 hist_path = self.get_img_api_obj().img.history.path
340 self.pkg("history -Hn {0:d}".format(count + 5))
346 self.pkg("history -H -n 1")
360 self.pkg("history -H -n1 -o {0}".format(col))
373 self.pkg("history -H")
391 self.pkg("history -H -t {0} -o operation".format(timestamp))
416 self.pkg("history -H -t {0} -o start,operation".format(comma_events))
434 # only output history for one instance of each timestamp
436 self.pkg("history -H -t {0} -o start,operation".format(multi_events))
445 self.pkg("history -H")
448 # verify that printing a very wide history range is equal to
449 # printing all history entries. XXX we need to fix this in 2038
450 self.pkg("history -H "
453 "large history range, {0} not equal to {1}".format(
456 # checks to verify history ranges are tricky since one history
457 # timestamp can correspond to more than one history entry.
459 # of history output
473 self.pkg("history -H -t {0}".format(single_ts))
475 self.pkg("history -H -t {0}-{1}".format(single_ts, single_ts))
479 # verify a random range taken from the history is correct
497 "Unable to test pkg history range, {0} == {1}".format(
500 self.pkg("history -H -t {0}-{1}".format(start_ts, end_ts))
504 self.assertTrue(len(range_lines) >= 1, "No output from pkg history"
507 # for each history line in the range output, ensure that it
508 # matches timestamps that we stored from the main history output
516 # list of ranges we expect taken from the entire history output,
518 # pkg history -t <range>
527 "expected range history entry not found "
544 """Verify we can get history for an operation that ran for a
549 "history"])
553 # get the latest history file, and write another copy of it
572 self.pkg("history -n 1 -o time")
576 """Verify we can get history when unicode locale is set"""
578 # If pkg history run when below locales set, it fails.
591 self.pkg("history", env_arg=env)