summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCNugteren <web@cedricnugteren.nl>2015-07-22 21:30:02 +0200
committerCNugteren <web@cedricnugteren.nl>2015-07-22 21:30:02 +0200
commit0273b622d39a0aef9e07c32d2dbe6b1bcfdf5de3 (patch)
tree16271115a2120eaecdcda96a10105c838cb7cb8d /test
parentdd8471ba9215de2b4c96398bc76e7a0d60516d61 (diff)
Made the graph script robust against diagnostic system messages
Diffstat (limited to 'test')
-rw-r--r--test/performance/graphs/common.r11
1 files changed, 10 insertions, 1 deletions
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=";")