Ignore:
Timestamp:
08/06/13 15:42:23 (11 years ago)
Author:
sanmai
Message:
  • Fix test script.
  • Add column to MPI monitoring checks table for -b parameter used by check_clarin_ldap.py
File:
1 edited

Legend:

Unmodified
Added
Removed
  • monitoring/plugins/mpi/integration_test.R

    r3289 r3290  
    1313## test_results has a value equal to the exit status of the scripts with arguments command_line_arguments run.
    1414
    15 test_results <-
     15check_exit_status <-
    1616    base:::integer(length = base:::nrow(checks_info));
    17 test_stdout <-
     17check_stdout <-
    1818    base:::character(length = base:::nrow(checks_info));
    1919#test_stderr
     
    2626for (test_index in 1L:base:::nrow(checks_info))
    2727{
    28     base:::message(base:::paste("Running test", test_index));
     28    base:::message(base:::paste("Checking", checks_info[test_index,]$description, "..."));
    2929
    3030    command_line <-
     
    3737                     '-u', checks_info[test_index,]$`-u`);
    3838    }
     39    if (checks_info[test_index,]$`-b` != "") {
     40        command_line <-
     41            base:::c(command_line,
     42                     '-b', checks_info[test_index,]$`-b`);
     43    }
    3944
    4045    test_output <-
     
    4651    ## Fetch exit status codes. 
    4752    if(!base:::is.null(base:::attr(test_output, "status"))) {
    48         test_results[test_index] <-
     53        check_exit_status[test_index] <-
    4954            base:::as.integer(base:::attr(test_output, "status"));
    5055    } else {
    51         test_results[test_index] <-
     56        check_exit_status[test_index] <-
    5257            0L;
    5358    };
    5459
    55     test_stdout[test_index] <-
     60    check_stdout[test_index] <-
    5661        base:::paste(test_output,
    5762                      sep = "\n",
     
    6974    base:::data.frame(description             = checks_info$description,
    7075                      command_line            = base:::unlist(command_lines),
    71                       test_results            = test_results,
    72                       test_stdout             = test_stdout,
     76                      check_exit_status       = check_exit_status,
     77                      check_stdout            = check_stdout,
    7378                      stringsAsFactors        = FALSE);
    7479
     
    7681
    7782test_results_file_path <-
    78     "/tmp/test_results.tab";
     83    "/tmp/Nagios_checks_test.tab";
    7984
    8085utils:::write.table(test_results_df,
Note: See TracChangeset for help on using the changeset viewer.