From 0806a002bf65f730f96abc45c8ea25099d3e576c Mon Sep 17 00:00:00 2001 From: rtrimana Date: Thu, 25 Jul 2019 16:00:07 -0700 Subject: [PATCH] Adding missing changes to the extractor scripts. --- Extractor/Extractor.groovy | 5 ++++- Extractor/ExtractorScript.py | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Extractor/Extractor.groovy b/Extractor/Extractor.groovy index cf69fbb..00b993d 100644 --- a/Extractor/Extractor.groovy +++ b/Extractor/Extractor.groovy @@ -1016,8 +1016,11 @@ def input(LinkedHashMap metaData) { def randomVariable = Math.abs(new Random().nextInt() % 2) def modes = ["Yes", "No"] //def userInput = modes[randomVariable] - // TODO: We //def modes = metaData['options'] + if (metaData['options'] != null) + modes = metaData['options'] + else // If it is not named 'options' then it is captured as 'metadata' + modes = metaData['metadata'] def userInput = modes[0] if (enumVariables == 0) { diff --git a/Extractor/ExtractorScript.py b/Extractor/ExtractorScript.py index 11486bc..50bc843 100644 --- a/Extractor/ExtractorScript.py +++ b/Extractor/ExtractorScript.py @@ -111,8 +111,7 @@ def AnalyzePhysicalInteraction(app1Capab, app2Capab): def ExtractEvents(extractedEvents): global eventMap - #extractedEvents.write("while(true) {\n") - extractedEvents.write("for(int i=0; i<100; i++) {\n") + extractedEvents.write("while(true) {\n") extractedEvents.write("\tdef eventNumber = Verify.getInt(0,%d)\n" % (len(eventMap) - 1)) extractedEvents.write("\tswitch(eventNumber) {\n") for i in range(len(eventMap)): -- 2.34.1