Skip to content

Commit

Permalink
set start_time for SubTests, update test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
swryan committed May 17, 2024
1 parent 0da8e86 commit 7e98f4c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ jobs:
# test on Ubuntu
- NAME: Ubuntu Baseline
OS: ubuntu-latest
PY: '3.11'
PY: '3.12'

# test on MacOS
- NAME: MacOS Baseline
OS: macos-latest
PY: '3.11'
PY: '3.12'

runs-on: ${{ matrix.OS }}

Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
run: |
cd $HOME
testflo testflo.tests || RC=$?
testflo testflo.tests -vs --show_skipped --durations=5 --durations-min=0 --deprecations_report dep.txt || RC=$?
if [[ $RC -ne 1 ]]; then
echo "Expected some tests to fail."
Expand All @@ -104,6 +104,8 @@ jobs:
exit 11
fi
grep "Deprecations Report" dep.txt
- name: Run tests in serial
run: |
cd $HOME
Expand Down
4 changes: 3 additions & 1 deletion testflo/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,13 @@ def run(self, queue=None):
else:
stream_val = ''
if ut_subtests:
end_time = time.perf_counter()
for sub, err in ut_subtests:
subtest = SubTest(sub._subDescription(), self.spec, self.options)
subtest.status = status
subtest.err_msg = stream_val + err
subtest.end_time = time.perf_counter()
subtest.start_time = self.start_time
subtest.end_time = end_time
subtest.memory_usage = get_memory_usage()
subs.append(subtest)
else:
Expand Down

0 comments on commit 7e98f4c

Please sign in to comment.