ADDED tests/tests/ez_fail/testconfig Index: tests/tests/ez_fail/testconfig ================================================================== --- /dev/null +++ tests/tests/ez_fail/testconfig @@ -0,0 +1,18 @@ +[setup] + +[requirements] +priority 10 + +[ezsteps] +lookittmp ls /tmp +lookithome ls /home +lookitnada ls /nada +lookitusr ls /usr + +[test_meta] +author matt +owner bob +description This test runs a single ezstep which is expected to pass, no logpro file. + +tags first,single +reviewed 09/10/2011, by Matt ADDED tests/tests/ez_pass/testconfig Index: tests/tests/ez_pass/testconfig ================================================================== --- /dev/null +++ tests/tests/ez_pass/testconfig @@ -0,0 +1,13 @@ +[setup] + +[ezsteps] +lookittmp ls /tmp +lookithome ls /home + +[test_meta] +author matt +owner bob +description This test runs a single ezstep which is expected to pass, no logpro file. + +tags first,single +reviewed 09/10/2011, by Matt ADDED tests/tests/ez_warn/testconfig Index: tests/tests/ez_warn/testconfig ================================================================== --- /dev/null +++ tests/tests/ez_warn/testconfig @@ -0,0 +1,13 @@ +[setup] + +[ezsteps] +lookittmp ls /tmp +lookithome ls /home + +[test_meta] +author matt +owner bob +description This test runs a single ezstep which is expected to pass, no logpro file. + +tags first,single +reviewed 09/10/2011, by Matt ADDED tests/tests/ezlog_fail/example.logpro Index: tests/tests/ezlog_fail/example.logpro ================================================================== --- /dev/null +++ tests/tests/ezlog_fail/example.logpro @@ -0,0 +1,44 @@ +;; (c) 2006,2007,2008,2009 Matthew Welland matt@kiatoa.com +;; +;; License GPL. + +;; define your hooks +(hook:first-error "echo \"Error hook activated: #{escaped errmsg}\"") +(hook:first-warning "echo \"Got warning: #{escaped warnmsg}\"") +(hook:value "echo \"Value hook activated: expected=#{expected}, measured=#{measured}, tolerance=#{tolerance}, message=#{message}\"") + +;; first ensure your run at least started +;; +(trigger "Init" #/This is a header/) +(trigger "InitEnd" #/^\s*$/) +(section "Init" "Init" "InitEnd") + +(trigger "Body" #/^.*$/) ;; anything starts the body +;; (trigger "EndBody" #/This had better never match/) + +(section "Body" "Body" "EndBody") + +(trigger "Blah2" #/^begin Blah2/) +(trigger "Blah2End" #/^end Blah2/) +(section "Blah2" "Blah2" "Blah2End") + +(expect:required in "Init" = 1 "Header" #/This is a header/) +(expect:required in "LogFileBody" > 0 "Something required but not found" #/This is required but not found/) +(expect:value in "LogFileBody" 1.9 0.1 "Output voltage" #/Measured voltage output:\s*([\d\.\+\-e]+)v/) +(expect:value in "LogFileBody" 0.5 0.1 "Output current" #/Measured output current:\s*([\d\.\+\-e]+)mA/) +(expect:value in "LogFileBody" 110e9 2e9 "A big number (first)" #/Freq:\s*([\d\.\+\-e]+)\s+Hz/) +(expect:value in "LogFileBody" 110e9 1e9 "A big number (second), hook not called" #/Freq:\s*([\d\.\+\-e]+)Hz/) +(expect:value in "LogFileBody" 110e9 1e9 "A big number (never activated)" #/Freq:\s*([\d\.\+\-e]+)zH/) + +;; Using match number +(expect:value in "LogFileBody" 1.9 0.1 "Time Voltage" #/out: (\d+)\s+(\d+)/ match: 2) + +;; Comparison instead of tolerance +(expect:value in "LogFileBody" 1.9 > "Time voltage" #/out: (\d+)\s+(\d+)/ match: 2) + +(expect:ignore in "Blah2" < 99 "FALSE ERROR" #/ERROR/) +(expect:ignore in "Body" < 99 "Ignore the word error in comments" #/^\/\/.*error/) +(expect:warning in "Body" = 0 "Any warning" #/WARNING/) +(expect:error in "Body" = 0 "ERROR BLAH" (list #/ERROR/ #/error/)) ;; but disallow any other errors + +;(expect in "Init" < 1 "Junk" #/This is bogus/) ADDED tests/tests/ezlog_fail/lookittmp.logpro Index: tests/tests/ezlog_fail/lookittmp.logpro ================================================================== --- /dev/null +++ tests/tests/ezlog_fail/lookittmp.logpro @@ -0,0 +1,10 @@ +;; (c) 2006,2007,2008,2009 Matthew Welland matt@kiatoa.com +;; +;; License GPL. + + +(expect:required in "LogFileBody" > 0 "Must be some files in the dir" #/.*/) + +(expect:ignore in "LogFileBody" < 99 "Ignore the word error in comments" #/^\/\/.*error/) +(expect:warning in "LogFileBody" = 0 "Any warning" #/WARNING/) +(expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/error/)) ;; but disallow any other errors ADDED tests/tests/ezlog_fail/testconfig Index: tests/tests/ezlog_fail/testconfig ================================================================== --- /dev/null +++ tests/tests/ezlog_fail/testconfig @@ -0,0 +1,13 @@ +[setup] + +[ezsteps] +lookittmp ls /tmp +lookithome ls /home + +[test_meta] +author matt +owner bob +description This test runs a single ezstep which is expected to pass using a simple logpro file. + +tags first,single +reviewed 09/10/2011, by Matt ADDED tests/tests/ezlog_pass/example.logpro Index: tests/tests/ezlog_pass/example.logpro ================================================================== --- /dev/null +++ tests/tests/ezlog_pass/example.logpro @@ -0,0 +1,44 @@ +;; (c) 2006,2007,2008,2009 Matthew Welland matt@kiatoa.com +;; +;; License GPL. + +;; define your hooks +(hook:first-error "echo \"Error hook activated: #{escaped errmsg}\"") +(hook:first-warning "echo \"Got warning: #{escaped warnmsg}\"") +(hook:value "echo \"Value hook activated: expected=#{expected}, measured=#{measured}, tolerance=#{tolerance}, message=#{message}\"") + +;; first ensure your run at least started +;; +(trigger "Init" #/This is a header/) +(trigger "InitEnd" #/^\s*$/) +(section "Init" "Init" "InitEnd") + +(trigger "Body" #/^.*$/) ;; anything starts the body +;; (trigger "EndBody" #/This had better never match/) + +(section "Body" "Body" "EndBody") + +(trigger "Blah2" #/^begin Blah2/) +(trigger "Blah2End" #/^end Blah2/) +(section "Blah2" "Blah2" "Blah2End") + +(expect:required in "Init" = 1 "Header" #/This is a header/) +(expect:required in "LogFileBody" > 0 "Something required but not found" #/This is required but not found/) +(expect:value in "LogFileBody" 1.9 0.1 "Output voltage" #/Measured voltage output:\s*([\d\.\+\-e]+)v/) +(expect:value in "LogFileBody" 0.5 0.1 "Output current" #/Measured output current:\s*([\d\.\+\-e]+)mA/) +(expect:value in "LogFileBody" 110e9 2e9 "A big number (first)" #/Freq:\s*([\d\.\+\-e]+)\s+Hz/) +(expect:value in "LogFileBody" 110e9 1e9 "A big number (second), hook not called" #/Freq:\s*([\d\.\+\-e]+)Hz/) +(expect:value in "LogFileBody" 110e9 1e9 "A big number (never activated)" #/Freq:\s*([\d\.\+\-e]+)zH/) + +;; Using match number +(expect:value in "LogFileBody" 1.9 0.1 "Time Voltage" #/out: (\d+)\s+(\d+)/ match: 2) + +;; Comparison instead of tolerance +(expect:value in "LogFileBody" 1.9 > "Time voltage" #/out: (\d+)\s+(\d+)/ match: 2) + +(expect:ignore in "Blah2" < 99 "FALSE ERROR" #/ERROR/) +(expect:ignore in "Body" < 99 "Ignore the word error in comments" #/^\/\/.*error/) +(expect:warning in "Body" = 0 "Any warning" #/WARNING/) +(expect:error in "Body" = 0 "ERROR BLAH" (list #/ERROR/ #/error/)) ;; but disallow any other errors + +;(expect in "Init" < 1 "Junk" #/This is bogus/) ADDED tests/tests/ezlog_pass/lookittmp.logpro Index: tests/tests/ezlog_pass/lookittmp.logpro ================================================================== --- /dev/null +++ tests/tests/ezlog_pass/lookittmp.logpro @@ -0,0 +1,10 @@ +;; (c) 2006,2007,2008,2009 Matthew Welland matt@kiatoa.com +;; +;; License GPL. + + +(expect:required in "LogFileBody" > 0 "Must be some files in the dir" #/.*/) + +(expect:ignore in "LogFileBody" < 99 "Ignore the word error in comments" #/^\/\/.*error/) +(expect:warning in "LogFileBody" = 0 "Any warning" #/WARNING/) +(expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/error/)) ;; but disallow any other errors ADDED tests/tests/ezlog_pass/testconfig Index: tests/tests/ezlog_pass/testconfig ================================================================== --- /dev/null +++ tests/tests/ezlog_pass/testconfig @@ -0,0 +1,13 @@ +[setup] + +[ezsteps] +lookittmp ls /tmp +lookithome ls /home + +[test_meta] +author matt +owner bob +description This test runs a single ezstep which is expected to pass using a simple logpro file. + +tags first,single +reviewed 09/10/2011, by Matt ADDED tests/tests/ezlog_warn/lookithome.logpro Index: tests/tests/ezlog_warn/lookithome.logpro ================================================================== --- /dev/null +++ tests/tests/ezlog_warn/lookithome.logpro @@ -0,0 +1,11 @@ +;; (c) 2006,2007,2008,2009 Matthew Welland matt@kiatoa.com +;; +;; License GPL. + + +;;(expect:required in "LogFileBody" > 0 "Must be some files in the dir" #/.*/) + +(expect:ignore in "LogFileBody" < 99 "Ignore the word error in comments" #/^\/\/.*error/) +;; Force a warn for this test +(expect:warning in "LogFileBody" = 0 "Any warning" #/.*/) +(expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/error/)) ;; but disallow any other errors ADDED tests/tests/ezlog_warn/lookittmp.logpro Index: tests/tests/ezlog_warn/lookittmp.logpro ================================================================== --- /dev/null +++ tests/tests/ezlog_warn/lookittmp.logpro @@ -0,0 +1,10 @@ +;; (c) 2006,2007,2008,2009 Matthew Welland matt@kiatoa.com +;; +;; License GPL. + + +(expect:required in "LogFileBody" > 0 "Must be some files in the dir" #/.*/) + +(expect:ignore in "LogFileBody" < 99 "Ignore the word error in comments" #/^\/\/.*error/) +(expect:warning in "LogFileBody" = 0 "Any warning" #/WARNING/) +(expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/error/)) ;; but disallow any other errors ADDED tests/tests/ezlog_warn/testconfig Index: tests/tests/ezlog_warn/testconfig ================================================================== --- /dev/null +++ tests/tests/ezlog_warn/testconfig @@ -0,0 +1,13 @@ +[setup] + +[ezsteps] +lookittmp ls /tmp +lookithome ls /home;echo warn + +[test_meta] +author matt +owner bob +description This test runs a single ezstep which is expected to pass using a simple logpro file. + +tags first,single +reviewed 09/10/2011, by Matt DELETED tests/tests/eztest_fail/testconfig Index: tests/tests/eztest_fail/testconfig ================================================================== --- tests/tests/eztest_fail/testconfig +++ /dev/null @@ -1,18 +0,0 @@ -[setup] - -[requirements] -priority 10 - -[ezsteps] -lookittmp ls /tmp -lookithome ls /home -lookitnada ls /nada -lookitusr ls /usr - -[test_meta] -author matt -owner bob -description This test runs a single ezstep which is expected to pass, no logpro file. - -tags first,single -reviewed 09/10/2011, by Matt DELETED tests/tests/eztest_logpro/lookittmp.logpro Index: tests/tests/eztest_logpro/lookittmp.logpro ================================================================== --- tests/tests/eztest_logpro/lookittmp.logpro +++ /dev/null @@ -1,10 +0,0 @@ -;; (c) 2006,2007,2008,2009 Matthew Welland matt@kiatoa.com -;; -;; License GPL. - - -(expect:required in "LogFileBody" > 0 "Must be some files in the dir" #/.*/) - -(expect:ignore in "LogFileBody" < 99 "Ignore the word error in comments" #/^\/\/.*error/) -(expect:warning in "LogFileBody" = 0 "Any warning" #/WARNING/) -(expect:error in "LogFileBody" = 0 "Any error" (list #/ERROR/ #/error/)) ;; but disallow any other errors DELETED tests/tests/eztest_logpro/testconfig Index: tests/tests/eztest_logpro/testconfig ================================================================== --- tests/tests/eztest_logpro/testconfig +++ /dev/null @@ -1,13 +0,0 @@ -[setup] - -[ezsteps] -lookittmp ls /tmp -lookithome ls /home - -[test_meta] -author matt -owner bob -description This test runs a single ezstep which is expected to pass using a simple logpro file. - -tags first,single -reviewed 09/10/2011, by Matt DELETED tests/tests/eztest_pass/testconfig Index: tests/tests/eztest_pass/testconfig ================================================================== --- tests/tests/eztest_pass/testconfig +++ /dev/null @@ -1,13 +0,0 @@ -[setup] - -[ezsteps] -lookittmp ls /tmp -lookithome ls /home - -[test_meta] -author matt -owner bob -description This test runs a single ezstep which is expected to pass, no logpro file. - -tags first,single -reviewed 09/10/2011, by Matt Index: tests/tests/sqlitespeed/testconfig ================================================================== --- tests/tests/sqlitespeed/testconfig +++ tests/tests/sqlitespeed/testconfig @@ -4,8 +4,8 @@ [requirements] waiton runfirst [items] -MANYITEMS [system (env > envfile.txt;echo aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au)] +MANYITEMS [system (env > envfile.txt;echo aa ab ac ad ae af ag ah ai)] # BORKED