Changeset 3283
- Timestamp:
- 08/06/13 15:06:22 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
monitoring/plugins/mpi/integration_test.R
r3282 r3283 2 2 #message(getwd()); 3 3 4 test_info <-4 checks_info <- 5 5 utils:::read.table("plugins_hosts_services.tab", 6 6 sep = "\t", … … 14 14 15 15 test_results <- 16 base:::integer(length = base:::nrow( test_info));16 base:::integer(length = base:::nrow(checks_info)); 17 17 test_stdout <- 18 base:::character(length = base:::nrow( test_info));18 base:::character(length = base:::nrow(checks_info)); 19 19 #test_stderr 20 20 # <- character(length = length(command_line_arguments)); 21 21 ## X- stderr output cannot be caught separately yet due to R implementation issue 22 22 23 for (test_index in 1L:base:::nrow(test_info)) 23 command_lines <- 24 base:::list(); 25 26 for (test_index in 1L:base:::nrow(checks_info)) 24 27 { 25 28 base:::message(base:::paste("Running test", test_index)); 26 29 27 30 command_line <- 28 base:::paste( test_info[test_index,]$`file name`, "-h", test_info[test_index,]$`-h`);31 base:::paste(checks_info[test_index,]$`file name`, "-h", checks_info[test_index,]$`-h`); 29 32 30 if ( test_info[test_index,]$`-u` != "") {33 if (checks_info[test_index,]$`-u` != "") { 31 34 command_line <- 32 35 base:::c(command_line, 33 '-u', test_info[test_index,]$`-u`);36 '-u', checks_info[test_index,]$`-u`); 34 37 } 35 36 browser();37 38 38 39 test_output <- … … 45 46 if(!base:::is.null(base:::attr(test_output, "status"))) { 46 47 test_results[test_index] <- 47 base:::as.integer( attr(test_output, "status"));48 base:::as.integer(base:::attr(test_output, "status")); 48 49 } else { 49 50 test_results[test_index] <- … … 56 57 collapse = "\n"); 57 58 59 command_lines <- 60 c(command_lines, command_line); 61 58 62 # browser(); 59 63 } 60 64 65 browser(); 66 61 67 test_results_df <- 62 base:::data.frame(description = test_info$service,63 command_line = command_line ,68 base:::data.frame(description = checks_info$description, 69 command_line = command_lines, 64 70 test_results = test_results, 65 71 test_stdout = test_stdout, 66 72 stringsAsFactors = FALSE); 73 74 browser(); 67 75 68 76 test_results_file_path <-
Note: See TracChangeset
for help on using the changeset viewer.