Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Low: tools: ocft: split the log file ocft.log #208

Merged
merged 1 commit into from

2 participants

@haibinshi

Split ocft.log to the files that named the same as the test config file.

Add related note in README.

@haibinshi haibinshi Low: tools: ocft: split the log file ocft.log
Split ocft.log to the files that named the same as the test config file.

Add related note in README.
e7e02fa
@dmuhamedagic dmuhamedagic merged commit 6c8cf51 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 28, 2013
  1. @haibinshi

    Low: tools: ocft: split the log file ocft.log

    haibinshi authored
    Split ocft.log to the files that named the same as the test config file.
    
    Add related note in README.
This page is out of date. Refresh to see the latest.
View
2  tools/ocft/README.in
@@ -38,6 +38,8 @@ INTRODUCTION & DESIGN
the running status of each test case, which will compares the predicated result
with the actual one. If they differ, you will be able to find the bugs of the
resource agent.
+ - All of the output with test will be recorded into the log files, you can find them
+ in /var/lib/@PACKAGE_NAME@/ocft/cases/logs.
HOW TO WRITE CONFIGURATION FILE
View
2  tools/ocft/README.zh_CN.in
@@ -27,6 +27,8 @@ ocft 通过两种手段来设计resouce agents的运行环境,一是更改reso
都写入配置文件,然后运行generator,将你刚写的test case转换成可执行的脚本。最后运行
这些脚本,观察它们的输出,你可以清楚看到每个test case运行状况,他会比较你的预知结
果和resource agent的实际结果,如果不一样,说明你找到resource agent的bug了。
+所有的测试输出都会被记录到日志文件中,你可以在 /var/lib/@PACKAGE_NAME@/ocft/cases/logs
+中找到他们.
2 配置
只有6个top level option,它们是由大写字母和'-'构成的,每个top level option都有若干sub-option,
View
12 tools/ocft/ocft.in
@@ -640,6 +640,10 @@ start_test()
die "cases directory not found."
fi
+ if [ ! -d logs ]; then
+ mkdir logs
+ fi
+
export __OCFT__VERBOSE=$opt_verbose
if [ $# -eq 0 ]; then
@@ -686,11 +690,11 @@ start_test()
;;
esac
fi
+ done 2>&1 | while read -r line; do
+ echo "$line"
+ echo "$(date '+%F %T'): $line" | cat -A |
+ sed -r 's/\^\[\[[0-9]+m|\^I|.$//g' >>logs/$shs.log
done
- done 2>&1 | while read -r line; do
- echo "$line"
- echo "$(date '+%F %T'): $line" | cat -A |
- sed -r 's/\^\[\[[0-9]+m|\^I|.$//g' >>ocft.log
done
}
Something went wrong with that request. Please try again.