fi
TIMEFORMAT="%Rs"
- TEST_RUN[runtime]="$(time ( "$test_func" >"${seqres}.out" 2>&1 ) 2>&1)"
+ { time "$test_func" >"${seqres}.out" 2>&1; } 2>"${seqres}.runtime"
TEST_RUN[exit_status]=$?
+ TEST_RUN[runtime]="$(cat "${seqres}.runtime")"
+ rm -f "${seqres}.runtime"
rm -rf "$TMPDIR"
--- /dev/null
+#!/bin/bash
+#
+# Test recording arbitrary test metrics.
+#
+# Copyright (C) 2017 Omar Sandoval
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+TEST_GROUPS=(meta)
+
+test() {
+ echo "Running ${TEST_NAME}"
+ TEST_RUN[pid]=$$
+ echo "Test complete"
+}