[Darshan-commits] [Git][darshan/darshan][master] update regression tests to check DXT
Shane Snyder
xgitlab at cels.anl.gov
Mon Feb 20 16:48:39 CST 2017
Shane Snyder pushed to branch master at darshan / darshan
Commits:
f157b7ce by Shane Snyder at 2017-02-20T16:46:03-06:00
update regression tests to check DXT
* mpi-io-test case now also checks that the DXT parser can handle
a log file with no DXT data
* a new mpi-io-test was added to run with DXT tracing enabled
to ensure DXT and it's parser are both functioning properly
- - - - -
2 changed files:
- + darshan-test/regression/test-cases/mpi-io-test-dxt.sh
- darshan-test/regression/test-cases/mpi-io-test.sh
Changes:
=====================================
darshan-test/regression/test-cases/mpi-io-test-dxt.sh
=====================================
--- /dev/null
+++ b/darshan-test/regression/test-cases/mpi-io-test-dxt.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+PROG=mpi-io-test
+
+# set log file path; remove previous log if present
+export DARSHAN_LOGFILE=$DARSHAN_TMP/${PROG}-dxt.darshan
+rm -f ${DARSHAN_LOGFILE}
+
+# compile
+$DARSHAN_CC $DARSHAN_TESTDIR/test-cases/src/${PROG}.c -o $DARSHAN_TMP/${PROG}
+if [ $? -ne 0 ]; then
+ echo "Error: failed to compile ${PROG}" 1>&2
+ exit 1
+fi
+
+# enable dxt tracing
+export DXT_ENABLE_IO_TRACE=
+
+# execute
+$DARSHAN_RUNJOB $DARSHAN_TMP/${PROG} -f $DARSHAN_TMP/${PROG}.tmp.dat
+if [ $? -ne 0 ]; then
+ echo "Error: failed to execute ${PROG}" 1>&2
+ exit 1
+fi
+
+# parse log
+$DARSHAN_PATH/bin/darshan-dxt-parser $DARSHAN_LOGFILE > $DARSHAN_TMP/${PROG}.darshan.txt
+if [ $? -ne 0 ]; then
+ echo "Error: failed to parse ${DARSHAN_LOGFILE}" 1>&2
+ exit 1
+fi
+
+# TODO: check results
+
+# also, ensure that darshan-parser doesn't complain if given a log file that
+# has DXT data present
+$DARSHAN_PATH/bin/darshan-parser $DARSHAN_LOGFILE > /dev/null
+if [ $? -ne 0 ]; then
+ echo "Error: darshan-parser failed to handle ${DARSHAN_LOGFILE}" 1>&2
+ exit 1
+fi
+
+unset DXT_ENABLE_IO_TRACE
+
+exit 0
=====================================
darshan-test/regression/test-cases/mpi-io-test.sh
=====================================
--- a/darshan-test/regression/test-cases/mpi-io-test.sh
+++ b/darshan-test/regression/test-cases/mpi-io-test.sh
@@ -40,4 +40,12 @@ if [ ! "$MPI_OPENS" -gt 0 ]; then
exit 1
fi
+# also, ensure that darshan-dxt-parser doesn't complain if given a log file that
+# does not have DXT data present
+$DARSHAN_PATH/bin/darshan-dxt-parser $DARSHAN_LOGFILE > /dev/null
+if [ $? -ne 0 ]; then
+ echo "Error: darshan-dxt-parser failed to handle ${DARSHAN_LOGFILE}" 1>&2
+ exit 1
+fi
+
exit 0
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/f157b7cea1ca6e3b57c584569562307781f20143
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20170220/b1a3b8b3/attachment-0001.html>
More information about the Darshan-commits
mailing list