From fec2849bfbecabde315c5a3bef8b2971d02cc51e Mon Sep 17 00:00:00 2001 From: Alex Groce Date: Wed, 2 Jan 2019 20:16:09 -0700 Subject: [PATCH] Fix logging level in logrun, demote assumption checks --- src/include/deepstate/DeepState.h | 2 +- src/include/deepstate/DeepState.hpp | 4 ++-- tests/logrun.py | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/include/deepstate/DeepState.h b/src/include/deepstate/DeepState.h index ef57123..3364433 100644 --- a/src/include/deepstate/DeepState.h +++ b/src/include/deepstate/DeepState.h @@ -486,7 +486,7 @@ static void DeepState_InitInputFromFile(const char *path) { DeepState_Abandon("Error reading file"); } - DeepState_LogFormat(DeepState_LogInfo, + DeepState_LogFormat(DeepState_LogTrace, "Initialized test input buffer with data from `%s`", path); } diff --git a/src/include/deepstate/DeepState.hpp b/src/include/deepstate/DeepState.hpp index e4c0617..f895550 100644 --- a/src/include/deepstate/DeepState.hpp +++ b/src/include/deepstate/DeepState.hpp @@ -584,11 +584,11 @@ struct Comparer { #define ASSUME(expr) \ DeepState_Assume(expr), ::deepstate::Stream( \ - DeepState_LogInfo, true, __FILE__, __LINE__) + DeepState_LogTrace, true, __FILE__, __LINE__) #define DEEPSTATE_ASSUME_BINOP(a, b, op) \ DeepState_Assume((a op b)), ::deepstate::Stream( \ - DeepState_LogInfo, true, __FILE__, __LINE__) + DeepState_LogTrace, true, __FILE__, __LINE__) #define ASSUME_EQ(a, b) DEEPSTATE_ASSUME_BINOP(a, b, ==) #define ASSUME_NE(a, b) DEEPSTATE_ASSUME_BINOP(a, b, !=) diff --git a/tests/logrun.py b/tests/logrun.py index 23be692..cd5926f 100644 --- a/tests/logrun.py +++ b/tests/logrun.py @@ -9,7 +9,8 @@ def logrun(cmd, file, timeout): sys.stderr.write(" ".join(cmd) + "\n\n") sys.stderr.flush() with open(file, 'w') as outf: - p = subprocess.Popen(cmd + ["--log_level", "1"], stdout=outf, stderr=outf) + # We need to set log_level so we see ALL messages, for testing + p = subprocess.Popen(cmd + ["--log_level", "0"], stdout=outf, stderr=outf) start = time.time() oldContents = "" lastOutput = time.time()