From 0273b622d39a0aef9e07c32d2dbe6b1bcfdf5de3 Mon Sep 17 00:00:00 2001 From: CNugteren Date: Wed, 22 Jul 2015 21:30:02 +0200 Subject: Made the graph script robust against diagnostic system messages --- test/performance/graphs/common.r | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'test/performance/graphs') diff --git a/test/performance/graphs/common.r b/test/performance/graphs/common.r index e310b811..34a59c43 100644 --- a/test/performance/graphs/common.r +++ b/test/performance/graphs/common.r @@ -83,7 +83,16 @@ main <- function(routine_name, precision, test_names, test_values, params_string <- paste(parameters, params_values[[command_id]], collapse=" ") arguments <- paste(devices_string, params_string, options_string, sep=" ") print(paste("Running", executable, arguments, sep=" ")) - result_string <- system2(command=executable, args=arguments, stdout=TRUE) + raw_result_string <- system2(command=executable, args=arguments, stdout=TRUE) + + # Filter the string: only lines containing a ";" can be valid lines + result_string <- c() + for (line in raw_result_string) { + if (grepl(";",line)) { + result_string <- + c(result_string, line) + } + } # Reads the result into a dataframe command_db <- read.csv(text=result_string, sep=";") -- cgit v1.2.3