• get_result --perl


    #!/usr/bin/perl

    use File::Basename;

    my $result_dir = $ARGV[0];

    # Blow is the testlog directory

    #TODO:you may need update based your config

    my $result_testlog_dir = "$result_dir/testlog";

    opendir DIR, $result_testlog_dir;

    my $result_log_file = "$result_dir/regress_result.log";
    system("touch $result_log_file");

    my $all_results;

    foreach $file(readdir DIR) {
    my ($filename, $dir, $suffix) = fileparse($file, qr/.[^.]*/);

    if($suffix =~ /log/) {

    ##TEST_RESULTS is the keyword line to indicated whether test is pass or failed. Like TEST_RESULTS:PASSED/FAILED

    ##TODO: you may need update this keyword based your log

    my $result = `grep "TEST_RESULTS" $result_testlog_dir/$file`;
    chomp($result);
    $all_results = $all_results."$result $result_testlog_dir/$file ";

    }
    }


    open(WR_FILE, ">$result_log_file");
    print WR_FILE  $all_results;

    print "RESULT FILE: $result_log_file "

    --
  • 相关阅读:
    mysql主从原理
    mysql锁和事物隔离
    mysql索引查找原理及调优
    MySQL高级查询
    周总结04
    冲刺第六天
    冲刺第五天
    冲刺第四天
    典型用户模板和用户场景模版
    冲刺第三天
  • 原文地址:https://www.cnblogs.com/freeic/p/9205152.html
Copyright © 2020-2023  润新知