diff --git a/testing/btest/Baseline/scripts.base.frameworks.input.raw.stderr/out b/testing/btest/Baseline/scripts.base.frameworks.input.raw.stderr/out index 4900bc8ff8..e7ff580dfd 100644 --- a/testing/btest/Baseline/scripts.base.frameworks.input.raw.stderr/out +++ b/testing/btest/Baseline/scripts.base.frameworks.input.raw.stderr/out @@ -1,6 +1,6 @@ Process finished event input -1 +Exit code != 0 Input::EVENT_NEW ..: F @@ -14,13 +14,13 @@ Input::EVENT_NEW stderr.bro F Input::EVENT_NEW -ls: ../nonexistant: No such file or directory +stderr output contained nonexistant T Input::EVENT_NEW -ls: ../nonexistant2: No such file or directory +stderr output contained nonexistant T Input::EVENT_NEW -ls: ../nonexistant3: No such file or directory +stderr output contained nonexistant T done End of Data event diff --git a/testing/btest/scripts/base/frameworks/input/raw/stderr.bro b/testing/btest/scripts/base/frameworks/input/raw/stderr.bro index c85ee8b0ef..e84ed048cd 100644 --- a/testing/btest/scripts/base/frameworks/input/raw/stderr.bro +++ b/testing/btest/scripts/base/frameworks/input/raw/stderr.bro @@ -15,7 +15,18 @@ global outfile: file; event line(description: Input::EventDescription, tpe: Input::Event, s: string, is_stderr: bool) { print outfile, tpe; - print outfile, s; + if ( is_stderr ) + { + # work around localized error messages. and if some localization does not include the filename... well... that would be bad :) + if ( strstr(s, "nonexistant") > 0 ) + { + print outfile, "stderr output contained nonexistant"; + } + } + else + { + print outfile, s; + } print outfile, is_stderr; try = try + 1; @@ -38,7 +49,8 @@ event InputRaw::process_finished(name: string, source:string, exit_code:count, s { print outfile, "Process finished event"; print outfile, name; - print outfile, exit_code; + if ( exit_code != 0 ) + print outfile, "Exit code != 0"; } event bro_init()