Component Interface Testing SciDAC Quarterly Report Argonne, IL William McLendon Ron Oldfield Sandia...

Post on 16-Dec-2015

212 views 0 download

Transcript of Component Interface Testing SciDAC Quarterly Report Argonne, IL William McLendon Ron Oldfield Sandia...

Component Interface Testing

SciDAC Quarterly Report

Argonne, ILArgonne, IL

William McLendon

Ron OldfieldSandia National Laboratories

Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company,for the United States Department of Energy under contract DE-AC04-94AL85000.

Twisted Python Info

• Framework, written in Python for writing networked applications.

• Some Features:– web server

– RDDB interface

– Object broker

– Asynchronous event handling

– Distributed Applications

• http://www.twistedmatrix.com/

APItest v0.1.2 Overview

• Continuing work with APItest v0.1.2– HTTP Interface development– Test Types

• Shell• Script• Extensability (define new types easily)

– 3rd party libraries• Twisted Python• http://www.effbot.org/ (elementtree)

• Now available via Sandia FTP:– ftp://ftp.sandia.gov/outgoing/apitest/– Posted in SciDAC notes

APItest 0.1.2 & Python

• Collaboration with Scott Jackson– Stderr/Stdout bug with python Popen3

• Problem was when a script or program generated a lot of stderr and stdout.

– deadlock!

• Twisted provides SpawnProcess()– Fixed deadlocking problem!– Asynchronous interface via Deferred()

• Required rewriting a lot of code to support asynchronous file operation mode.

– APItest is better because of it!– More responsive http server, etc.

• Accounted for most of the work this Quarter.

Test Run Tracking & Grouping

• APItest v0.1.2 has better support for browsing test data within a ‘session’– Browse test “Run” data

• Time stamped

– Test Run Overview– Batches– Tests

• timestamps• md5sum on test file

• Batch and Test data stored in an in-memory database but in XML file format. Writing out data to file should be available soon™.

sciptTest XML Example<testDef>

<info>Multiline CDATA BUFFER</info> <test name="timestamp1" type="script”

minPctMatch="100" maxPctMatch="100" numReps="1" onMismatch="CONTINUE">

  <command interpreter="/bin/csh" wdir="/tmp">foreach i (1 2 3 4 5) set theDate = `date` echo "timestamp1 :${i}: $theDate” sleep 5 end </command> <output name="stdout" format="regexp">.*timestamp1.*</output>   <output name="stderr" format="literal" />   <output name="status" format="literal">0</output>   </test></testDef>

Batch File XML

<testBatch>

  <info>Test batch file.</info>

  <test name="shell/scriptTest2.apt" />

<test name="shell/cmdTest1.apt" type="TEST" />

<dep parent="shell/scriptTest1.apt" child="shell/scriptTest2.apt" status="PASS" />

  <dep parent="shell/cmdTest1.apt" child="shell/cmdTest2.apt" ptype="TEST" ctype="TEST" />

  <dep parent="shell/cmdTest2.apt" child="shell/scriptTest1.apt" status="ANY" />

  <dep parent="shell/scriptTest1.apt" child="batch2.apb" ctype="BATCH" />

  <dep parent="shell/cmdTest2.apt" child="shell/scriptTest2.apt" />

  </testBatch>

Questions? Demo?

ftp://ftp.sandia.gov/outgoing/apitest/