logname=[] logcatname=[] process=[] testname='Test1' advname='cstadv' logpath=adbmodule.createlogpath(testname) for i in range(len(dut)): logname.append(dut[i].creatlogfile(logpath)) logcatname.append(dut[i].logcatname()) # loggingv1.cleanlogcat(dut[i].deviceid) time.sleep(2) # process.append(loggingv1.startlogcat(dut[i].deviceid,logcatname[i])) test.initialize(dut[i]) number=input("please input the number of instance you want:") number1=int(number) for i in range(number1): test.advertising(serial=i+1,instance=1,advmode=enums.Advertisingmode.lowlatency.value,advpower=enums.Advertisingpower.highpower.value,connectable=enums.Connectable.connectable.value,timeout=0,name=advname,dut1=dut[0]) # dut[1].scanforname(serial=1,name=advname) # dut[0].advaddr=dut[1].advaddr # peripheralPCname=enums.networkpath.BTTESTWS2.name # sendcommand.notifyremote(enums.Filename.notifyfile.value,host=peripheralPCname) # time.sleep(15) # for i in range(len(dut)): # process[i].kill() # sys.exit(0)
# a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import SWIGParser import fileinput if __name__ == "__main__": from test import initialize, display_parses initialize(n=50) for line in fileinput.input(): line = line.strip() print line tree = SWIGParser.inputTreeFromString('(S1 ' + line + ')') print tree sentence = tree.toSentRep() print sentence parses = SWIGParser.parse(sentence) print len(parses), 'parses' if not parses: raise 'failed' display_parses(parses) print 'example failure tree', sentence.makeFailureTree('Xyz') print
# We must initialize before we frobnicate and we must frobnicate before exacerbating. from test import initialize, frobnicate, exacerbate #To keep test results tidy don't put any thing we want results for before line 20 def bad1(): frobnicate() def bad2(): exacerbate() def good(): exacerbate() bad2() bad1() initialize() good()